{"id":13521965,"url":"https://github.com/AnirudhG07/cheatshh","last_synced_at":"2025-03-31T22:30:33.392Z","repository":{"id":238999631,"uuid":"795821853","full_name":"AnirudhG07/cheatshh","owner":"AnirudhG07","description":"Cheatshh is a CLI tool to store commands and their descriptions in a place you can look into as cheatshheat so you dont have to remember them.","archived":false,"fork":false,"pushed_at":"2024-05-22T09:41:13.000Z","size":27903,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-22T10:49:46.099Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AnirudhG07.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-04T06:45:11.000Z","updated_at":"2024-05-27T14:07:50.697Z","dependencies_parsed_at":"2024-05-22T10:48:18.764Z","dependency_job_id":null,"html_url":"https://github.com/AnirudhG07/cheatshh","commit_stats":null,"previous_names":["anirudhg07/cheatshh"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnirudhG07%2Fcheatshh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnirudhG07%2Fcheatshh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnirudhG07%2Fcheatshh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnirudhG07%2Fcheatshh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnirudhG07","download_url":"https://codeload.github.com/AnirudhG07/cheatshh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246552038,"owners_count":20795755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:00:40.383Z","updated_at":"2025-03-31T22:30:28.383Z","avatar_url":"https://github.com/AnirudhG07.png","language":"Shell","funding_links":[],"categories":["Table of Contents","\u003ca name=\"cheatsheet\"\u003e\u003c/a\u003eCommands cheatsheet and snippets"],"sub_categories":[],"readme":"# cheatshh ![Static Badge](https://img.shields.io/badge/version-1.1.1-blue)\n\nCheatshh is an interactive CLI meant for managing command line cheatsheets, written in shell script. Now you don't have to remember CLI commands and just refer your cheatsheet. You can group commands and view their TLDR(or anyother) and MAN pages along with a custom description for the command.\n\u003cbr\u003e\n\n\u003e **Note:** This software is tested on and initially configured for MacOS. Please check out the [configuration documentation] to set it up for your system.\n\n## Table of Contents\n\n* [Preview/Screenshots ](#previewscreenshots-)\n* [Features](#features)\n* [Installation](#installation)\n  * [Pip Installation](#pip-installation)\n  * [Homebrew Installation](#homebrew-installation)\n  * [Manual Installation through git clone](#manual-installation-through-git-clone)\n    * [For MacOS and Linux](#for-macos-and-linux)\n    * [For Windows](#for-windows)\n* [Libraries and Groups](#libraries-and-groups)\n* [Bookmarking](#bookmarking)\n* [Dependencies](#dependencies)\n* [Cheatshh Configuration](#cheatshh-configuration)\n* [Saving cheatshh](#saving-cheatshh)\n* [Trouble-shooting](#trouble-shooting)\n* [Documentation](#documentation)\n* [Check it out](#check-it-out)\n* [Contributing](#contributing)\n    * [Contribution Guidelines](#contribution-guidelines)\n\n\n# Preview/Screenshots \n\nhttps://github.com/AnirudhG07/cheatshh/assets/146579014/d064f201-2b2f-46b3-a341-7b913646e4ef\n\n# Features\n\n- Comprehensive cheatsheets for various command-line utilities and tools.\n- Easy-to-use interface for quickly accessing and executing commands, powered by fuzzy finder(fzf) and whiptail.\n- Customizable cheatsheets and groups to suit your needs.\n- TLDR(any more) and MAN pages visible in the preview.\n- Easy to add, edit, delete commands \u0026 groups and play around.\n- Bookmark commands to access them outside of group as well.\n- Change configurations like colors, automatic man page display, usages of other cheatsheets like tldr, cheats.sh, etc.\n\n# Installation\n\nThe following installation guidelines hold for Linux and MacOS.\u003cbr\u003e\nYou can download cheatshh through following ways- (more will be added soon)\n\n## Pip Installation\n\nBefore running the below commands, make sure your dependencies are satisfied. See the DEPENDENCIES section for more info.\nFrom your command line, run-\n\n```bash\npip install cheatshh\n```\n\nThis will create ~/.config/cheatshh in your home directory. Now simply run-\n\n```bash\ncheatshh\n```\n\nand you are done. Use various options to add, edit and delete commands and groups.\n\n## Homebrew Installation\n\nThis tool can also be installed using Homebrew(for MacOS only). You can install it by tapping my homebrew-tap repo and installing the tool.\n\n```bash\nbrew install AnirudhG07/AnirudhG07/cheatshh \n```\n\nYou can now run the tool by running `cheatshh -h` in your terminal. If you are facing issues, try running-\n\n```bash\nbrew tap AnirudhG07/AnirudhG07\nbrew install cheatshh\n```\n\nMake sure you have Homebrew installed in your MacOS and it is updated which can be done by running `brew update`.\n\n## Manual Installation through git clone\n\nYou can setup manual installation with the following guidelines-\n\n### For MacOS and Linux\n\n1. Clone the repository\n\n```bash\ngit clone https://github.com/AnirudhG07/cheatshh\n```\n\n2. Navigate to the project directory run below if downloaded in home directory\n\n```bash\ncd ~/cheatshh\n```\n\n3. Install the requirements through\n\n```\npip install -r requirements.txt\n```\n\n4. (optional) Make sure you have `poetry` installed which will be required to build the project. If not you can run either of the below commands-\n```bash\npip install poetry\n# OR\ncurl -sSL https://install.python-poetry.org | python -\n```\nThis will download `peotry`. Now you can proceed to the next step.\n\n5. Run the below code to set cheatshh\n\n```bash\npip install .\n```\n\nNow you should be able to use the tool by running `cheatshh` in your terminal. Feel free to raise an issue if any error comes up.\n\n## For Windows\n\nFor Windows, you can use Virtual Machines of Linux, or change configurations manually.\u003cbr\u003e\n\u003e From version \u003e= 1.1.1, the configurations for having `cheatshh` on Windows has greatly been improved. \n\n- Change the path to directory `~/.config/cheatshh` to `absolute/path/to/your/directory/cheatshh`, by using grep command in the cheatshh directory, in `cheatshh.toml` and `cheats.sh` only at the one place.\n\n- This should run cheatshh appropriately. Make sure the dependencies are installed, since they are easily available for Unix applications.\n\n# Libraries and Groups\n\nYou can create custom groups using-\n\n```bash\ncheatshh -g\n```\n\nWe also have premade libraries of groups \u003ca href=\"https://github.com/AnirudhG07/cheatshh/tree/main/library\"\u003e here \u003c/a\u003e which you can download with the instructions given there itself. \u003cbr\u003e\nWe welcome you to publish your own libraries for everyone to see.\n\n# Bookmarking\nBookmarking let's you save your command in the main preview despite them being present in a group.\u003cbr\u003e\nYou can bookmark a command by pressing Enter and selecting `Bookmark`. Now you don't need to find it in a group and access it in the main preview.\u003cbr\u003eYou can always remove Bookmark of a command by pressing Enter and selecting `Remove Bookmark`.\n\n# Dependencies\n\nCheatshh uses the following as its main tools. Ensure that these are pre-installed in your computer.\n\n- fuzzy finder(fzf)\n- whiptail\n- jq\n- yq\n**NOTE:** jq and yq used in the package is the version present in Homebrew. Thus please install that instead of from Pypi.(It didn't work for me.)\u003cbr\u003e\n\nIn MacOS, you can use HomeBrew to install the above packages with-\n\n```bash\nbrew install \u003cpackage\u003e\n```\n\nFor MacOS \u0026 Linux both, you can run the following command to download the packages.\n\n```bash\nsudo apt install \u003cpackage\u003e\n```\n\nFor Windows, you can use your favourite package manager or download from their website itself.\n\n# Cheatshh Configuration\nYou can change various configurations of cheatshh like colors, automatic man page display, usages of other cheatsheets like tldr, cheats.sh, etc. You can do this by going to the `cheatshh/cheatshh.toml` file and changing the values as per your needs.\u003cbr\u003e\n**NOTE:** All the instructions on how to change suitably is mentioned within the file itself. If you are facing any issues, feel free to raise an issue.\n\n# Saving cheatshh\nWhen you have configured your cheatshh, you would definitely want to save them. If you want to use cheatshh in some different machine without rewriting again(cause that's a lot of trouble). Here's how you can save it.\n1. Make a repository by the name `Your_handle/cheatshh` or any other name. You can also add it to your repo where you are storing your dot files.\n2. You can use `stow` command to configure everything in an instant. Here's the layout of the directory if you will use stow-\n   \n```markdown\ncheatshh\n└─── .config\n       └── cheatshh\n            ├── cheats.sh\n            ├── commands.json\n            ├── groups.json\n            └── any/other/file\n```\n\nNow you can simply download this directory, run `stow cheatshh`, this will setup your cheatshh in the `.config/cheatshh` as it should be.\u003cbr\u003e\nOR you can manually set it up, in that case you don't need the above tree, you can simply use have the last level of tree inside cheatshh directory. \n\u003cbr\u003e\n\nDon't forget to make `setup.sh` executable.\n\n# Trouble-shooting\n1. If you are facing issues with `jq` and `yq`, please try the following first - \n- Add ABSOLUTE PATH of your `.config/cheatshh` in the `cheatshh.toml` and `cheats.sh` file as pointed [for Windows](#for-windows)\n- The jq and yq used in the packages is from Homebrew and Pypi yq would not work. So make sure you have that `jq` and `yq` installed.\n\n2. If permission denial error shows up, run the same command using sudo. You will have to provide password in this case.\n\n```bash\nsudo \u003ccommand-name\u003e\n```\n\nThis might be needed in the case for man page display or maybe for installation of dependency.\n\n3. If `WARNING: The script cheatshh is installed in '/home/admin/.local/bin' which is not on PATH.` error comes, then cheatshh script has to be included in the system PATH, you can add the following lines to the appropriate shell configuration.\n\n- BASH: Add the following at the end of ~/.bashrc\n\n```bash\nexport PATH=\"$HOME/.local/bin:$PATH\"\n```\n\n- ZSH: Add the following at the end of ~/.zshrc\n\n```bash\nexport PATH=\"$HOME/.local/bin:$PATH\"\n```\n\nAfter adding these lines, either restart your terminal or run source on the respective configuration file to apply the changes. For example:\n\n```bash\nsource ~/.bashrc  # For Bash\nsource ~/.zshrc   # For Zsh\n```\n\nThis should add the path in your `shell-rc` file and you should be able to run.\u003cbr\u003e\nNote: If you are using some other shell like fish or any similar other, configure the settings accordingly. Using Fish is not recommended for this tool.\n \n# Documentation\n\nCheatshh is an interactive, easy CLI tool to maintain your custom cheatsheets. You can check our the \u003ca href=\"https://github.com/AnirudhG07/cheatshh/tree/1.1.1/docs\"\u003e docs \u003c/a\u003e to see how to use cheatshh.\n\n# Check it out\nCheck out my Yazi File manager plugin for cheatshh at [cheatshh.yazi](https://github.com/AnirudhG070/plugins-yazi/tree/main/cheatshh.yazi). You can save your yazi shell commands and easily access them within Yazi.\n\n# Contributing\n\nI would love to take contributions from the community! If you have suggestions for new cheatsheets, improvements to existing ones, or bug fixes, please feel free to submit a pull request. \n### Contribution Guidelines\n1) For contribution of a library, it should have a suitable folder name(max 3 words) with commands.json and groups.json, similar to the format in other libraries. The `group` field should be \"yes\", `bookmark` field should be \"no\".\n2) For bug fixes, it will be great if you could discuss first in Issues before directly putting a PR. \n3) It would be great to publish this in other package managers. So I would request help for publishing to different package managers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAnirudhG07%2Fcheatshh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAnirudhG07%2Fcheatshh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAnirudhG07%2Fcheatshh/lists"}