pacs-cli 0.1.0-beta.3

Project Aware Command Storage - A CLI for managing and running saved shell commands
Documentation

pacs

Project Aware Command Storage - A CLI for managing and running saved shell commands.

Install

cargo install pacs@0.1.0-beta.2

Usage

pacs add build "cargo build"    # save a command
pacs run build                  # run it
pacs ls                         # list all commands
pacs edit build                 # edit in $EDITOR
pacs rm build                   # delete it

pacs project add myproj         # create a project
pacs project activate myproj    # set active project
pacs project deactivate         # clear active project

Example Output

# pacs ls

── Global ──
hello-world
echo "Hello World"

── myproj ──
get-pods:
kubectl --context dev get pods -o wide

Contexts and Placeholders

Use double curly braces to mark placeholders:

pacs add get-pods -t k8s 'kubectl --context {{kube-context}} get pods -o wide'

Define project-specific contexts and values (for the active project):

pacs context add dev
pacs context edit
pacs context list
pacs context activate dev

Listing, running, and copying with a specific context (active project):

pacs ls -c dev
pacs run get-pods -c dev
pacs copy get-pods -c dev

Notes:

  • If no active context is set (or values are missing), pacs shows the raw unexpanded command.
  • If active context is set and context values are defined, pacs expands the command before listing, running or copying it.

Shell Completions

Zsh (~/.zshrc):

source <(COMPLETE=zsh pacs)

Bash (~/.bashrc):

source <(COMPLETE=bash pacs)

Fish (~/.config/fish/config.fish):

source (COMPLETE=fish pacs | psub)