Jump to content
Wayne Yao

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

Share this post


Link to post

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.

 

 

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post

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/)

Share this post


Link to post

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

 

Share this post


Link to post

@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

Share this post


Link to post

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!)
 

Share this post


Link to post

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?

Share this post


Link to post
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? 

Share this post


Link to post
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!

Share this post


Link to post
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! 

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...