freshcrate
Home > AI Agents > lacy

Description

AI Terminal. Speak to your shell.

README

Lacy

Talk to your shell. Commands run. Questions go to AI. No prefixes. No context switching. You just type.

npm version npm downloads GitHub stars License: MIT

Lacy Shell demo — commands run in shell, questions go to AI

Why Lacy?

  • No new tools to learn — Lacy works with your existing AI CLI (Claude Code, Gemini, OpenCode, Codex, Lash). It's a complement, not a replacement.
  • Zero friction — No slash commands, no hotkeys, no separate terminal. Type naturally and Lacy routes it. A real-time color indicator shows you what will happen before you press enter.
  • Smart detection — Lacy classifies input using word analysis, not AI. It's instant. Commands like ls -la stay green (shell). Questions like what files are here turn magenta (AI). If a command fails with natural language patterns, it silently reroutes to AI.

Works with ZSH and Bash 4+ on macOS, Linux, and WSL.

Install

curl -fsSL https://lacy.sh/install | bash
Other methods
# Homebrew
brew tap lacymorrow/tap
brew install lacy

# npx (interactive)
npx lacy

# Manual
git clone https://github.com/lacymorrow/lacy.git ~/.lacy
echo 'source ~/.lacy/lacy.plugin.zsh' >> ~/.zshrc

How It Works

Real-time visual feedback shows what will happen before you hit enter:

Green indicator for shell commands, magenta for AI

Commands execute in your shell. Natural language goes to your AI agent. No prefixes, no context switching — you just type.

Input Routes to Why
ls -la Shell Valid command
what files are here AI Natural language
git status Shell Valid command
do we have a way to install? AI Reserved word — never a real command
fix the bug AI Multi-word, not a command
kill the process on 3000 Shell → AI Valid command, but fails — rerouted
go ahead and fix it Shell → AI "go" is valid, but "ahead" triggers reroute
!rm -rf * Shell ! prefix forces shell

The first word of your input is also syntax-highlighted in real-time: green for shell commands, magenta for AI queries.

Smart rerouting (auto mode): When a valid command contains natural language patterns (3+ bare words with articles, pronouns, etc.) and fails, lacy shows a hint and automatically re-sends it to the AI agent. Shell reserved words like do, then, in, else are routed directly to the agent — they pass command -v but are never standalone commands.

Terminal context: When you ask the AI a question, lacy automatically includes your current directory, git branch, recent commands, and exit codes — but only what changed since your last query. In supported terminals (Kitty, WezTerm), it also captures the visible screen output. Ask "why did that fail?" and the agent sees the error message.

Modes

Shell and Agent mode indicators

Mode Behavior Activate
Auto Smart routing (default) mode auto
Shell Everything to shell mode shell or Ctrl+Space
Agent Everything to AI mode agent or Ctrl+Space

Supported Tools

Lacy auto-detects your installed AI CLI. All tools handle their own auth — no API keys needed.

Supported AI CLI tools

tool set claude    # Use Claude Code
tool set lash      # Use Lash
tool set auto      # Auto-detect (first available)

Or edit ~/.lacy/config.yaml:

agent_tools:
  active: claude # lash, claude, opencode, gemini, codex, custom, or empty for auto

Commands

Command Description
mode Show current mode
mode [shell|agent|auto] Switch mode
tool Show active AI tool
tool set <name> Set AI tool
ask "query" Direct query to AI
Ctrl+Space Toggle between modes

CLI

After installation, the lacy command is available (no Node required):

lacy setup        # Interactive settings (tool, mode, config)
lacy status       # Show installation status
lacy doctor       # Diagnose common issues
lacy update       # Pull latest changes
lacy config edit  # Open config in $EDITOR
lacy uninstall    # Remove Lacy Shell
lacy help         # Show all commands

Uninstall

lacy uninstall
# or
npx lacy --uninstall
# or
curl -fsSL https://lacy.sh/install | bash -s -- --uninstall

Configuration

Config file: ~/.lacy/config.yaml

agent_tools:
  active: claude # lash, claude, opencode, gemini, codex, or empty for auto

modes:
  default: auto # shell, agent, auto

api_keys:
  openai: "sk-..." # Only needed if no CLI tool installed
  anthropic: "sk-ant-..."

Troubleshooting

No AI response — Check tool to see if a tool is detected. Install one: npm i -g lashcode or brew install claude.

Colors not showing — Ensure your terminal supports 256 colors (green=34, magenta=200, blue=75).

Command rerouted unexpectedly — In auto mode, commands with natural language patterns that fail are re-sent to the AI. Switch to mode shell to disable this, or prefix with !.

