r/commandline • u/MalloyDelacroix • 7h ago
Command Line Interface CmdBox: A CLI tool for storing, organizing, and quickly running shell commands with named variables
Enable HLS to view with audio, or disable this notification
https://github.com/PhantomLambSoft/CmdBox
CmdBox is a CLI tool that lets you save and quickly recall commands by name. It lets you store commands with named variables, like <host> and <port>, and either prompts you for values at runtime or lets you store values so they are reusable in several commands.
I hated having to try and remember or google complex commands that I didn't use often, and I especially hated having to type tedious commands that I used a lot, so I built this tool to make this easier.
The main goal is that it is very quick to run commands. Command aliases can be kept short and parameter values let you type less or create several commands using the same variables for even faster use. All it takes to run a command is cb command-name.
Some of its other features:
- Stored execution context per command (working directory, shell, environment variables, and timeout) with runtime override
- Multi-line command templates executed as scripts
- Tag based organization and filtering
- Field based search across commands and variables
- Import and export for sharing commands
- Configurable global settings for shell, output capture, color, and more
- Command execution history with the ability to rerun past executions
- A shell function (
cbe) that lets you run commands in your current shell session, likecdor activating a virtual environment
It is installable via pip, pip install cmdbox-cli, and works on Windows, Linux, and macOS.
AI disclaimer:
This software's code is partially AI-generated - Only in test files and docstrings. All implementation code is written by me.
Similar projects:
pet offers comparable core functionality (saving commands).

