Skip to content

v0.1.3

Choose a tag to compare

@github-actions github-actions released this 08 Aug 13:25
· 8 commits to main since this release

Tell your shell what you mean. smartly 0.1.3 turns a plain
English sentence into one executable shell command.

Install

go install github.com/rizwanreza/smartly-cli/cmd/smartly@v0.1.3

Or download a binary below (macOS and Linux, amd64 and arm64 — verify
with checksums.txt).

Docs: https://smartlycli.com/

The shell wrapper no longer eval's output that isn't a command.

brew install rizwanreza/tap/smartly

What changed

smartly init bash|zsh broke every invocation that doesn't generate a
command.
The wrapper shadows the binary with a function that runs
smartly --print-only "$@" and evals stdout — and it did that for
everything, including the commands that print prose for a human:

smartly --help       (eval):8: parse error near `\n'
smartly config show  × unknown flag: --print-only
smartly init zsh     same — so re-sourcing an rc file errored
smartly onboard      same — onboarding was unusable once installed
smartly --version    printed one line, which eval'd cleanly and
                     re-entered the wrapper as a prompt: a real API
                     call, and its reply executed, for a request
                     nobody typed

The wrapper now hands subcommands, -h/--help, --version and the
no-argument case straight to the binary. That list is rendered from the
live command tree rather than written out by hand, and a test asserts it
covers every registered command — a stale list fails silently and badly,
by sending the subcommand name to the model and eval-ing the reply.

If you have the wrapper installed, re-source your rc file after
upgrading, or just open a new shell.

Go 1.25.12 and golang.org/x/sys 0.44.0, clearing the open
advisories. No behavior change.

Documentation

The website still said smartly had no destructive-command detector. It
has had one since v0.1.0: execution.mode: confirm-destructive reads
each generated command with a local static classifier and asks on
anything it doesn't recognize as safe. The site now documents the mode,
its three verdicts and its limits — see
Execution and safety.

The README also claimed color was enabled when stdout is a terminal; it
gates on stderr, which is where smartly's own output goes.

Worth knowing

  • Auto-run is still the default, including for destructive commands. Put
    --dry-run on your first few requests, or run smartly onboard and
    pick a confirmation mode.
  • The classifier is a best-effort seatbelt, not a sandbox. It reads text,
    not intent. If you want to see every command before it runs, use
    confirm, not confirm-destructive.

Full diff: v0.1.2...v0.1.3