Emergency bypass — Prefix any command with ! to force shell execution: !rm -rf node_modules

Releasing

Requires Bun, gh, and npm login.

bun run release          # interactive — prompts for patch/minor/major
bun run release patch    # patch bump  (1.5.3 → 1.5.4)
bun run release minor    # minor bump  (1.5.3 → 1.6.0)
bun run release major    # major bump  (1.5.3 → 2.0.0)
bun run release 2.0.0    # explicit version

The script handles the full release flow:

  1. Bumps version in both package.json files
  2. Commits with release: v<version> and tags
  3. Pushes to GitHub and creates a GitHub release
  4. Publishes the npm package (prompts for OTP if required)

Support This Project

Lacy Shell is free and open source. If it saves you time, consider sponsoring the project:

SponsorYour support keeps development active and helps cover infrastructure costs.

Contributions welcome! Check out the issues for good first issues, or open a new one.

License

MIT — see LICENSE.

Release History

VersionChangesUrgencyDate
v1.8.10## Changes - fix: harden telemetry JSON payload against escaping issues (#23) (73cbb44) - feat: delta-based terminal context for agent queries (#22) (d81a6fc) - fix: route quoted paths to shell instead of agent (#19) (b6e2676) - fix: strip trailing punctuation before agent/reserved word matching (27e4cf4) - fix: route quoted paths to shell instead of agent (915d602) - Add GitHub Sponsors section to README (7787f89) - Add GitHub Sponsors funding configuration (5258c55) - chore: remove per-repo FHigh4/21/2026
v1.8.9## Changes - fix: handle Homebrew symlink in uninstall (436cc2c)Medium3/23/2026
v1.8.8## Changes - Release v1.8.8Medium3/23/2026
v1.8.7## Changes - Release v1.8.7Medium3/23/2026
v1.8.6## Changes - refactor: remove dead code from execute.zsh and duplicate comment from execute.bash (e583a35) - fix: use LACY_TOOL_LIST for tool detection instead of hardcoded lash/claude (86fc64b) - auto commit (f6bec2f) - auto commit (adcfa6a) - auto commit (63c4b0e) - ghost suggestion (6d63254)Medium3/23/2026
v1.8.5## Changes - auto commit (efd91f4) - followup-suggest (7b89e8b)Low3/22/2026
v1.8.4## Changes - fix: address PR review — responsive hr, simplify header regex (79ee3eb) - auto commit (38575ee) - Update tests/test_gemini.sh (5330fdc) - auto commit (0f1c80d) - auto commit (9b58155) - auto commit (ef1825d) - auto commit (28a05d0) - auto commit (5594f6d) - auto commit (3b239d8) - review (b1d5d1f) - refactor: address PR #12 review feedback (758bbe5) - auto commit (dcab75c) - fix: resolve Gemini forever spinner by using /dev/null for stdin redirection (10a3d83) - fix: resolve GeminiLow3/13/2026
v1.8.3## Changes - fix opencode resume (a648f0c) - Spinners default to random. (2426f09)Low3/7/2026
v1.8.2## Changes - Release v1.8.2Low3/7/2026
v1.8.1## Changes - auto commit (163e32e)Low3/7/2026
v1.8.0## Changes - Add resume command hint (f2f35b9)Low3/3/2026
v1.7.14## Changes - fix bash quit (79cc9f2)Low2/22/2026
v1.7.13## Changes - auto commit (e05ca47)Low2/22/2026
v1.7.12## Changes - auto commit (09c54a5) - auto commit (456ddd2)Low2/22/2026
v1.7.11-beta.1## Changes - auto commit (1bad8e2)Low2/16/2026
v1.7.11-beta.0## Changes - auto commit (fee83f9)Low2/15/2026
v1.7.10## Changes - save (7012697) - spinner animation (10fd7f1)Low2/13/2026
v1.7.9## Changes - auto commit (0d72c9f)Low2/11/2026
v1.7.8## Changes - auto commit (0ed271e)Low2/11/2026
v1.7.7## Changes - auto commit (2e495fb) - auto commit (73d08cd)Low2/11/2026
v1.7.6## Changes - auto commit (a7f3079) - auto commit (a6baf83)Low2/8/2026
v1.7.5## Changes - Release v1.7.5Low2/7/2026
v1.7.4## Changes - Release v1.7.4Low2/7/2026
v1.7.3## Changes - auto commit (fcff324) - auto commit (04b1bff) - auto commit (361baf3)Low2/7/2026
v1.7.2## Changes - auto commit (39ba6b3) - auto commit (b0f2768)Low2/7/2026
v1.7.1## Changes - Release v1.7.1Low2/7/2026
v1.7.0-beta.4## Changes - auto commit (78bd488)Low2/7/2026
v1.7.0-beta.3## Changes - auto commit (5a90747) - auto commit (f3d949f)Low2/7/2026
v1.7.0-beta.2## Changes - fix: correct stale agent word example and remove fish comments (3e3bc89)Low2/7/2026
v1.7.0-beta.1## Changes - Release v1.7.0-beta.1Low2/7/2026
v1.7.0-beta.0## Changes - auto commit (49c354e) - auto commit (23f7583) - auto commit (323cc5f) - feat: add beta release channel support (e2c2b0e) - auto commit (3ec2833) - auto commit (e5ffa74) - lacy cli command (0900b7e) - auto commit (0ce2c47) - bash (e41aa8f) - save (8d802f4)Low2/7/2026
v1.6.5## Changes - Release v1.6.5Low2/6/2026
v1.6.4## Changes - auto commit (3d1f9b4) - auto commit (e96fd4d)Low2/6/2026
v1.6.3## Changes - fix: replace npm publish skip/cancel with interactive retry menu (e842da8)Low2/6/2026
v1.6.2## Changes - fix: always prompt for OTP on npm publish failure (26d131b)Low2/6/2026
v1.6.1## Changes - fix: improve npm OTP detection and add Homebrew release step (6a46cb5)Low2/6/2026
v1.6.0## Changes - auto commit (ecb0e80) - auto commit (5242c9a) - chore: add release script and sync package versions (f7de901)Low2/6/2026
v1.5.3## Bug Fix - **Fix one-line agent responses being overwritten by prompt** — Agent output produced inside a ZLE widget confused ZSH's cursor tracking, causing the prompt to overwrite short (one-line) results. Agent execution is now deferred to `precmd` where terminal output is properly tracked. ## Improvements - Spinner animation runs at 20fps (was 4fps) for smoother visual feedback - Spinner uses `sleep` instead of `read -t` for more reliable frame timingLow2/6/2026
v1.4.0## What's New - **Post-execution error fallback** — commands with natural language patterns (e.g. `kill the process on localhost:3000`) execute in shell first; if they fail, input is automatically re-routed to the AI agent - **NL marker detection** — counts bare words after the command and checks for strong markers (articles, pronouns, question words, "please"). Requires 3+ bare words to trigger, preventing false positives on inputs like `kill -9 my baby` - **First-word syntax highlighting** — Low2/4/2026
v1.3.0## Agent Preheating Reduce per-query latency by keeping AI agents warm between queries. ### Added - **Background server** for lash and opencode — starts `lash serve` / `opencode serve` in background, routes queries via local REST API to eliminate cold-start - **Claude session reuse** — captures `session_id` from `--output-format json` and passes `--resume` on subsequent queries for conversation continuity - New `preheat` config section with `eager` and `server_port` options - Automatic server Low2/3/2026
v1.2.0## What's New **Custom agent command support** — You can now specify an arbitrary command string as your AI agent backend, instead of being limited to the built-in tool list. ### Usage **At runtime:** ``` tool set custom "claude --dangerously-skip-permissions -p" ``` **In config (`~/.lacy/config.yaml`):** ```yaml agent_tools: active: custom custom_command: "claude --dangerously-skip-permissions -p" ``` **During install:** - Bash installer: option 8 (Custom) or `--tool custom "cmd"` - NoLow2/3/2026
v1.1.1## Fixes - Leading whitespace no longer misroutes input to agent (` ls -la` now correctly executes in shell) - Spinner no longer permanently disables job control (`fg`/`bg` work after AI queries) - Spinner no longer leaves cursor hidden after Ctrl+C interrupts - `exit` no longer shadowed by alias — passes through to shell builtin in shell mode, quits lacy in auto/agent mode ## Improvements - Centralized detection logic into single `lacy_shell_classify_input()` function — indicator and executLow2/3/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

ralph-claude-codeNo descriptionmain@2026-04-21
CodexSkillManager🛠 Manage Codex and Claude Code skills on macOS with this SwiftUI app. Browse, import, and delete skills effortlessly while viewing detailed info.main@2026-04-21
be-my-butlerOrchestrate multiple agents to execute Claude Code workflows with cross-model verification for reliable AI code automation.main@2026-04-21
ai-git-hooksAutomate git workflows with AI-powered hooks that review code, generate and validate commit messages, and scan for bugs and security issues.main@2026-04-21
ralph-wiggum-codexEnable Codex to run objective-first autonomous loops with mandatory review and optional verification for long-running task completionmain@2026-04-21