This guide covers everything you need to know about building, running, using, and deploying the Command Shortner CLI.
Clone the repository and install dependencies:
git clone <your-repo-url>
cd command-shortner-cli
npm installRun the CLI immediately without building:
npm run dev -- --help
# Example:
npm run dev -- listCompile the TypeScript source code into the dist directory:
npm run buildSymlink the package globally to test it as if it were installed from NPM:
npm link
# Now you can use the command globally:
boost list(To unlink later: npm unlink -g command-shortner)
Follow these steps to deploy a new version to the NPM registry.
Ensure you are logged in to your NPM account:
npm loginMake sure the project builds clean and tests pass:
npm run build
npm testUpdate the version in package.json (also creates a git tag):
# For a patch release (0.0.X):
npm version patch
# For a minor release (0.X.0):
npm version minor
# For a major release (X.0.0):
npm version majorPush the package to NPM:
npm publish --access publicThe CLI is packed with features to boost your productivity. The main command is boost.
| Command | Usage | Description |
|---|---|---|
| Add | boost add <alias> "<command>" |
Create a new shortcut. Ex: boost add gs "git status" |
| Run | boost run <alias> |
Execute a saved command. Ex: boost run gs |
| List | boost list |
Show all saved aliases in a formatted table. |
| Remove | boost remove <alias> |
Delete an alias. |
Launch a Terminal User Interface (TUI) to manage commands with a menu system.
boost interactiveRun multiple aliases sequentially in a single go.
boost chain-alias alias1,alias2,alias3
# Or via interactive menuShare your commands or move them to a new machine.
# Export all commands to a JSON file
boost export ./my-commands.json
# Import commands from a JSON file
boost import ./my-commands.jsonIf you face execution policy errors on Windows PowerShell:
boost fix-windowsYou don't always need to type run. If the alias matches the internal logic, you can execute it directly (depends on implementation), but run is the explicit method.
Run strict unit and integration tests to ensure stability:
npm testsrc/: Source Codecommands/: Individual command logic.core/: Configuration and Execution logic.utils/: UI and helpers.
dist/: Compiled JavaScript (Production).scripts/: Post-install hooks.bin/: Executable entry points.