slashcmd

Natural language to shell commands

$ slashcmd find files larger than 100mb
find . -type f -size +100M
with Python explanation
$ slashcmd top 5 largest directories
du -sh */ | sort -hr | head -5
sizes = {d: get_size(d) for d in listdir(".")}
for d, size in sorted(sizes, reverse=True)[:5]:
    print(f"{size} {d}")
with human explanation
$ slashcmd delete all node_modules folders
find . -name "node_modules" -type d -exec rm -rf {} +
[DANGER] Finds all folders named "node_modules" starting from current directory and deletes them permanently. Cannot be undone.
⚠ DANGER: Command copied to clipboard. Paste to run.

Install

Homebrew
brew install lgandecki/tap/slashcmd
Script
curl -sSL slashcmd.lgandecki.net/install.sh | sh

Inspect script before running

From source
git clone https://github.com/lgandecki/slashcmd && cd slashcmd/cmd && cargo build --release

Usage

slashcmd login                    # Authenticate with GitHub
slashcmd find large files         # Get the command
slashcmd python list all ports    # Explain with Python syntax
slashcmd status                   # Check usage

Shell alias: /cmd() { slashcmd "$@" }

Pricing

Free

$0
  • 100 commands (lifetime)
  • All features included
  • GitHub authentication