
Unified access to the best community-driven cheat sheets repositories - ghosthamlet
https://github.com/chubin/cheat.sh
======
PaulRobinson
I like the idea, and think it has potential, but…

The search engine is not great. The tutorial gives the example of searching
for "execute+external+program". Change "program" for "command", you're OK.
Change "execute" for "run"and it bombs. For something that simple, this causes
doubt that if I were to look for a solution to a problem in a language I was
learning and it bombed, is the fault with cht.sh, or with me? Does the
language even let you do that? I've have to run towards my browser to find
out.

Also, the big advantage Dash has over this, and of course local generated docs
(like Go's doc server et al), is that they are local. No network needed. I can
be productive when offline, and when coding I often like to try and go
offline. It's also faster, and for some docs I can even search a little with
grep which I already remember. I can also get integrations with my editors,
etc.

It's a great idea, I like it, and I think it has a niche, but it needs more
synonyms in that search engine, and perhaps some integrations to make it a
little more accessible to the workflow.

~~~
dangoor
I agree about the search engine.

I'm a big fan of Dash, but Dash is currently built around _documentation_
rather than cheat sheets. If someone loaded up Dash with a bunch of cheat
sheets, that would be really handy.

~~~
tylerflick
Dash absolutely has cheat sheets.

~~~
dangoor
Holy cow! There's a whole category for them. How did I miss that?

------
ritchiea
Similar project: Bro pages, like man pages but short examples of common use
cases instead of extensive documentation.

[http://bropages.org/](http://bropages.org/)

~~~
flamtap
Thanks for the tip on that, bro! That will really come in handy.

~~~
codefined
I think tl;dr pages[0] might be more popular, on a similar topic

[0] [https://github.com/tldr-pages/tldr](https://github.com/tldr-pages/tldr)

------
Quequau
I enjoy cheat sheets as much as the next person but I think folks are missing
out the key element that there's significant benefit in making them yourself.

~~~
qrbLPHiKpiux
Yes, writing it down.

~~~
poutrathor
you _learn it_ by writing it down.

~~~
superflyguy
The act of writing down your own cheat sheet helps you to learn it.

~~~
JadeNB
It seems like the chain of four comments starting with Quequau's
([https://news.ycombinator.com/item?id=17505892](https://news.ycombinator.com/item?id=17505892))
and ending with superflyguy's
([https://news.ycombinator.com/item?id=17507512](https://news.ycombinator.com/item?id=17507512))
mean to disagree, but actually wind up agreeing. Is that correct, or is there
some subtle distinction among them that I'm missing?

~~~
sah2ed
It's the nature of the medium being text-based.

FWIW, I didn't parse each of the nested comments as disagreeing, more like
using their individual experiences to elucidate the point of the person they
responded to.

~~~
superflyguy
Mine was me observing the similarity of the previous two. If there was any
difference there then it was too polite/subtle for me.

------
Sir_Cmpwn
Instead of investing in out of band resources like this, I really wish people
would just contribute improvements to the upstream documentation, which is
usually more comprehensive and up-to-date than any of these resources can be.

~~~
superflyguy
No, I don't agree. Git has great documentation but if you want to know how to
use it you either spend 15 minutes reading the relevant part of the big free
book or you Google for a cheat sheet. Same goes for vim. I don't know why but
some people are satisfied with documentation which, although not incorrect,
only makes sense when you already have a substantial understanding of the
topic at hand.

~~~
Sir_Cmpwn
Nonsense, you can also read the man pages, and if any of these resources are
insufficient you should spend any time you would have spent writing a cheat
sheet contributing improvements to the actual resources - the documentation is
an open-source community project as much as the project itself is.

~~~
superflyguy
Sounds like a bit of a waste of time to me. What are the odds Linus is going
to update the git documentation with my list of handy shortcuts? He'll just
swear at me. I don't think the official documentation is the place for it; not
now it's been written the way it has. I'm happy with the book + my notes on
gitlab.

~~~
Sir_Cmpwn
Well, for one, Linus isn't the current maintainer of Git. It's currently Junio
C Hamano <gitster@pobox.com>, someone whose main responsibility in open source
is looking after git, who has the time and inclination to review your
contributions thoughtfully. Have you ever actually read a git man page? Or do
you just get all of your git knowledge from scattered blog posts and cheat
sheets? No wonder people think git is hard. Read a random git man page right
now and you'll find it quite pleasant to read and containing a plethora of
useful information.

------
TeMPOraL
I like it. I also like the feature 'Freak_NL pointed out - quick memory-
jogging examples for a command.

Speaking of those top-level queries, I've noticed some of them are reported as
unknown, even though they then are suggested. Observe:

    
    
      temporal@galactica~> curl cht.sh/lisp
      Unknown topic.
      Do you mean one of these topics may be?
      
          * lisp/ 100
          * elisp/ 89
          * alias 67
    

Changing the URL to cht.sh/alias correctly gives a list of examples, while
lisp and elisp are always reported as unknown. My guess is, something
somewhere is storing those tokens with forward slash in the name, whereas the
HTTP handling code strips it out from request.

EDIT:
[https://github.com/chubin/cheat.sh/issues/32](https://github.com/chubin/cheat.sh/issues/32).
I need to kick the habit of writing HN comments first, then bug reports later
:).

------
Freak_NL
I like how this gives me access to succinct example usages of tools just
enough to get me going or to jog my memory for how a certain tool works —
without having to resort to using a browser and a search engine.

    
    
        curl cht.sh/find
        curl cht.sh/sed
    

Like these.

~~~
Freak_NL
If you're wondering where this tool gets its data from, have a look:

[https://github.com/chubin/cheat.sh#cheat-sheets-
sources](https://github.com/chubin/cheat.sh#cheat-sheets-sources)

------
sgt
There's also a cheat sheet built into nearly every computer - it's called man
pages.

~~~
crottypeter
This is true but they are often long and complicated and aren't always
conducive to quick solutions or refreshing memories of a useful combination of
arguments.

It is good to have both.

~~~
sgt
That's true. However I often encounter co-workers refusing to read man pages,
because they _only_ want to see a cheat sheet. They end up endlessly wandering
Stack overflow and google for hours instead of spending 5 minutes going
through the actual manual.

------
djaychela
I like this (I find brief documentation with worked examples makes it a lot
easier for me to understand most things), but I've just had a look at the
python lambda one which is served up by curl... and it has some errors in it.
Followed the instructions on how to edit it, forked it, and... the version I
went to edit has the two changes I thought needed doing already done (3 hours
ago)! Pity, my first chance to contribute to a project (early-learning level
python student in my mid 40s)!

It does beg the question when do the curl versions get updated?

------
hoppelhase
Similar project: [http://tldr.sh](http://tldr.sh)

~~~
j88439h84
> Instead of creating yet another mediocre cheat sheet repository, we are
> concentrating our efforts on creation of a unified mechanism to access
> selected existing well developed and good maintained cheat sheet
> repositories covering topics of our interest: programming and operating
> systems usage.

[https://github.com/chubin/cheat.sh](https://github.com/chubin/cheat.sh)

------
nebulous1
Is the dropdown at [https://cht.sh/](https://cht.sh/) a little sluggish in
chrome for everybody?

~~~
igor_chubin
Yes, it is not good, we are working on the new frontend.

I can give a link to it to you if you want, but not here, because it will not
handle the load that comes after that; just write me a mail if you want to
test it.

Everybody who reads this and what to help testing the new frontend write an
email to me I will share the link with you.

~~~
nebulous1
Do you know what's causing it?

------
PythonicAlpha
The output seems to be optimized for people with dark background color on the
xterm.

Is there a possibility to have a different color scheme?

~~~
igor_chubin
Yes

curl cht.sh/:styles-demo

select the best style for you, and use it in the queries.

curl cht.sh/:help

for more info.

Also, use the special client cht.sh which supports persitent configuration and
many other useful features.

~~~
PythonicAlpha
Thanks, that helps.

------
fredley
Wait, in stealth mode it's listening for any text selected, even in other
programs? This is a bit mind boggling - what's to prevent any program
listening to any other (like a password manager for example)? Is this sort of
access not prevented by an accessibility permission?

~~~
Livven
This is how traditional desktop operating systems work... some things require
admin rights but most stuff is indeed fully accessible to any application.

------
pgt
This cleverly one-ups [http://bropages.org/](http://bropages.org/) by
leveraging an existing command in the environment you are most likely to type
"bro curl", but you don't need to install a tool first.

------
philpem
I give it five minutes before this is on all the plagiarism checker of all
those "coding challenge" sites recruiters/HR love to throw out in pre-
interview screening...

------
fra
This is not working at all for me. I keep getting HTML & CSS vomit regardless
on whether I use their command line tool or curl.

~~~
laumars
What user agent string is your curl request sending out?

I think it does user agent checking to decide whether to send out a shell
escaped version of the page or one with traditional web markup because when I
make a HTTP request with one of my other CLI HTTP clients it only sends shell
output if I send curl's UA.

------
hit8run
Wow I love the idea. Will try it out today. Could be a time saving pal when
switching to topics you are not working on every day.

~~~
testaccount7
How is it better than google

~~~
Cthulhu_
Can you quickly find cheat sheets in a similar style to one another via
google? Some people prefer to stay in their commandline as much as possible,
too.

------
known
Weather wttr.in

------
s17tnet
Any way or how to self hosting ?

------
jbverschoor
Would be nice to have an alfred or vscode plugin

------
rident
getting a bit long for a cheetsheet

    
    
      curl cht.sh/js/foreach

~~~
igor_chubin
It depends on topic + you can use the ~ notation to extract only parts of the
cheat sheet. Check README on Github for that (or curl cht.sh/:help)

------
m3nu
Works fine. Nice idea.

------
nikisweeting
Not very respectful of
[https://github.com/chrisallenlane/cheat](https://github.com/chrisallenlane/cheat)
to use the same name.

The original cheat does exactly the same thing, has a big following and more
stars, and has existed for years.

I've opened an issue re: the name conflict
[https://github.com/chubin/cheat.sh/issues/34](https://github.com/chubin/cheat.sh/issues/34)

Afaik these are the big players in the space: \- bro:
[https://github.com/hubsmoke/bro](https://github.com/hubsmoke/bro) \- tldr:
[https://github.com/tldr-pages/tldr](https://github.com/tldr-pages/tldr) \-
cheat:
[https://github.com/chrisallenlane/cheat](https://github.com/chrisallenlane/cheat)

~~~
igor_chubin
We are of course aware of the beautiful cheat project and we even use it (what
is documented in our README.md file), but please keep in mind that:

1\. Our project is called cheat.sh and not cheat (for example xterm.js and
xterm are two separated projects and xterm existed for decades before
xterm.js; should they be renamed too from your point of view?);

2\. We are trying to mitigate the impact by using cht.sh where possible;

3\. We do not and did not ever use the name to steal, to borrow, or to somehow
use popularity of cheat.

I do not see any naming conflict actually. The client/command is called
cht.sh, does not even have cheat in their name.

I am a big fan of the cheat project myself, and I don't want to do any harm
for it. Even more, as I said, I would prefer that we cooperate with that
project.

~~~
nikisweeting
The reasoning boils down to Google-ability.

sh is not a distinct enough term when googling for shell suggestions, because
both cheat and cheat.sh will have sh in the results. That is very distinct
from xterm.js where xterm-only results are very unlikely to have JS in them.

A similar debate played out when the gofish package manager was launched,
which conflicted with the fish shell
[https://github.com/fishworks/gofish/issues/37](https://github.com/fishworks/gofish/issues/37)

Anyway, the choice is not mine to make, it just seems like an easy issue that
could have been avoided by choosing a name that wasn't already in use.

------
alismayilov
It is interesting to see how the title effect number of upvotes and comments.
I’ve submitted this other day and it did not get any upvotes. My submission:
[https://news.ycombinator.com/item?id=17471476](https://news.ycombinator.com/item?id=17471476)

~~~
koolba
Yes it’s called “marketing” and it has a huge impact on initial perception.

Consider each of these and think of which would catch your eye enough to click
it, read about it, then come back and upvote it:

* Meta cheatsheet

* The only cheat sheet you need

* Cheatsheet.sh

* Cheat Sheetah

* Unified CLI Cheetsheet

People gaming the title is the reason for the rule that the title has to match
the actual linked article. Though if you’re the creator of the content that’s
not an issue as you can title it at the source however you want.

~~~
Semiapies
Also that "Meta cheatsheet" sounds like a cheatsheet for something called
"Meta", and not being familiar with any such technology, I wouldn't be curious
about a cheatsheet.

