CLI Reference

lacy is the command you run outside the plugin: install it, check it, point it at a different AI tool, read the query log. It is pure bash with no dependencies, installed to ~/.lacy/bin/lacy.

Note

For the commands Lacy intercepts inside your shell — mode, tool, ask, /new, quit — see the Commands Reference.

Every command

Run lacy with no arguments to open a subshell with Lacy loaded. Run lacy help to print this list in your terminal.

Install and update

CommandWhat it does
lacy installInstall Lacy Shell. Adds the source line to your rc file and ~/.lacy/bin to your PATH.
lacy updateMove to the latest release. Keeps your config.yaml.
lacy reinstallFresh copy of the latest release. Also keeps your config.yaml.
lacy uninstallRemove Lacy Shell. Asks for confirmation when run from a terminal.

Check and configure

CommandWhat it does
lacy setupChange the AI tool, the default mode, or any config value, interactively.
lacy statusInstall path, version, whether your rc file is wired up, the active AI tool, and which AI CLIs it can find.
lacy doctorCheck for the six things that usually break an install. Exits 1 if any check fails.
lacy configPrint ~/.lacy/config.yaml. See the flags below for edit and path.

Sessions, logs, and info

CommandWhat it does
lacy newForget the saved agent session. The next question starts a fresh conversation.
lacy resumePrint the saved session’s tool and id, so you can pick it up in another shell.
lacy logsShow the last 50 logged queries. Off unless you enable it (see below).
lacy changelogFetch and print the latest release notes.
lacy infoA short introduction to what Lacy does and how to try it.
lacy completionsPrint a shell completion script. Defaults to your current shell.
lacy versionPrint the installed version.
lacy helpPrint every command, the in-shell commands, and the environment variables.

Flags and arguments

Three commands take arguments:

bash
lacy config              # print config.yaml
lacy config path         # print the path to config.yaml
lacy config edit         # open it in $EDITOR (falls back to $VISUAL, then vi)

lacy logs                # last 50 queries
lacy logs 200            # last 200 queries
lacy logs all            # every query
lacy logs --count        # how many queries are logged
lacy logs --clear        # delete the log file

lacy completions zsh     # print the zsh completion script
lacy completions bash    # print the bash completion script

To keep completions, write the script somewhere your shell loads it:

bash
# zsh — a directory you own, added to fpath before compinit
mkdir -p ~/.zsh/completions
lacy completions zsh > ~/.zsh/completions/_lacy
# then in ~/.zshrc, above compinit:
#   fpath=(~/.zsh/completions $fpath)

# bash
mkdir -p ~/.local/share/bash-completion/completions
lacy completions bash > ~/.local/share/bash-completion/completions/lacy

Short forms

The dispatcher accepts these aliases. The session commands take a leading slash too, so the muscle memory you build inside Lacy still works outside it.

CommandAlso accepts
lacy statuslacy s
lacy configlacy c, lacy config show
lacy versionlacy -v, lacy --version
lacy helplacy -h, lacy --help
lacy newreset, clear, and each with a slash: /new, /reset, /clear
lacy resumelacy /resume
lacy logs --clearlacy logs -c

Query logging is off by default

lacy logs has nothing to show until you turn logging on. Lacy does not record your questions unless you ask it to.

yaml
# ~/.lacy/config.yaml
logging:
  queries: true

Once enabled, each query is appended to ~/.lacy/logs/queries.log as a tab-separated line of timestamp, tool, and the raw query. No terminal context is written. The directory is 0700 and the file is 0600, and the log is trimmed to the last 1000 lines once it passes 1 MB.

When update and reinstall refuse

Both commands rewrite ~/.lacy, so they stop rather than clobber an install they did not create:

If ~/.lacy isUpdate instead with
A symlink created by Homebrewbrew upgrade lacymorrow/tap/lacy
A symlink to your own git checkoutgit pull in that checkout
A git checkout with uncommitted changesCommit or stash first, then run lacy update

What doctor checks

lacy doctor is the first thing to run when Lacy is installed but nothing happens. It checks, in order:

  1. The plugin file exists in ~/.lacy
  2. Your rc file has an uncommented source line for it
  3. Bash users are on Bash 4 or newer (macOS ships 3.2, which Lacy refuses)
  4. config.yaml exists
  5. The configured AI tool is on your PATH, or auto-detect can find one
  6. ~/.lacy/bin is on your PATH

Every failed check prints the command that fixes it. The exit code is 1 if anything failed, so you can use it in a script. For the longer list of symptoms and causes, see Troubleshooting.

The Node UI, and skipping it

setup, install, and uninstall try npx --yes lacy@latest first, which gives you the @clack/prompts interface. If Node is missing or the fetch fails, they fall back to the bash implementation and behave the same way.

bash
LACY_NO_NODE=1 lacy setup   # bash prompts, no npx round-trip

Environment variables

VariableEffect
LACY_NO_NODE=1Never shell out to npx. Use the bash path everywhere.
NO_COLOR=1Plain output, no escape sequences. TERM=dumb does the same.
LACY_REFInstall a specific tag or branch instead of the newest release.
DO_NOT_TRACK=1Send no telemetry. LACY_NO_TELEMETRY=1 does the same.

Lacy reports an anonymous event when it is installed, updated, or removed, and one first_load event the first time the plugin loads. Never your queries, never your commands. The full list is on the privacy page.

Next