Modes

Lacy has three routing modes: Auto (smart detection), Shell (force shell), and Agent (force AI). Switch anytime with Ctrl+Space or the mode command.

Auto mode

The default. Applies the six-rule cascade to classify each input before executing. Commands run in your shell; natural language routes to AI. The indicator glows green or magenta as you type to preview the route.

Auto

Smart routing. Commands → shell. Natural language → agent.

default

Shell mode

All input executes in your shell, no AI routing at all. Useful when you're running scripts, doing careful system work, or don't want AI involved.

The indicator is always green in Shell mode.

bash
mode shell

Agent mode

All input routes to AI, including things that look like shell commands. Useful when you want to have a focused conversation with your AI tool without accidentally running commands.

The indicator is always magenta in Agent mode.

bash
mode agent

Switching modes

Ctrl+Space (keyboard)

Press Ctrl+Space to cycle: Auto → Shell → Agent → Auto. Works in both ZSH and Bash.

mode command

bash
mode           # show current mode + color legend
mode auto      # smart routing
mode shell     # shell only
mode agent     # agent only

Persist to config

Set the default mode in ~/.lacy/config.yaml:

yaml
modes:
  default: auto   # auto | shell | agent

Visual indicators

ZSH

  • Left indicator — colored bar left of your prompt. Green = shell, magenta = agent, gray = neutral.
  • Right prompt (RPS1) — mode badge: SHELL (green) / AGENT (magenta) / AUTO (blue)
  • First-word highlighting — the first word of your input is highlighted green (shell) or magenta (agent) as you type

Bash

  • PS1 badgeSHELL / AGENT / AUTO with matching colors. Updates on each prompt cycle.
Note

Bash can't update the indicator in real-time as you type (no zle-line-pre-redraw equivalent). The badge only updates after each command.