Tell your shell
what you mean.
You know what. smartly knows how.
smartly sends one plain English sentence to an LLM, validates the reply is a single shell command line, and runs it. For people who know what they want to do and would rather not remember the exact flags.
Install
brew install rizwanreza/tap/smartlygo install github.com/rizwanreza/smartly-cli/cmd/smartly@latestThen run smartly onboard to pick a provider, a model and an execution mode.
The transform
Say the outcome. Get the command.
Auto-run is the default, so the second line is what actually ran. How to put a gate in front of it.
What it does
Commands without the ceremony.
- english → command
One sentence in, one command out
Describe the result. smartly returns a single executable shell command — pipes,
&&and redirects allowed, multi-step scripts never.- macos + linux
Knows which userland it is on
It accounts for GNU versus BSD differences, so the same request produces
sed -i ''on macOS andsed -ion Linux.- dir + git
Reads the room
By default it sends a capped directory listing plus your git branch, status and worktrees, so “all worktrees except main” resolves against what is actually there.
- four providers
Your model, your billing
Anthropic and OpenAI by API key, or your own logged-in
claude/codexCLI session if you already pay for a subscription.- four ways to run
Four ways to run it
autoruns the command immediately and is the default.confirmasks[y/N]every time,confirm-destructiveasks on anything it doesn’t recognise as safe, and--dry-runprints the command and runs nothing.
Before you install it
Auto-run is the default.
smartly generates a command and runs it immediately, with no confirmation prompt — including when that command is destructive. Under auto nothing inspects what the command does; the only check is that the model returned exactly one clean command line.
That is the product working as intended, and it is the setting most worth reconsidering on a machine where a wrong rm costs you something. Three ways to change it:
confirm Ask me every time
Prints the command and waits for [y/N]. Reads/dev/tty directly, and fails closed when there is no terminal.
# ~/.config/smartly/config.yaml
execution:
mode: confirmconfirm-destructive Ask me when it is not clearly safe
A local classifier reads the generated command and asks on anything it doesn’t recognise as safe — destructive or unrecognised alike. A best-effort seatbelt, not a sandbox: to see every command, useconfirm.
# ~/.config/smartly/config.yaml
execution:
mode: confirm-destructive--dry-run Just show me
Prints the command and does nothing else. The right flag for a phrasing you are not sure about yet.
smartly --dry-run remove every merged branchProviders
Four backends. Bring an API key or your existing CLI login.
anthropic and openai call an API with your own key. claude-cli and codex-cli shell out to a CLI you are already logged into — slower, but no second bill. Andopenai speaks to any OpenAI-compatible endpoint, including a local vLLM, Ollama or LM Studio.
| Provider | Authentication | Worth knowing |
|---|---|---|
anthropic | ANTHROPIC_API_KEY | The default. Nothing to configure beyond the key. |
openai | OPENAI_API_KEY | Ships no default model — set providers.openai.model yourself. |
claude-cli | Your logged-in claude session | No tool access at all. Model is required in config. |
codex-cli | Your logged-in codex session | Runs --sandbox read-only, but is still agentic while composing. |
Describe the result.
Skip the flag archaeology.
brew install rizwanreza/tap/smartlygo install github.com/rizwanreza/smartly-cli/cmd/smartly@latest