Configure
Context
Context is what makes "delete all my branches that are already merged into main" resolvable. It is also what leaves your machine, so it is worth knowing what each level includes.
The three levels
context: light # none | light | full
Or for one call:
smartly --context none show me the largest files here
none
Your sentence, plus three facts about the machine the command will run on: the
OS, your shell, and whether common tools like sed, date and stat are the
GNU or BSD variants. Nothing about your directory, your repository or your
history.
Use it when the request is self-contained, or when you are in a directory whose file names you would rather not send anywhere.
light — the default
Adds a capped directory listing plus git branch, status and worktree information. This is what lets a vague request resolve against reality:
git branch --merged main | grep -vE '^\*| main$' | xargs git branch -dsmartly could not have produced that pipeline without knowing your branches and what has already merged.
full
Everything in light, plus a tail of your recent shell history — $HISTFILE,
or ~/.zsh_history / ~/.bash_history depending on your shell.
Why smartly checks your tools
On a Mac, “BSD” is only a default. With Homebrew’s coreutils ahead on your
PATH, date and stat are GNU while sed is still BSD, and the right flags
differ for each: date -d against date -v, stat -c against stat -f, and
whether a sed block needs ; before its closing }. So smartly runs
--version on sed, grep, find, xargs, awk, date and stat (a few
milliseconds, in parallel) and tells the model which variant each one is. Only
the variant names are sent, e.g. sed=BSD date=GNU, not paths or versions.
Choosing a level
none | light | full | |
|---|---|---|---|
| Your sentence | Sent | Sent | Sent |
| OS, shell, GNU/BSD tool variants | Sent | Sent | Sent |
| Directory listing (capped) | — | Sent | Sent |
| Git branch, status, worktrees | — | Sent | Sent |
| Recent shell history | — | — | Sent |
light is the default because it is the level at which requests like “it”, “all
worktrees except main” and “the log file in here” start working. If that is not
worth sending a directory listing for a particular request, use --context none
for that request rather than changing the default.