Skip to main content

Terminal commands cheat sheet helper

Project description

                    _      _                _       _               _   
  ___ _ __ ___   __| | ___| |__   ___  __ _| |_ ___| |__   ___  ___| |_ 
 / __| '_ ` _ \ / _` |/ __| '_ \ / _ \/ _` | __/ __| '_ \ / _ \/ _ \ __|
| (__| | | | | | (_| | (__| | | |  __/ (_| | |_\__ \ | | |  __/  __/ |_ 
 \___|_| |_| |_|\__,_|\___|_| |_|\___|\__,_|\__|___/_| |_|\___|\___|\__|

Is a terminal command tool 🖥 that helps to store commands you don't want to keep in the head 🧠

Help command

cmdcheatsheet -h

or:

cmdcheatsheet --help

here is the output:

  --commands, -c - Display all commands.
  --commands-info, -ci - Display all commands, including all details such as ids, etc., all commands.
  --commands-table, -ct - Display all commands using a table view.
  --add <command> <description>, -a <command> <description> - Add new command to the list.
  --update <id> <name> <description>, -u <id> <name> <description> - Update a <command> by id.
  --delete <id>, -d <id> - Delete a <command> by id.
  --find <command>, -f <command> - Search for a command.
  --find-info <command>, -fi <command> - Search for a command and include all details, such as ids, etc.
  --global-find <command>, -gf <command> - Global search.
  --detailed-global-find <command>, -gfi <command> - Search globally for a command and include all details, such as ids, etc.
  --find-table <command>, -ft <command> - Search for a command and show it using a table view.
  --available-command-names <number_of_columns:optional>, -acn <number_of_columns:optional> - Show all stored command names.
  --version, -v - Display version.
  --help, -h - Show a program help notes.
  --display-available-configs, -dac - Display available configurations.
  --display-configs <key:optional>, -dc <key:optional> - Display configurations.
  --remove-config <key>, -rc <key> - Remove a config.
  --set-config <key> <value>, -sc <key> <value> - Set config.
  --set-config-to-default, -sctd - Set the configuration to default.
  --set-single-config-to-default <key>, -ssctd <key> - Set a single configuration to default.
  --add-alternative-store <store_name> <store_location>, -aas <store_name> <store_location> - Add alternative commands store (JSON file) location.
  --delete-alternative-store <store_name>, -das <store_name> - Delete alternative commands store (JSON file).
  --display-applied-alternative-store-name, -daasn - Display the name of applied alternative store.
  --display-available-alternative-stores, -daas - Display available alternative stores.
  --switch-to-alternative-store <store_name>, -stas <store_name> - Switch to alternative store location.
  --update-alternative-store <store_name> <store_location>, -uas <store_name> <store_location> - Update alternative commands store (JSON file).

Add command

cmdcheatsheet -a <command> <command_description>

for example:

cmdcheatsheet -a "ls" "List directory content"

Display commands

Display all commands:

cmdcheatsheet -c

or:

cmdcheatsheet

Display commands along with ids:

cmdcheatsheet -ci

Display commands using table view:

cmdcheatsheet -ct

Search for a command

cmdcheatsheet -f <command>

Search for a command and show it along with an id:

cmdcheatsheet -fi <command>

Search for a command and show it using the table view:

cmdcheatsheet -ft <command>

Global search includes search by command or description:

cmdcheatsheet -gf <query>

Global search and show it along with an id:

cmdcheatsheet -gfi <query>

Update command

cmdcheatsheet -u <command_id> <command> <command_description>

Remove command

cmdcheatsheet -d <command_id>

Show all command names

cmdcheatsheet -acn

Configuration

cmdcheatsheet configuration folder is located at ~/.config/cmdcheatsheet.
The config is called config.json

Available configurations

  • currentStoreLocation - Path to file in JSON format that consists of the command list.
  • alternativeStores - Path list to JSON files that might be used as an alternative commands store location. Every item in the list has a storeName property, which is just a store name and the second property is storeLocation, responsible for the path to the commands store (JSON file location).

Here is a config.json example:

{
    "currentStoreLocation": "/Users/myusername/.config/cmdcheatsheet/commands.json",
    "alternativeStores": [
        {
            "storeName": "unix",
            "storeLocation": "/Users/myusername/my-configs/cmdcheatsheet/unix_commands.json"
        },
        {
            "storeName": "windows",
            "storeLocation": "/Users/myusername/my-configs/cmdcheatsheet/windows_commands.json"
        }
    ]
}

Display configuration

cmdcheatsheet -dc

or display configuration by key:

cmdcheatsheet -dc <config_key>

Display available configs

This command displays all available configurations. Each command consists of a key and an explanation.

cmdcheatsheet -dac

Set config

cmdcheatsheet -sc <configuration_key> <configuration_value>

Remove configuration by key

cmdcheatsheet -rc <config_key>

Set configuration to default

cmdcheatsheet -sctd

Set a single config value

cmdcheatsheet -ssctd <configuration_key>

Alternative commands stores

It's possible to have multiple command stores and switch between them. In this way, you'll be able to have separate configs for windows, Linux, and OSX, or in case you want to split the config in some other way. This feature is called alternative command stores.

Add alternative commands store

cmdcheatsheet -aas <store_name> <store_location>

Update alternative commands store

cmdcheatsheet -uas <store_name> <store_location>

Delete alternative commands store

cmdcheatsheet -das <store_name>

Display available alternative stores

cmdcheatsheet -daas

Switch to alternative commands store

cmdcheatsheet -stas <store_name>

Display applied alternative store name

cmdcheatsheet -daasn

Dependencies

Note: that will include Rich. Rich is a library to display information on the terminal, it is required, and when installed, it's deeply integrated into cmdcheatsheet to display beautiful output.

License

This project is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmdcheatsheet-0.0.48.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmdcheatsheet-0.0.48-py3-none-any.whl (31.2 kB view details)

Uploaded Python 3

File details

Details for the file cmdcheatsheet-0.0.48.tar.gz.

File metadata

  • Download URL: cmdcheatsheet-0.0.48.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for cmdcheatsheet-0.0.48.tar.gz
Algorithm Hash digest
SHA256 222e923f2be95e3e737ab870bc69c8e59ef8bb3a1a7ab63baee060407ccdbd66
MD5 535b120b85dd26012fcde3886d197878
BLAKE2b-256 58299665931e2096ecbefe51e90950fae4c921d5421fc945da255a33c607db4d

See more details on using hashes here.

File details

Details for the file cmdcheatsheet-0.0.48-py3-none-any.whl.

File metadata

  • Download URL: cmdcheatsheet-0.0.48-py3-none-any.whl
  • Upload date:
  • Size: 31.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for cmdcheatsheet-0.0.48-py3-none-any.whl
Algorithm Hash digest
SHA256 1e4a6dd6160538f94b73b06854b1b38245d89fc7efb2026da63c1df3e57f654d
MD5 a1a753e144841daa09adcf5724069040
BLAKE2b-256 8bc5b1c6b0d986ce960fa9ad12dff37c828f3e22b32a6f414301555ad39edd15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page