Jump to content

alfred-cheat: manage your own cheat sheets


Recommended Posts

Please refer to the Github page for full documentation. Or download here.

 

Basically, this is a workflow that allows you to create and view your self-defined cheatsheets. "It was designed to help remind *nix system administrators of options for commands that they use frequently, but not frequently enough to remember". Alfred makes your cheat sheets searchable and enables a very quick glance at some commands with your finger tips.

 

This project was inspired by a command-line project cheat, extended its capability and yet acts as an independent tool. If you use "cheat" before, you can safely import your old cheat sheets in one hit. If you haven't heard of "cheat", you can start accumulating knowledges by writing your cheat sheets and make them searchable.

 

  • To list all your cheat: cheat

  • To search and list the content of one of your cheat: cheat <sheet name>. Fuzzy search and autocomplete is supported.

  • To search in a specific sheet indexed by some keyword: cheat <sheet name> <keyword>.

  • To search across all your sheets for some keyword: cheat --search <keyword>

 

Autocomplete and fuzzy search are supported of course.

 

For more detail and a git demo, refer to the Github page please.

 

 

Screen Shot 2019-07-08 at 18.29.01.png

Screen Shot 2019-07-08 at 18.29.26.png

Edited by Wayne Yao
remove tag
Link to comment
  • 2 weeks later...
  • 2 weeks later...
On 7/27/2019 at 6:01 PM, robro said:

Thanks for your workflow!

One problem for me: i can not search globally. For example "cheat mysheet mykeyword" works, but "cheat --search mykeyword" just gives me a "Cheat sheet not found" message.

 

 

thanks for the report. I'm looking into this issue.

Link to comment
On 7/27/2019 at 6:01 PM, robro said:

Thanks for your workflow!

One problem for me: i can not search globally. For example "cheat mysheet mykeyword" works, but "cheat --search mykeyword" just gives me a "Cheat sheet not found" message.

 

 

The bug has been fixed :). Thanks for the report. You can also file an issue on Github so that you can be linked to the release directly

Link to comment
  • 9 months later...

Hi, thanks for the workflow, I find it great.

You mention on github that you are open to suggestions, so here are three of them:

— would there be a way to add invisible comments in the file? Now I just put #comments and then two line breaks, but this could probably be nicer.

— without adding the possibility of modifying the cheat sheet in Alfred, maybe could ⌘O directly open the file in the user's favorite text editor?

— based on the file, there may be a way to automatically generate an hmtl cheat sheet that could be seen with quicklook when pressing ⇧, what do you think? (I am thinking of stuff like https://www.mediaatelier.com/CheatSheet/ or https://www.ergonis.com/products/keycue/)

Link to comment
  • 4 weeks later...

Well, I could not reach Wayne Yao, so I decided to modify this workflow myself 🙂

So here is a new version of Alfred-Cheat! You can download it and find detailed explanations on github.

 

What's new:

  • Main new feature : a Quicklook view. Just hit ⇧ or ⌘Y after opening a cheatsheet, and a page as shown below appears.

  • Small improvements :

    • Open your cheatsheet in your text editor by hitting ⌘↵

    • Slight syntax changes for cheatsheets (to put sections for the Quicklook view or hidden lines)

    • Open the large type view by hitting ⌘L

    • I changed wx-Yao's cheat keyword into cht because I find it quicker. But it is easy to reverse this change.

 

Comments, suggestions or bugs reports are most welcome!

 

quicklook.thumb.jpg.6d076a9b8343181ffc2b836f170aaccc.jpg

 

Link to comment

@odapg

 

Hey man :). I'm not monitoring this site .... but somehow it pushes your update to my mailbox but not the suggestion..

 

Thanks for the great improvement! I'll check it out later. Would you mind make a PR to me? so that I can integrate to the original code base. And of course kudos will be yours.

 

Thanks,

 

Wayne

Link to comment

Hey @Wayne Yao

 

With great pleasure. Note that I took some liberty in some parts (the README file, comments in the code, etc.), because I thought you did no longer work on the workflow.
Of course you are absolutely free to reverse these changes! I am just happy to contribute to your workflow (that I like very much!)
 

Link to comment

I really like this workflow, with the simplicity to create and edit cheat sheets and the power of Alfred and fuzzy search it makes it extremely easy to find things even when you are not sure what search terms to use. Thanks for making it @Wayne Yao , and thanks @odapg for the great update, those improvements are very useful. 

Would it be possible for you to add an auto-update mechanism, e.g. OneUpdater?

Link to comment
  • 4 weeks later...
On 6/17/2020 at 1:26 PM, odapg said:

Well, I could not reach Wayne Yao, so I decided to modify this workflow myself 🙂

So here is a new version of Alfred-Cheat! You can download it and find detailed explanations on github.

 

It looks like your code was not integrated into the original workflow and you are quite ahead in terms of commits.

Would you mind creating a separate thread in the forums so you have your own dedicated place for questions and all? 

Link to comment
9 hours ago, RuslanI said:

 

It looks like your code was not integrated into the original workflow and you are quite ahead in terms of commits.

Would you mind creating a separate thread in the forums so you have your own dedicated place for questions and all? 

 

Hey thanks for the reply. He's doing a PR to the original repo. And i was planing to merge it soon, with some modifications. Stay tuned!

Link to comment
On 6/25/2020 at 5:35 PM, cands said:

I really like this workflow, with the simplicity to create and edit cheat sheets and the power of Alfred and fuzzy search it makes it extremely easy to find things even when you are not sure what search terms to use. Thanks for making it @Wayne Yao , and thanks @odapg for the great update, those improvements are very useful. 

Would it be possible for you to add an auto-update mechanism, e.g. OneUpdater?

 

Thanks for liking it :)

 

And it looks good but i need to figure it our how it works before integrating. Actually this workflow doesn't update very frequently because i intentionally keep it simple. I'll see if the autoupdate mechanism is necessary. Will come back to this thread later.

 

Thanks again for the suggestion! 

 

Link to comment
  • 5 months later...

Hi again, I'm using this workflow a lot, and I have not experienced any problems after updating to macOS Big Sur. I have one feature request (besides autoupdate as asked before), would it be possible to optionally copy also the comment for a command (written as "# comment" above the command in the text files), .e.g. using another modifier such as the option key? I sometimes find a need to not only copy / paste the command itself but also the comment along with the command.

Edited by cands
Link to comment
  • 2 years later...

I know this is pretty old, but I am trying to use Alfred-Cheat (or Alfred-Cheat2 with Alfred 5. 

 

The 'cf' command works--it activates the "configure your cheat directory' command in Alfred. However, the 'cheat' or 'cht' keyword is not recognized by Alfred. Why?

Link to comment

I'm pretty sure that this workflow just doesn't work on Alfred 5. the python code associated with workflow is actually running workflow.py for Alfred 2, but has code (not referenced) for Alfred 3. These python files seem to have lots of problems in my environment.

Link to comment
  • 2 months later...

For those interested in this workflow, I have updated my personal version of @Wayne Yao's alfred-cheat, using the modifications @giovanni made to port it to Python 3/Alfred 5. The main difference with Wayne Yao's original workflow is the possibility to have a quicklook view of the cheatsheet.

 

If you are interested, you can have a look at

 

https://github.com/odapg/alfred-cheat/
 

Any comment/suggestion is welcome!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...