integration

Using Claude Code with Lacy Shell

Type questions in your terminal. They go to Claude automatically.

How it works

When Claude Code is your active AI tool, Lacy routes natural language queries to it using claude -p "your query". You don’t type claude yourself. You just type your question and press enter.

Shell commands still run normally. git status runs in your shell. “What changed in the last commit?” goes to Claude. The indicator next to your prompt shows which will happen before you press enter.

Setup

  1. Install Lacy: curl -fsSL https://lacy.sh/install | bash
  2. Install Claude Code: npm install -g @anthropic-ai/claude-code
  3. Set Claude as your tool: tool set claude

Or skip step 3. If Claude Code is the only AI CLI installed, Lacy auto-detects it.

What you get

Without LacyWith Lacy
claude -p "explain this error"explain this error
claude -p "what does this function do"what does this function do
claude -p "fix the failing test"fix the failing test

Session continuity

Lacy uses Claude’s --resume flag to maintain conversation context across queries. Your second question knows about the first. Type /new to start a fresh session.

Context awareness

When you ask Claude a question through Lacy, it automatically includes context: your current directory, git branch, recent commands, and the last exit code. If you’re in a tmux session, it can capture recent terminal output too.

So “why did that fail?” after a broken build actually has the context to answer.

When to use Claude Code directly

Lacy routes one-shot queries to Claude. For longer interactive sessions where you want Claude’s full REPL (multi-turn editing, file creation, tool use), launch claude directly. Lacy handles the quick questions; Claude’s interactive mode handles the deep work.

Real-time feedback

As you type, the indicator tells you where your input will go:

  • Green = shell (e.g., npm test)
  • Magenta = Claude (e.g., why is this test failing)

No surprises. You always know what will happen before you hit enter.