Skip to content
hyuricanePublic

About

A fast, keyboard-driven CLI and TUI tool to store, manage, and instantly trigger command-line shortcuts and workflows.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

31 Commits

Folders and files

Repository files navigation

cmdpp (Command Plus Plus)

A fast, keyboard-driven CLI and TUI tool to store, manage, and instantly trigger command-line shortcuts and workflows.

Features

  • CLI and TUI Modes: Use fast terminal subcommands or launch the interactive TUI picker.
  • Store & Manage: Save long or complex commands with friendly alias names and optional descriptions.
  • Instant TUI Picker: Launch cmdpp to search, preview, and hit Enter to run any command directly in your shell.
  • Built-in Search: Real-time filtering across command names, scripts, and descriptions.
  • Clipboard Integration: Press c in the TUI to copy any command to your system clipboard (Wayland / X11 / OSC 52 supported).
  • Pager Integration: cmdpp list automatically pipes output through more when run in an interactive terminal.
  • Execution Tracking: Tracks execution counts and last-run timestamps for each command.
  • In-TUI Add & Edit: Add (a) or edit (e) commands right inside the TUI without leaving your keyboard.
  • Named Arguments & Defaults: Template commands with ${VAR:-default} or ${VAR} with interactive parameter modals in TUI and prompts in CLI.

Installation

Ensure ~/.local/bin is in your $PATH (standard on modern Linux and macOS systems).

Option 1: Automated Install (Linux & macOS - Recommended)

The installer automatically detects your operating system and architecture (x86_64 or arm64), downloads the latest release with live progress, and installs the binary to ~/.local/bin/cmdpp:

Using curl:

curl -fsSL https://raw.githubusercontent.com/hyuricane/cmdpp/master/install.sh | bash

Using wget:

wget -qO- https://raw.githubusercontent.com/hyuricane/cmdpp/master/install.sh | bash

(Optional: You can specify a custom install directory by setting BINDIR, e.g.: curl -fsSL ... | BINDIR=/usr/local/bin bash)


Option 2: Manual Binary Download

If you prefer to download and extract pre-compiled binaries manually without running the script:

  • Linux (x86_64 / amd64):

    mkdir -p ~/.local/bin
    curl -sSL https://github.com/hyuricane/cmdpp/releases/download/v0.2.2/cmdpp_0.2.2_linux_amd64.tar.gz | tar -xz -C ~/.local/bin ./cmdpp
  • Linux (ARM64 / aarch64):

    mkdir -p ~/.local/bin
    curl -sSL https://github.com/hyuricane/cmdpp/releases/download/v0.2.2/cmdpp_0.2.2_linux_arm64.tar.gz | tar -xz -C ~/.local/bin ./cmdpp
  • macOS (Apple Silicon - M1/M2/M3/M4 / arm64):

    mkdir -p ~/.local/bin
    curl -sSL https://github.com/hyuricane/cmdpp/releases/download/v0.2.2/cmdpp_0.2.2_darwin_arm64.tar.gz | tar -xz -C ~/.local/bin ./cmdpp
  • macOS (Intel / amd64):

    mkdir -p ~/.local/bin
    curl -sSL https://github.com/hyuricane/cmdpp/releases/download/v0.2.2/cmdpp_0.2.2_darwin_amd64.tar.gz | tar -xz -C ~/.local/bin ./cmdpp
  • Windows & Checksums: Download .zip packages for Windows (amd64 / arm64) and checksums.txt from the GitHub Releases Page.


Option 3: Using go install

If you have Go (1.22+) installed:

go install github.com/hyuricane/cmdpp@latest

Option 4: Build from Source

git clone https://github.com/hyuricane/cmdpp.git
cd cmdpp
make install

(By default, installs to ~/.local/bin/cmdpp. You can customize the location with PREFIX=/usr/local make install)


Verifying Release Artifacts

All release archives (.tar.gz, .zip) and checksums.txt (starting from release v0.2.2) are built reproducibly and cryptographically signed with GitHub Artifact Attestations powered by Sigstore.

You can verify the provenance and integrity of any downloaded release artifact using the GitHub CLI:

gh attestation verify <path-to-file> --repo hyuricane/cmdpp

Example:

gh attestation verify cmdpp_0.2.2_linux_amd64.tar.gz --repo hyuricane/cmdpp

Or verify the checksum manifest:

# Verify checksums.txt provenance
gh attestation verify checksums.txt --repo hyuricane/cmdpp

# Verify downloaded archives against checksums
sha256sum --ignore-missing -c checksums.txt

Configuration

Configuration and stored commands are saved in JSON format at:

~/.config/cmdpp/commands.json

Usage

1. Store a Command

cmdpp add <name> --cmd "<command>" [--desc "<description>"]

Example:

cmdpp add tunnel-one --cmd "ssh -N -L user@ssh.example.org"
cmdpp add tunnel-one --cmd "ssh -N -L user@ssh.example.org" --desc "SSH tunnel to jump host"

2. Run a Stored Command

cmdpp run <name> [extra args...]

Example:

cmdpp run tunnel-one

Any extra arguments are automatically passed along to the executed command.

3. Named Input Arguments & Defaults

You can parameterize commands with reusable placeholders:

  • ${VAR:-default}: Optional parameter with a default value.
  • ${VAR}: Required parameter without a default.
  • \${VAR}: Escaped literal ${VAR} (ignored by cmdpp).

Example:

cmdpp add tunnel --cmd 'ssh -N -L ${PORT:-3000}:127.0.0.1:${PORT:-3000} user@host.com'

When executing:

  • Interactive TUI: Pressing Enter opens the Parameters Modal:
    • [Enter]: Runs the command (on the last/single field) or advances to the next field.
    • [Tab] / [Shift+Tab]: Navigates between fields.
    • [Esc]: Cancels and returns to the command list.
  • CLI: Prompts interactively if omitted, or supply overrides directly:
    cmdpp run tunnel            # Prompts: PORT [3000]: (press Enter to accept default)
    cmdpp run tunnel PORT=8080  # Overrides PORT directly without prompting

4. Launch Interactive TUI Picker

Simply run cmdpp without arguments:

cmdpp

Select a command with ↑/↓ (or j/k) and press Enter to execute it directly.

TUI Keyboard Shortcuts

Key Action
Enter Execute selected command
/ Focus search / filter bar
↑ / ↓ or k / j Move selection
a Add a new command via dialog
e Edit the selected command
d or x Delete selected command (with confirmation)
c Copy command to clipboard
Esc Clear filter / cancel modal
q / Ctrl+C Quit without running

5. List Stored Commands

cmdpp list

Uses the more pager when running in an interactive terminal, or writes cleanly to stdout when piped. To disable the pager explicitly:

cmdpp list --no-pager

6. Delete a Stored Command

cmdpp rm <name>

(Aliases: cmdpp remove <name>, cmdpp delete <name>)

7. Help & Documentation

cmdpp --help

About

A fast, keyboard-driven CLI and TUI tool to store, manage, and instantly trigger command-line shortcuts and workflows.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages