| File | Date | Author | Commit |
|---|---|---|---|
| .github | 2024-03-10 |
|
[a854ca] remove python and codeql workflows. will add se... |
| command_storage | 2025-01-18 |
|
[f7c140] move to v0.1.3 |
| images | 2024-02-28 |
|
[5053fe] update README.md; replace prettytable with tabu... |
| tests | 2024-02-28 |
|
[e7f8f1] rename cmds folder to command_storage |
| .gitignore | 2025-01-02 |
|
[742f8a] ignore sonarqube folders |
| .pre-commit-config.yaml | 2024-03-10 |
|
[ef0951] add black, isort, flake8 to dev dependencies; u... |
| LICENSE | 2024-02-22 |
|
[0ab7e1] Initial commit |
| README.md | 2025-01-18 |
|
[28aa04] add twine for release |
| SECURITY.md | 2024-03-23 |
|
[c7be76] Create SECURITY.md |
| poetry.lock | 2025-01-18 |
|
[28aa04] add twine for release |
| pyproject.toml | 2025-01-18 |
|
[28aa04] add twine for release |
| tox.ini | 2024-02-26 |
|
[a01c84] add initial structure files; |
cmds is a command-line tool designed to store CLI commands for quick access and usage.
Think of it as a simple notes app specifically tailored for storing commands using
customizable keys.
Oftentimes, we find ourselves needing to store certain commands for later use. These may
be commands that are not easily remembered or ones that we find useful but don't want to
keep looking up. Traditionally, we might store these commands in a file and then copy
and paste them into the terminal when needed. Recognizing the need for a more efficient
solution, I decided to create a CLI application to streamline this process.
You can find the project on pip.
Using pip.
pip install command-storage
To build the pypi package locally and push to pypi:
python -m build
# Upload for testing to test pypi
twine upload -r testpypi dist/*
# Upload to pypi
twine upload dist/*
Using brew. Gem file maintained in repository homebrew-command-storage.
brew tap ashu-tosh-kumar/command-storage
brew install command-storage
Using pipx.
pipx install command-storage
NOTE: Initialize the application by running cmds init. Note that if you want to
have cross platform sync of data, you can choose location of file to be inside a drive
installed on your system like Onedrive.
Seeking help.
cmds --help

Storing some commands into the cmds.
cmds store --key "count no of files" --command "ls | wc -l" --description "count no of files in a directory"
cmds store --key "run python test with cov" --command "pytest --cov --cov-report term --cov-report xml:coverage.xml" --description "pytest with cov"
Viewing all commands stored in cmds.
cmds list

cmds [OPTIONS] COMMAND [ARGS]...
Options:
-v, --version: Show cmds version.--help: Show this message and exit.Commands:
delete: Allows deletion of stored command by keyexport: Exports all stored commands into a JSON file.init: Initialize the application.list: Show list of all stored commands.store: Store a new command into cmds.update: Allows updating a stored command by its key.cmds copyAllows copying a command by its key.
Usage:
cmds copy [OPTIONS] [KEY]
Arguments:
[KEY]: Key for the command.Options:
--help: Show this message and exit.cmds deleteAllows deletion of stored command by key
Usage:
cmds delete [OPTIONS] [KEY]
Arguments:
[KEY]Options:
-a, --all: Delete all commands--help: Show this message and exit.cmds exportExports all stored commands into a JSON file.
Usage:
cmds export [OPTIONS]
Options:
-f, --file TEXT: Export file address with extension [default: command_storage_export_2024-02-28 19:37:47.575256.json]--help: Show this message and exit.cmds initInitialize the application. One time process and uses existing config and
data files if available.
Args:
db_path (str, optional): --db-path argument. Defaults to_INITIAL_DB_PATH.
Raises:
typer.Exit: If error in app initialization
typer.Exit: if error in database file initialization
Usage:
cmds init [OPTIONS]
Options:
-db, --db-path TEXT: [default: <home_path>.<home_path_name>_cmds.json]</home_path_name></home_path>--help: Show this message and exit.cmds listShow list of all stored commands. Also supports fuzzy matching on key. Run 'cmds
list --help' to see how.
Usage:
cmds list [OPTIONS] [KEY]
Arguments:
[KEY]: Key for the command.Options:
-l, --limit INTEGER: Number of results to show. 0 means all results. [default: 5]
--help: Show this message and exit.
cmds storeStore a new command into cmds by giving a helpful key name to refer to.
Usage:
cmds store [OPTIONS]
Options:
-k, --key TEXT: Key for the command. [required]-c, --command TEXT: Command to be stored. [required]-des, --description TEXT: Description of command to be stored.--help: Show this message and exit.cmds updateAllows updating a stored command by its key. Also supports changing the key.
Usage:
cmds update [OPTIONS] ORIG_KEY
Arguments:
ORIG_KEY: [required]Options:
-k, --key TEXT: Key for the command.-c, --command TEXT: Command to be stored.-des, --description TEXT: Description of command to be stored.--help: Show this message and exit.0.1.0
0.1.1
0.1.2
list command uses key as argument instead of option for wider applist command supports passing --limit option to limit no. of search results. Workscopy command to allow copying a command by its key.list command. This helps ininit command overwriting existing database file.0.1.3
typer
command_storage.views.cli utils docs.