{"slug": "show-hn-smartly-plain-english-to-shell-commands-with-gnu-bsd-awareness", "title": "Show HN: Smartly – Plain English to shell commands, with GNU/BSD awareness", "summary": "Developer Rizwan Reza released Smartly, a CLI tool that sends one plain English sentence to an LLM, validates the reply is a single shell command line, and runs it, with install via `brew install rizwanreza/tap/smartly` or `go install github.com/rizwanreza/smartly-cli/cmd/smartly@latest`. Smartly detects whether tools like `sed`, `date` and `stat` are GNU or BSD on the host and writes matching flags, sends a capped directory listing plus git branch, status and worktrees as context, and supports four providers (anthropic, openai, claude-cli, codex-cli) and four execution modes (auto, confirm, confirm-destructive, --dry-run). Auto-run is the default and executes generated commands immediately with no confirmation, including destructive ones, so the tool's own documentation recommends switching to confirm or confirm-destructive on machines where a wrong `rm` is costly.", "body_md": "# Tell your shell\n\nwhat you mean.\n\nYou know what. smartly knows how.\n\nsmartly 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.\n\nInstall\n\n`brew install rizwanreza/tap/smartly`` go install github.com/rizwanreza/smartly-cli/cmd/smartly@latest`\nThen run `smartly onboard` to pick a provider, a model and an execution mode.\n\nThe transform\n\n## Say the outcome. Get the command.\n\nWhat it does\n\n## Commands without the ceremony.\n\n- english → command\n- ### One sentence in, one command outDescribe the result. smartly returns a single executable shell command — pipes, `&&` and redirects allowed, multi-step scripts never.\n- macos + linux\n- ### Knows which userland it is onIt checks whether `sed` ,`date` ,`stat` and friends are GNU or BSD on your machine — a Mac with Homebrew coreutils has both — and writes flags that work with the ones you have:`sed -i ''` for BSD,`date -d` for GNU.\n- dir + git\n- ### Reads the roomBy 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.\n- four providers\n- ### Your model, your billingAnthropic and OpenAI by API key, or your own logged-in `claude` /`codex` CLI session if you already pay for a subscription.\n- four ways to run\n- ### Four ways to run it`auto` runs the command immediately and is the default.`confirm` asks`[y/N]` every time,`confirm-destructive` asks on anything it doesn’t recognise as safe, and`--dry-run` prints the command and runs nothing.\n- learn mode\n- ### Shows how the command works`--learn` prints the command, then breaks it down piece by piece: each flag, pipe and argument with what it does, colour-matched to the command above. Nothing runs.\n\nBefore you install it\n\n## Auto-run is the default.\n\nsmartly 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.\n\nThat 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:\n\nconfirm Ask me every time\n\nPrints the command and waits for `[y/N]`. Reads`/dev/tty` directly, and fails closed when there is no terminal.\n\n```\n# ~/.config/smartly/config.yaml\nexecution:\n  mode: confirm\n```\n\nconfirm-destructive Ask me when it is not clearly safe\n\nA 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, use`confirm`.\n\n```\n# ~/.config/smartly/config.yaml\nexecution:\n  mode: confirm-destructive\n```\n\n--dry-run Just show me\n\nPrints the command and does nothing else. The right flag for a phrasing you are not sure about yet.\n\n```\nsmartly --dry-run remove every merged branch\n```\n\nProviders\n\n## Four backends. Bring an API key or your existing CLI login.\n\n`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. And`openai` speaks to any OpenAI-compatible endpoint, including a local vLLM, Ollama or LM Studio.\n\n| Provider | Authentication | Worth knowing | \n|---|---|---|\n| `anthropic` | ANTHROPIC_API_KEY | The default. Nothing to configure beyond the key. | \n| `openai` | OPENAI_API_KEY | Ships no default model — set providers.openai.model yourself. | \n| `claude-cli` | Your logged-in claude session | No API key: uses your Claude subscription. No tool access at all. | \n| `codex-cli` | Your logged-in codex session | No API key: uses your ChatGPT subscription. Runs --sandbox read-only. | \n\n## Describe the result.\n\nSkip the flag archaeology.\n\n`brew install rizwanreza/tap/smartly`` go install github.com/rizwanreza/smartly-cli/cmd/smartly@latest`", "url": "https://wpnews.pro/news/show-hn-smartly-plain-english-to-shell-commands-with-gnu-bsd-awareness", "canonical_source": "https://smartlycli.com/", "published_at": "2026-10-01 01:54:44+00:00", "updated_at": "2026-10-01 02:18:38.700353+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "large-language-models", "ai-agents"], "entities": ["Smartly", "Rizwan Reza", "Anthropic", "OpenAI", "Claude", "Codex", "Homebrew", "vLLM"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/show-hn-smartly-plain-english-to-shell-commands-with-gnu-bsd-awareness", "markdown": "https://wpnews.pro/news/show-hn-smartly-plain-english-to-shell-commands-with-gnu-bsd-awareness.md", "text": "https://wpnews.pro/news/show-hn-smartly-plain-english-to-shell-commands-with-gnu-bsd-awareness.txt", "jsonld": "https://wpnews.pro/news/show-hn-smartly-plain-english-to-shell-commands-with-gnu-bsd-awareness.jsonld"}}