Skip to content

Using the CLI

The CLI installs as lai.

bash
lai "what is using port 8080?"       # one-shot prompt
cat error.log | lai "explain this"    # pipe stdin into the prompt
lai chat                              # interactive REPL (Ctrl-D / 'exit' to quit)

lai providers                         # list providers and whether a key is set
lai models openai                     # list known models for a provider
lai auth anthropic                    # store an API key in the OS keyring
lai config                            # show config + data file locations

lai -p openai -m gpt-4o "hello"       # override provider/model for one run
lai -y "tidy up ~/Downloads"          # auto-approve tool actions for this run

Flags

FlagDescription
-p, --provider <name>Provider to use (overrides config default)
-m, --model <id>Model to use (overrides config default)
-y, --yesAuto-approve mutating tool actions for this run

Subcommands

CommandDescription
lai chatInteractive REPL with streaming responses
lai providersList configured providers and key status
lai models <provider>List known models for a provider
lai auth <provider>Store an API key in the OS keyring
lai configPrint config and data file locations

Anything that isn't a subcommand is treated as a one-shot prompt, so lai "summarize this repo" just works. Piped stdin is appended to the prompt, which makes lai composable with the rest of your shell.

Released under the MIT License.