feelcouchLagrange
RU
Install

Lagrange — user guide

Russian original: ../guide.md. How to use the kit day to day: what lives where, how to launch tasks, work by voice, search history and tune things to your liking. Reference for every hotkey and file — ../reference.html. Open this guide: cchelp. Short terminal help (5 hotkeys, skill list) — cc-help. Map of all docs — ../README.md.

Contents: 1. First 5 minutes · 2. A normal day · 3. The panel · 4. Voice · 5. History · 6. Terminal · 7. macOS · 8. Settings · 9. Spending tokens wisely · 10. If something isn't working · Skills and commands.

One interactive scene on the start page shows the terminal, assistant and workspace with neutral fixture data. The guide does not repeat UI screenshots: it keeps only instructions, diagrams and examples. JPEG regression artifacts stay in the local cache.

1. First 5 minutes

  1. Install: curl -fsSLo /tmp/lagrange-install https://lagrange.feelcouch.date/install.sh && bash /tmp/lagrange-install, or from a clone ./install.sh. Every component is checked by default; uncheck what you don't need with Space, Enter to continue. Preview the plan first: ./install.sh --dry-run.
  2. Grant Hammerspoon access when the installer opens System Settings:
    • Accessibility — for hotkeys and text insertion;
    • Microphone — for voice.
  3. Open a new Ghostty tab. The welcome screen shows sessions, services and the main commands; on the very first run it also shows a short 5-step hint (panel, dictation, history ⌃⌥Y and the hub ⌃⌥H, palette/docs/window switcher, "Skill from history" in Settings). Below that — two rows of hotkeys: panel, new tab, switcher, voice; history, reset layout ⌃⌥0, settings, hub. Repeat the hint — ccwelcome --tour. In the panel itself, while the chat feed is empty, the very first run also shows a "Welcome to Lagrange" card with three buttons: open "Help" (see §8), open the palette, "Got it" (dismiss for good) — shown once (a flag kept in hs.settings).
  4. Verify everything works: ./install.sh --check.
  5. Hammerspoon enables its own login launch (hs.autoLaunch(true)) — after a Mac reboot the panel, hotkeys and voice are back with no extra steps; the --check line "Hammerspoon autolaunch" confirms it.
  6. Transparency: ./install.sh --explain prints what would be installed and with which license, every network call (host, size, required/optional — the single source of truth is install/network.tsv) and what the installer never touches — without installing anything. The same "Network"/"Safety" block is shown before the confirmation prompt in a normal run and under --dry-run.

Three run modes:

Mode Flag Behavior
Interactive (default) — summary → checklist → confirmation
Silent --silent (-q) no prompts (like --yes), one PASS/FAIL/SKIP line per step, full log in ~/.cache/claude-cowork/install.log; the network downloads for voice/local_model (whisper/embedding models, see install/network.tsv) are skipped by default — --with-optional turns them on
Update --update git pull --ff-only only on a clean tree, shows the plan first (--dry-run just shows it) and re-runs only the components whose files changed since the last install (~/.cache/claude-cowork/installed-rev; no marker — every component re-runs); rollback: git checkout <rev> && ./install.sh --update

Passwords: reconciling managers (module passwords, optional)

cc-passwords reconciles Apple Passwords and NordPass CSV exports locally: plan (creates the LagrangePW RAM disk, prints the export path) → merge (report only: duplicates and long-unchanged entries) → merge --write → import merged.csv into both managers → clean (ejects the RAM disk, the data is gone). Files wider than 600 are rejected; the output has only counters and domains, no network, no AI. A reminder every N weeks: cc-passwords remind on N (off by default). Why there is no auto-sync and what we recommend — docs/passwords.md.

The lagrange-* packages share portable plugin manifests for Claude and Codex. lagrange-core provides setup/health skills and a bridge to the installed local MCP runtime. Preset selection and reviewed Codex hooks are separate upcoming work; hooks are never trusted automatically. See docs/dev/plugins.md.

2. A normal day

What you need How
A new task ⌃⌥Space → /ai <task>; Lagrange selects an allowed CLI and shows the route before running it
A task by ticket in the same field, OPS-123 or OPS-123 what to do. Claude reads the ticket and proposes a plan
A task in a specific project the @ project chip in the smart field; in the terminal — cd <project> && ai <task>
Not sure which project leave 📁 Auto: the project is picked from the task text, or you get chips to choose from / "+ New"
Send text into the current tab ⌥⏎ in the panel field
Which task is waiting on me the 🔔 counter in the menu bar; ⌃⌥W — jump to the next waiting one
Jump to any session ⌃⌥J and start typing the topic or project
Morning digest "More" → "What's today" or /today
Close out a task /done: checks, a commit and MR, a draft ticket comment
Context got long /handoff: a short capsule and a new tab instead of a long session
All features in one place ⌃⌥H — the cchub hub
Typed in the wrong keyboard layout (Cyrillic as Latin or the reverse) ⌃⌥L — converts the selected text in place; nothing selected — converts the last word before the cursor; in Ghostty select the text with the mouse. The input layout switches itself

Statuses are the same everywhere: 🔔 waiting for you · ⏳ working · ✅ done · 💤 open/idle. While background agents are still running in a tab it stays ⏳ with an agent count (⏳2) rather than 🔔; 🔔 with agents running means only a permission request.

3. The panel

A floating Hammerspoon panel next to the terminal: the smart field, a chat feed and a session list, the entry point to everything else (Projects, History, Stats, Settings, palette, help).

Show/hide: ⌃⌥P · cursor into the field — ⌃⌥Space · restore the layout — ⌃⌥0. Size: the header icon cycles Mini → Normal → Wide, or ⌃⌥=/⌃⌥−.

Tabs, input field and layout

Chat and the assistant

What it is: the "Chat" tab — a feed of your tasks and answers (local/Claude), cards for executed commands and a built-in chat with Claude Code itself (not the local model) right in the panel. Open: ⌘1 — the "Chat" tab; pick a model on the chip (haiku/sonnet/opus, not "auto") and ⏎ — a conversation with the assistant in this tab; ⌃⏎ in the field — a shortcut to the assistant with a fixed model, without touching the chip. Main points: the "Now" card with the active session's current step; commands//-commands as a card without opening a terminal; the assistant's answer streams in with Markdown and code highlighting; "New chat" restarts the conversation with the model; an action card ("Run" / "Terminal" / "New session") only on click.

Web chats: cc-ask and @chatgpt

Optional module web-ask (off in the installer): ask ChatGPT, Gemini or Perplexity. cc-ask goes to the subscription CLI first (codex exec, gemini -p) and to a web chat only on quota or with --web, using a session you signed in to in a separate Chrome profile "AI" (--via cli|web|auto, default auto). Your account and your browser session, one request at a time; cookies and passwords are not read.

⚠ Warning. Automating a web UI may violate the site's terms of use — read them yourself; personal use only, your own account, one request at a time. Chrome's "Allow JavaScript from Apple Events" lets local scripts run JS in any tab of the profile, including signed-in services: enable it only in a dedicated profile (no bank, mail or work systems). cc-ask never uses the main profile.

Enable: install.sh --with=web-ask; in Chrome — "View → Developer → Allow JavaScript from Apple Events" — only in the AI profile; without that profile cc-ask refuses with a hint; sign in to the sites you need. cc-ask sites shows where a sign-in is visible.

Examples:

Exit codes: 3 — not signed in or the site changed its layout (claude/webask-sites.json), 4 — timeout (--timeout), 5 — JavaScript from Apple Events is off. Details and risks — docs/webask.md.

"Projects"

What it is: a separate IDE-like window — a project tree on the left, tabs of open files with previews on the right (syntax-highlighted code, Markdown, HTML, CSV/TSV, JSON, images, Mermaid/PlantUML diagrams). Open: ⌃⌥F, /projects, the folder icon in the panel header, pj [file] in the terminal, hammerspoon://cc-projects?path=FILE&line=N, ⌘-click on a folder name in the Claude status line, "Open in Projects" on a file in "History". Main points: ⌘P — quick file search by name; ⌘⇧F — full-text search across the project (cchist find); PlantUML and (if the library is present) Mermaid are rendered locally; "Open in editor" / "Show in Finder" / "Copy path" / "Ask Claude about this file"; breadcrumbs and navigation history (⌘[/⌘]); HTML — a sandboxed frame with no scripts, "View · Code".

Palette and window switcher

What it is: one fuzzy-search field over project files, open and past sessions, "History", smart-field commands and Settings sections; separately, an MRU switcher for Lagrange windows. Open: ⌃⌥O or /palette — the palette; hold ⌃⌥ and press Tab/⇧Tab — the switcher. Main points: ↑↓ select, Enter opens in the right window, Tab on a file — an "Open in…" menu, ⌘1…5 — filter by type, > — commands only, Esc — close; one overlay per screen (the palette and the switcher never stack).

Help

What it is: a built-in documentation browser — the reference for every hotkey and command, what's new, the project overview, this guide, the architecture, the current plan — without leaving for a browser. Open: ⌃⌥D, the "?" icon in the panel header, the "Help" button in chat and on the assistant card, /docs or /help in the smart field, "Help" in the 🤖 menu. Main points: buttons on top — Back/Forward, Reference, What's New, Overview, Guide, Architecture, Plan, "In browser"; Markdown pages redraw themselves when the source is newer.

Chrome per space (module chrome-spaces, optional)

What it is: every space has its own Chrome profile — name, theme colour, start tabs, bookmarks; links from Lagrange open in the space's profile by host (hosts in spaces.json). With the module off, links go to the default browser as before. Recommended: less memory, battery saving, the built-in password manager off if you use an external one; extensions — uBlock Origin Lite, the space's password manager and Claude (own account per profile), the rest optional (Dark Reader is heavier). Each item can be turned off in ~/.config/claude-cowork/chrome-spaces.json (sample — claude/chrome-spaces.example.json). How: cc-chrome-spaces plan — what would change (writes nothing) → apply --yes (Chrome quits — unsaved form input may be lost — and restarts, tabs come back; verified Chrome versions only, otherwise apply refuses unless --force-version; start tabs only with --startup; Chrome's protected (HMAC) keys are never edited, they are printed as "set by hand"; backup in ~/.cache/claude-cowork/chrome-backup/) → extensions ID --open opens the Web Store pages, you install them. Roll back: cc-chrome-spaces rollback restores the last backup; to switch it off entirely — ./install.sh --without=chrome-spaces. More — docs/chrome-spaces.md.

What it is: the 🤖 icon in the macOS menu bar — session status and access to the main windows without opening the panel. Open: click the 🤖 icon. Main points: an N⏳ M🔔 counter and a session list (dead processes are removed automatically); the top items are Help, What's New, Palette, Projects, History, Stats, "Reload Lagrange" (hammerspoon/macos/menuextra.lua), then "Panel ▸ Restore dismissed".

Board

The seventh workspace tab (⌘7, hammerspoon://cc-roadmap, palette "roadmap") is the task board of a project's backlog/: columns planned, open, in progress, done (last 14 days), epics with progress on top. Read-only: statuses change only through scripts (docs/dev/roadmap.md). Pick the project in the list at the top (remembered); arrows move focus, Enter opens the card on the right (description, criteria, dependencies, plan, journal, PROJECT:TASK-N references jump to another project's board), Esc closes it. "Open in browser" starts backlog browser for that repository. The project home (Overview) shows a "Board:" line with counts and a "Board" button; a project without backlog/ gets "Plan: cc-roadmap init" (prints the plan in the panel) and, after that, "Create the board". The tab exists only while the roadmap module is on (dev preset).

4. Voice

Dictation into any field:

Live dialog (⌃⌥V or the 🎧 button next to 🎤 in the panel field) — a voice conversation with Claude. A long press on the same button turns on the standing "Claude" mode. Live replies land in the "Chat" tab's feed, and an empty chat shows a "🎧 Live" button, a hint about what the input field does (task / /command / history search), up to 3 recent real conversations (click to jump to that session) and a "New conversation" button:

Voice commands. The Mac itself understands these, no tokens spent. They work in Live and from the microphone button in the panel. Everything else goes to Claude as plain text.

Say What happens
"create a new tab with task …", "new task …", "open a new session …" (+ "in project X") a new Claude tab, the text after those words is the prompt; the project comes from "in project X", otherwise it's picked automatically
"new project demo" a new tab with "New project demo (newp)"
"open / go to " focuses the matching tab; if there's no tab, a new one opens in the project's folder
"search history for …", "find in history …" the query goes into the panel's search
"stop", "that's enough", "cancel" turns Live off
"status", "who's waiting" says out loud how many tabs are waiting for a reply

"Create a ticket in YouTrack / GitLab …" is not a command — the phrase goes to Claude. The command table lives in code: M.COMMANDS in hammerspoon/live/live.lua. Parsing goes through one function, live.classify(text), which can later plug in a local model via live.classifier.

Recognition is fully local (whisper.cpp): audio never leaves the Mac. The server starts on first key press and unloads itself after 10 minutes idle.

The 🤖 menu-bar counter shows 🎙 while any dictation is running, and 👂 while the standing mode is listening (see below) — so you can see what the Mac is currently writing without opening the panel. The separate dictation item appears only during recording and speech processing, then hides; hotkeys and the panel microphone button remain available. In the panel itself the same voice activity shows as a level indicator while you speak.

Voice for spoken answers. Live and the standing mode speak the answer through a system voice: the kit picks the best installed Russian voice — Premium, then Enhanced, otherwise the default ("Milena"). If Enhanced/Premium isn't installed, a hint on where to download it for free is shown once (not on every launch): System Settings → Accessibility → Spoken Content → System voice → Manage Voices.

Standing mode ("Claude, …")

The Mac listens all the time and reacts only to phrases starting with the word "Claude" (the Russian wake phrase also accepts a couple of common mishearings of it).

How to turn it on: ⌃⌥K, menu 🤖 → "Standing "Claude" mode", or a long press (0.6 s) on the Live button in the panel. The choice is remembered. While the mode is listening, 👂🤖 lights up in the menu bar, and the panel shows a strip "Listening for "Claude"…" with an "Off" button. macOS also shows the orange microphone dot.

Say What happens
"Claude, create a task to check the disk" a new Claude tab with the task "check the disk" (the project is picked automatically; "in project X" also works)
"Claude, go to the chat history" focuses the matching tab, or opens a new one in the project's folder
"Claude, write to him: run the tests" the text goes into the current Claude tab with Enter
"Claude, how many tasks are waiting?", "Claude, who's waiting?" a spoken answer based on tab statuses, no model involved
"Claude, how many minutes in three hours?", "Claude, what is DNS?" a short spoken answer from the local model, also shown as a tooltip in the panel
"Claude, stop" interrupts speech; if nothing is playing — turns the mode off
"Claude, stop listening" turns the mode off

All the voice commands from the table above also work here, after "Claude". If it's unclear where to send the phrase, the Mac asks out loud: "New tab or the current one?". Answer within 6 s, without saying "Claude" again: "new", "current" or "cancel".

The speech threshold adapts to room noise, so "Claude" is heard even said quietly. If the mode reacts to background noise, raise live.vadMin (default 0.0015).

Pauses itself: when Live (⌃⌥V) is on, dictation is running, the screen is locked, the Mac is asleep, or free memory is low. It turns back on by itself afterward.

Privacy: everything runs locally. Speech without "Claude" is discarded immediately: not saved, not logged. Microphone audio sits in a temp folder for under a minute (deleted once read), and the cut phrase only exists while recognition is running. Phrases longer than 8 s aren't recognized at all. General-question answers come from a small model, Qwen3.5-2B (Apache-2.0), on your Mac. It loads on the first question and unloads after 15 minutes without one. The model is installed by the installer ("LOCAL MODEL") or via cchist ask --on. Without it, the mode only answers questions about tabs.

A different voice (optional). If none of the say voices suit you, you can install the local TTS engine Piper (free, MIT) — voice/piper-tts.sh --install, details and voice licenses in docs/dev/voice.md. Nothing is installed by default.

Accuracy for your own terms:

5. History: where it's stored and how to search it

What it is: one permanent archive for the selected sources — Claude Code, Codex and other local CLIs found on this Mac. It includes headless runs, text and semantic search, similar sessions, summaries, host cards and a secrets audit. Open: the "Time machine" window — ⌃⌥Y or the "History" button on the panel; from the terminal — cchist/chs/cs. Main points: search by entry type (commands/edits/files/tables/links), export to .md/.html, resume a session by id, recall something similar (recall), host cards, a secrets audit and token spend.

Where it's stored and how to search from the terminal

Claude Code stores sessions under ~/.claude/projects/ and eventually deletes them. The kit disables that cleanup and additionally copies everything into a permanent archive.

What Where
Sessions (archive) <repo>/archive.nosync/projects/ (.nosync keeps it out of iCloud; the path can be changed with CCHIST_ARCHIVE)
Search index <repo>/archive.nosync/index.sqlite (SQLite FTS5)
Monthly journal <repo>/archive.nosync/JOURNAL.md
Versions of your Claude settings <repo>/archive.nosync/config/ (git: CLAUDE.md, settings, skills, hooks, agents)
Live sessions (for the panel) ~/.cache/claude-tabs/
/handoff capsules ~/.cache/claude-handoff/

The archive refreshes itself: on session start and end, and before context compaction. Manually — cchist sync.

Command What it does
chs words find it in your own prompts
cchist search "words" -p project find it across a project's messages
cchist search --semantic "in your own words" best-matching sessions by meaning (FTS + the local model, if enabled)
cchist suggest "fragment" sessions, projects and commands in one list — what the panel's smart field shows
cs pick a past session and resume it
cchist resume ID resume a session even if Claude Code already deleted it
cchist week what you did this week
the "History" button on the panel the same, through the UI
cchist export --all [-p project] [--since date] every session to Markdown, one file per session
cchist import claude-desktop Claude Desktop (agent mode) sessions into the shared archive; other sources — see "Import" in docs/dev/history-search.md
cchist search word --type cmd commands only; types: cmd file read edit write rm mv table code field link

The "History" window (time machine)

Opened with the "History" button on the panel or ⌃⌥Y. The same ⌃⌥Y, Esc or ⌘W hides it. Sessions on the left, that session's feed on the right, a scroll ruler on the right edge: orange marks are tool calls, blue marks are search matches. Above the session list — sort chips "recent" (default) · "by project" · "by length" (message count); the choice is remembered. A separate chip with a session count is shown for every source present in the current selection. Availability and background sync are controlled in Settings → Integrations → Import history. The window title is capped at ~60 characters (a long one is truncated with "…"); headless runs are collapsed by default into one "Automatic · N" row at the bottom of the list (click expands it), several sessions in a row with the same title collapse into one row marked "×N".

What Claude and Lagrange do with the archive on their own

Claude recalls the past on its own. Before every one of your messages, the cc-recall hook searches the archive for similar sessions (cchist recall). If it finds one, it adds up to 3 short lines to Claude's context (~60 tokens), and Claude opens that session only if it's actually relevant. Nothing found — nothing added. So you don't need to re-ask "how did we do this before…".

Semantic search (optional). cchist embed --on downloads the local model Qwen3-Embedding-0.6B (610 MB, Apache-2.0) and finds sessions even when you describe them in different words: 97.5% vs. 80% for plain search on our benchmark. The model comes up on its own on the first query (~1 GB RAM) and unloads after 15 minutes idle; cchist embed --off turns it off. Details — docs/dev/history-search.md.

Session summaries and host cards. When a session closes, cchist summarize writes three lines in the background: "Done / Left / Where it's recorded". They show up in cchist list, recall, and Claude's own suggestions, so "what's next?" already has an answer. cchist hosts lists the hosts you've worked with over ssh/ansible; cchist hosts web-01 shows a card: sessions, recent commands, facts. If a message mentions a known host, Claude gets a line linking to its card.

Archive backup. The archive is the only copy of all your chats (deliberately kept out of iCloud). cc-backup --status shows the age of the last Time Machine backup and copies under CC_BACKUP_DIR; cc-backup copies the archive and Claude settings to a connected drive (never deleting anything there). cc-nightly is one-shot maintenance: sync, missing vectors, summaries, cards, backup check.

Secrets and permissions audit, token usage. cchist audit is a read-only check of ~/.claude and the archive: secrets (gitleaks + personal patterns from ~/.config/claude-cowork/private-patterns), risky permissions (Bash(*), rm -rf, sudo, piping into sh) and third-party hooks in settings.json. It never prints values — only file:line, the rule id and an abcd*** preview. cc-nightly runs it once a week and notifies on findings. cchist usage [--days N] [--project name] — tokens and session counts per project over a period, from stats already collected locally: no network, no price list.

Dismissing a task from the panel is not the same as deleting it from history: history is never deleted. The archive is your data — don't send it out and don't commit it (it's in .gitignore).

6. Terminal

Ghostty + zsh, wired in with source <repo>/shell/cowork.zsh in ~/.zshrc (install.sh adds this line).

Commands

Command What it does
ai [task] let cc-ai choose Claude/Codex/local/Antigravity and open the work in a new Ghostty tab; without a task, show providers and limits
cn, cw, cq, cpl legacy Claude-compatible aliases; use ai for new setups
cchub every feature
cclean close forgotten sessions older than a day (each one is 300–700 MB); -n — preview only
mdview file.md open a Markdown file as a page (-o file.html — where to save it); files over 1 MB use the built-in converter, 3–4x faster than pandoc
mdview file.html HTML → Markdown (exact, via pandoc; without it, the built-in converter)
ccpaste (or ⌃⌥B) save the clipboard (ccpaste - — from stdin, e.g. kubectl logs x | ccpaste -) to a file under ~/.cache/claude-cowork/paste/ and put @path on the clipboard — paste it into chat (⌃⌥B inserts @path straight into the current window) instead of a whole long log
cchelp this guide

Welcome screen: ccwelcome (--full — with a session list). Turn it off with CC_WELCOME=0 in Settings. The "Local AI" block only shows what's installed (models under ~/.local/share/cchist/, wake.lua) and not blocked by low memory (cc-memok).

A parallel task — a separate worktree. cc-wt new <repo> <name> creates <repo>.wt/<name> (a git worktree with branch wt/<name>) and opens a tab there — a second task in the same repository doesn't get in the first one's way. cc-wt list [--json] [<repo>] — what exists, cc-wt diff <repo> <name> — what changed, cc-wt merge <repo> <name> — merge into the source branch (locally, no push; the merge commit only lands if cc-merge-check passes — leaks, personal paths, Cyrillic in code, syntax; the same by hand: cc-merge-check [--staged | <ref>]), cc-wt rm <repo> <name> — delete it (refuses if there are unmerged commits, unless --force). Same thing — the "🌳 Parallel task in a worktree" item in cchub.

Maintenance

Observability and background checks for the kit — with little or no model use, reading only files and log tails.

Window screenshots cc-uishot. Small JPEGs of every Lagrange window (panel, "Projects", "History", "Stats", Settings, help, palette) under ~/.cache/claude-cowork/ui/ — so you can eyeball look, theme and background. cc-uishot — every window, cc-uishot stats — one, cc-uishot --changed main — only windows touched by the diff; cc-uishot ok stats marks one as checked, cc-uishot --status shows what changed since the last mark. Marking cc-uishot ok <window> remembers the snapshot as a baseline; every later snapshot is then compared to it and tagged same 0.4% or DIFF 6.1% (threshold — CC_UISHOT_TOL, 1.5% by default), cc-uishot --diff compares already-taken snapshots without shooting new ones. Only windows marked DIFF need a look.

UI button audit cc-uiaudit. A static check (no live Hammerspoon, under 2 seconds): for every window (panel, "Projects", "History", Settings, Stats, palette, window switcher) it cross-checks what the JS sends (post({...}), onclick) against what Lua actually handles. DEAD — a button with no handler (must be fixed, otherwise cc-uiaudit and tests/terminal.sh fail), UNUSED — a handler with no button (informational, a removal candidate), UNLABELED — an icon button with no title/aria-label, KEYS — a window that hasn't wired up the shared keys yet (⌘1..9/Esc/⌘F/?, see docs/system-map.md), DUPICON — the same SVG icon copied into 2+ files (informational).

Quick performance checkup. cc-bench runs a set of measurements in the background (ccwelcome startup, search, the biggest session, mdview on 3 MB, panel rendering, memory and idle CPU for Hammerspoon, whisper/llama memory, the longest source files), each with its own timeout. It prints one bench … summary line, plus a REGRESS … line if something got more than 1.3x slower than the previous run. Full results are saved under ~/.cache/claude-cowork/bench/. --quick skips the heavy measurements, --show shows the previous run.

Background agent progress. cc-agents prints one line per agent: state (run/idle/ done), when it last wrote anything, its last step, how many commits are on its branch and how many files are uncommitted. No model call — only file tails are read. --hours N sets the window, --all shows every agent. --tabs adds live Claude tabs: status, project and the last request (first 60 characters; a request that looks like it holds a secret is hidden). --save saves the summary to ~/.cache/claude-cowork/status/latest.md plus a dated copy; copies are kept for 30 days. Open the summary with mdview ~/.cache/claude-cowork/status/latest.md.

What did we forget, what's next. The backlog skill ("what did we forget", "roadmap") calls cc-backlog -n 30. It returns your last 30 requests by project, the latest commits and the open board tasks. The skill cross-checks them against commits and agents, adds forgotten items to the board (backlog task create) and proposes a numbered roadmap. The model doesn't reread the whole conversation, so it barely spends tokens.

Restore sessions after a Ghostty crash. Ghostty has window-save-state = always — tabs and folders come back on their own, but the Claude Code process inside them doesn't: after a crash/restart the tab is open, but there's no session in it anymore. Hammerspoon snapshots the list of live sessions every ~2 minutes and on Ghostty startup (if the snapshot has sessions missing among the live ones) offers a "Restore N sessions · Open · Never mind" notification — "Open" reopens each one as a tab via cwin --resume. The same list appears on the welcome screen (ccwelcome) as a "Restore N sessions: /restore in the panel or cc-restore run" line, and manually: cc-restore list — what can be restored, cc-restore run --all (or specific SIDs) — restore them, cc-restore snapshot — take a snapshot now. Never closes or ends anything — only opens new tabs. The panel command is /restore.

Scheduled tasks. cc-sched is a local scheduler with no daemons or launchd: jobs live in ~/.config/claude-cowork/schedule.json, the Hammerspoon module scheduler.lua (the installer adds it to init.lua, it starts on its own) keeps one timer for the next-due job (hs.timer.doAt), reacts to file edits and catches up on missed runs after the Mac wakes from sleep. Schedule formats — daily HH:MM, weekdays HH:MM, mon,thu HH:MM, every Nh|Nm, once YYYY-MM-DD HH:MM. cc-sched add|list|run|rm|log|templates manages jobs from the terminal; a job is one of three kinds: shell (any command), claude (headless claude -p, read-only by default — --permission-mode plan, write access only if explicitly set with "write":true, plus a daily run cap), local (goes to the local model, cchist ask). Shared safeguards: don't run under low memory or without a network, at most one job at a time, a per-job timeout, secrets masked in logs (~/.cache/claude-cowork/sched/<job>/) with the same rules cchist audit uses. Ready-made templates (cc-sched templates) are all off by default: morning-digest (a digest of yesterday's activity, tickets and unread mail via bin/cc-mail, from the local model) and git-fetch (fetch and check repositories) are general-purpose; nightly and weekly-audit are opt-in, for those who run their own overnight maintenance/audit (cc-nightly, cchist audit --quick/usage); updates-check — once a week, bin/cc-update check (macOS, Homebrew, mas, Claude Code), report only, nothing is installed. Result notification — a normal macOS notify with an "Open log" button; the same card (job name, done/error, reason, "Log", "Run again") appears in the panel feed, "Chat" tab.

Checking for updates. bin/cc-update check — one line per source: macOS updates (softwareupdate -l, up to 60 s), brew outdated (formulae and casks separately), mas outdated (only if mas is installed — not a required dependency), the claude version against npm (skipped without a network). --json — the same, machine-readable. cc-update plan prints exactly the commands apply will run (brew upgrade, brew upgrade --cask, mas upgrade); the kit never installs macOS updates itself — it only prints softwareupdate -ia as a hint. cc-update apply [brew|casks|mas] saves brew list --versions under ~/.cache/claude-cowork/update/ (for a rollback — brew install <formula>@<version>, if that version exists) and writes one line to the cc-log journal.

Mac updates. cc-update plan (same as plan --dry-run) shows the groups: A — weekly (brew, cask, mas, npm without majors; no reboot), B — when convenient (a running app's cask: quit within 10 s, update, reopen; if it did not quit because of unsaved work — skipped, never killed), C — network with a reboot (softwareupdate -ia, the kit never installs it). cc-update apply [A|B] prints the plan first. The Claude Code CLI is not updated while any claude session runs (claude, skipped (session running)); --claude enables it only when there are none. mas runs without dialogs: a sign-in prompt or timeout means a skip.

Lagrange's own change log. Every action that changes something (install.sh, cc-tweaks apply, /eco on/off, a scheduler job run) writes one line to ~/.local/state/claude-cowork/audit/YYYY-MM.jsonl. View it: cc-log show (-n 50, --source cc-eco). Kept for a year (90 days if under 5 GB free), values that look like secrets are masked. No model call — zero tokens.

Project overview and diagrams — cc-docgen. In any repository with a docs/ folder: cc-docgen --html renders docs/diagrams/*.puml diagrams to SVG (local PlantUML, only the ones that changed) and writes docs/overview.md (+ .html):

What changed. Per-version changes live in CHANGELOG.md and the docs/whatsnew/ pages; bin/cc-roadmap changelog <tag> drafts entries from the board tasks closed since that tag.

The file isn't edited by hand — just rerun the generator. --check exits 1 if a diagram didn't build (for CI). The sysdoc skill (/sysdoc) writes diagrams and docs for a system; Lagrange's own architecture — architecture.md, the current overview — overview.md. PlantUML is a separate install: brew install plantuml (GPL, needs Java).

Every diagram under docs/diagrams/*.puml includes one shared theme, docs/diagrams/_lagrange.iuml (!include _lagrange.iuml as its first line) instead of its own skinparam — one font, palette and accent color #0a84ff, matching the rest of the panel (hammerspoon/web/common.css), so cards read well on both light and dark pages. The mdview pages (guide, roadmap, overview) use the same tokens from one file, hammerspoon/web/doc.css — so diagrams and text pages read as one product.

What Claude is doing right now: while a long task runs, the status line shows a short pulse — » step · N steps · time (e.g. » edit foo.py · 5 steps · 3m); the same shows as a longer line in the 🤖 menu next to sessions with ⏳ status.

Missing a command on the Mac: if a Bash call fails with "command not found" and it's not an ssh/ansible/docker exec/kubectl exec command (meaning the tool really isn't on this Mac), Claude offers brew install … and — in this repository — a new line in deps.tsv.

Module hammerspoon/macos/macos.lua.

8. Settings

File ~/.config/claude-cowork/config, open it via menu 🤖 → "Open settings…".

Key What it sets
CC_ROOTS folders with projects
CC_TICKET_DIR default folder for tasks opened from a ticket
CC_TICKET_PROJECTS your tracker projects ("OPS WEB"). Empty means a bare ticket number is written out in full
CC_MODEL / CC_MODEL_ALT models for ⏎ and ⌘⏎
CC_THEME auto, light or dark
CC_WELCOME welcome screen
CC_AUTOSUBMIT press Enter after dictation in a terminal (1 by default)
CC_MEM_HEADROOM_MB memory headroom (MB) before starting a local model (dictation, semantic search); default 1500
CC_AUTO_MODEL 1 (default) — model picked from the task text: prod, incident, architecture → Opus; help, status, "where" → Sonnet; with no clear signal, the local model decides, if it's running. 0 — always use the panel's model
CC_BACKUP_DIR an external-drive folder for cc-backup; CC_BACKUP_MAX_DAYS — days without a backup before warning (3)
CC_LOCAL_MODELS=0 never run local models, even if there's enough memory
CC_PANEL_ORIENT panel orientation: v (vertical, default), h (horizontal), auto (by screen)
CC_STAGE_GAP width (px) of the strip on the left for Stage Manager, when it's on; default 110
CC_LANG interface language: auto (default — the macOS language, ru if unrecognized), ru, en. Russian stays the default

Anything picked from a menu or on the panel (theme, model, view) is remembered on its own and overrides the file.

Settings window

What it is: one window for all Lagrange settings — general/panel/voice/models/connections/ help. Open: ⌃⌥, (comma), the /settings command in the smart field, or the hammerspoon://cc-settings link. Main points: toggles apply immediately, no Hammerspoon restart needed; "Reset section" — back to defaults; the same thing from the terminal — ccset.

Sections: General · Panel · Voice · Stay Awake · Models · Local Model · Notifications · Permissions · Connections · Import · Help. Toggles and lists apply immediately, no Hammerspoon restart needed; "Reset section" restores all of a section's keys to their defaults. Keys from ~/.config/claude-cowork/config (the table above) are shown read-only — editing them is still done by hand, in the file.

Help (the last section): how to get started (panel ⌃⌥P, palette ⌃⌥O, docs ⌃⌥D, history ⌃⌥Y, projects ⌃⌥F, voice ⌃⌥V), buttons to "Guide"/"Reference"/"What's new" in the built-in docs browser, "Show the hint again" (opens ccwelcome --tour in a new Ghostty tab) and the current Lagrange version.

Interface language (the "General" section, key CC_LANG) — Auto/Russian/English; switching immediately rebuilds the panel (no Hammerspoon restart). Default — Russian (or the macOS language in "Auto" mode). Translated so far: the "History" window (time machine), the wide panel, the "Chat" tab, smart-field suggestions, the built-in assistant, macOS notifications, "Stay awake", "Restore sessions" and the terminal welcome screen (ccwelcome); the panel itself (panel.lua) and part of the Settings window text are still in Russian regardless of CC_LANG — translation continues as those files get touched.

The same key list is available from the terminal — ccset list | get KEY | set KEY VALUE | reset KEY; an unknown key or an invalid value is rejected immediately, without going through Hammerspoon.

Stats

What it is: the 5-hour/weekly limits, charts (tokens/day, top projects, local model vs. Claude, the cc-bench trend), rule-based recommendations, a "Mac" block (memory, CPU, disk, battery). Open: the /stats command in the smart field, the "Open Stats" button in Settings' "Stats" section, the hammerspoon://cc-stats link, "Stats" in the 🤖 menu, or the window switcher ⌃⌥Tab. Main points: real limits from the cached status line (no network); library-free inline SVG charts; recommendation cards with an action button ("Run audit", "Open History", …); a Mac snapshot on "Refresh".

The "Stats" window always opens scrolled to the top, with nothing to scroll down for. Top to bottom: limits (the real percentage and reset time from the status line's cache, /tmp/claude/statusline-<profile>.json, if it's fresh; without it, the older token-based estimate against the values in Settings, labeled as an estimate, since Anthropic doesn't publish exact limits without that cache), an "Overview" from cchist week, charts (tokens per day over 14 days, the top 5 projects, local model vs. Claude, the cc-bench trend) — all inline SVG, no libraries and no network; recommendations (3–5 cards from simple rules — a dominant project, a day with frequent cache misses, idle CPU above the 5% budget, a cc-bench regression, a session over 50 MB, outdated brew packages (cc-tweaks audit --json), the current project has no CLAUDE.md (suggests repo-analyst) — each with its own action button instead of a generic "Open": "Run audit", "Do /handoff", "Open History", "Open the performance trend"). A separate "Mac" block — memory, swap, CPU load, the top 5 processes by CPU/RAM, disk space, battery and up to 3 plain-language hints (not low_disk/big_swap); the snapshot is taken on "Refresh" or when the window opens, in the background, with no timers.

In the "Stats" section of Settings there are only two limit fields (5 hours / 7 days), an empty field shows the placeholder "auto (estimate)" and one line explaining it, with no duplicate title card; the "Open Stats" button is right there too.

Move settings to another Mac: ccset export [FILE] saves settings into one .json file (default — ~/Documents/lagrange-settings-<date>.json). The file includes widgets, connections (addresses, no tokens), documentation sites, config and panel keys: theme, model, modes, pinned sessions. It does not include Keychain tokens, private-patterns, window positions or runtime state. ccset import FILE shows what would change; with --apply it first saves the current settings under ~/.config/claude-cowork/backup/, then applies the file and reloads Hammerspoon. config itself isn't overwritten: the command prints the lines you need to add by hand. Tokens on the new Mac are entered again: ccset token set NAME.

"Check" (the "General" section) — a button that runs cchist audit --quick --json in the background: a fast check (under a second) of secrets/personal patterns in settings.json/settings.local.json and ~/.claude/memory, plus broad permissions (Bash(*), rm -rf, sudo, piping into sh/bash) and unknown hooks in the live settings. A full sweep of ~/.claude and the archive (slower, up to minutes) still runs on schedule in bin/cc-nightly. Secret values are never shown anywhere — only file:line, the rule and a 4-character preview. While a check is running, clicking again doesn't start a second one. "Open report" opens the saved JSON (~/.cache/claude-cowork/audit-report.json) in the system viewer.

The "Check" card (same section, below "Spend over 7 days") — a snapshot of the kit's health: the latest cc-bench regression (or "no regressions", with a row button "Open the performance trend" that opens the "Stats" window), gitleaks status (clean / secrets found / not installed, with the time of the last run, a button — "Run in terminal", a separate Ghostty tab with a real scan), the cc-i18n scan violation count (Cyrillic outside docs/i18n — should be 0, a button — "Run scan") and the last lines of the shared log (cc-log show, no separate row button). "Refresh" at the bottom of the card still refreshes all four rows at once. Computed once when the "General" section opens and again on "Refresh" — in the background, the window doesn't hang.

"Spend over 7 days" (the "General" section) — tokens (in/out/cache) by project over the last N days from cchist usage --json (no network, no price list — it's archive.nosync/index.sqlite, already filled by cchist sync/index-projects), plus how many tasks the local model closed in the same window. Cached by the archive's and local model's log modification time — clicking again without changes doesn't rerun cchist.

"Tune for me" (the "General" section) — the "Refresh suggestions" button looks at anonymous stats (cchist stats: how many times you forgot to reply to a waiting session, late sessions, average gap between sessions — no text or content) and proposes up to 5 changes with "Apply" checkboxes; nothing is applied on its own. The Russian-language reason is written by the local model if it's currently available (a default rule otherwise if memory is low); the model can only reorder and rephrase the reason — it can't propose a new key or value, and any odd answer is discarded entirely. "Discuss with Claude" opens the suggestions in a new tab.

"Local model" — everything about Qwen3.5-2B on this Mac:

Values are stored in Hammerspoon and mirrored into ~/.config/claude-cowork/local-model.json (read by cchist ask, cc-route triage and the MCP server). From the terminal: ccset set LOCAL_ENABLED false, ccset set LOCAL_TOOLS local_find,local_ask (a single name toggles just that one, - disables all).

Energy and battery. Heavy background jobs that the user isn't waiting on (history sync, project reindexing, cc-nightly's nightly steps) start at a lowered priority (efficiency cores, taskpolicy -b/nice) so they don't slow down the panel or the active session. On battery or in low-power mode, background timers (the session snapshot for restore, history-sync throttling) stretch out 3x; interactive search and the history feed run as usual. Details — docs/dev/local-llm.md.

Usage statistics

Shows what you use and what you barely touch (a candidate for changing or switching off). Only a counter is written: a kind (page, cmd, cli, slash, skill) and a name — pages, panel buttons, kit commands, /slash commands and Claude Code skills; no arguments, paths or prompt text. Everything is local: ~/.cache/claude-cowork/usage/YYYY-MM.jsonl, nothing leaves the Mac and nothing reaches the session archive.

See it: cc-usage report [--days 30] [--json] or Stats → the "Usage" block; "rarely" means ≤ 2 hits in the window and produces a "switch the module off" recommendation. cc-usage prune keeps 180 days. Turn it off: CC_USAGE_OFF=1 (Hammerspoon, zsh and the hook all check it) or delete the usage/ directory. Details — docs/dev/usage.md.

Eco mode

One button (/eco in the smart field, cc-eco status) to push the Mac toward maximum sleep without losing the internet, Claude Code or the terminal: cc-eco on freezes (SIGSTOP) non-essential GUI apps from a list (browsers, mail, chat, office, IDEs, music — a default list in code, your own list in ~/.config/claude-cowork/eco.json, keys freeze/allow) and unloads local models (whisper-server via launchctl bootout, if running; chat/embedding — history/cchist ask --off/embed --off); the terminal, claude, the network, VPN and Hammerspoon itself are never touched. cc-eco off brings everything back (SIGCONT, launchctl bootstrap for whisper-server) — the state lives in ~/.cache/claude-cowork/eco-state.json, so a Hammerspoon restart doesn't lose the frozen list. cc-eco plan is the same as a dry run, nothing is touched. The kit never runs sudo actions (pmset) — plan only prints the command as a hint.

Stay awake

While Claude, Codex, or another provider from providers.tsv is working (⏳), or Claude is waiting for a reply (🔔), the Mac doesn't enter idle system sleep (hs.caffeinate.set, no sudo/pmset). The display still turns off on its normal displaysleep schedule, and lid-close or an explicit Sleep command still works. Modes: auto (default — stays awake while there's work/a wait; a forgotten question lets the Mac sleep after at most grace+60 minutes), timer (for N minutes/hours or until a time), off. 5 minutes before a timer ends, a notification offers "Extend by an hour". A recent session step (a cc-tab pulse in the last 5 minutes) also counts as work, even if the tab's icon hasn't updated. If ~/.hammerspoon/idle.lua (a personal module, outside the repo) has a standing sleep block (holdSleep = true), "Stay awake" doesn't lift it — neither at "off" nor when a timer ends.

Control: the /awake command (status) in the smart field, or cc-awake from the terminal — cc-awake 2h, cc-awake 90m, cc-awake until 8:00, cc-awake auto, cc-awake off, cc-awake status, cc-awake grace 60 (grace period in minutes). The mode and grace period are also in the Settings window, "Stay awake" section.

Commands, skills and connections

Lagrange self-monitoring

bin/cc-selfmon watches Lagrange itself for bloat and leaks: Hammerspoon CPU/memory and its WebKit processes, local model servers, claude processes, Hammerspoon open files, sizes of ~/.cache/claude-cowork subfolders, the history archive, /tmp/claude*, Lagrange logs and each Claude profile's projects/, free disk. A snapshot is one JSON line in ~/.cache/claude-cowork/selfmon/YYYY-MM-DD.jsonl (private, kept 14 days).

Spaces "work" and "personal" (optional)

What. The optional spaces module: the file ~/.config/claude-cowork/spaces.json splits your work into spaces. Each has a name, colour, Claude profile, a list of allowed AIs (any provider and model can be bound to any space), project folders and hosts.

Why. Work projects run under the work profile and only with the AIs you allow; personal ones under the personal profile with any. Nothing is imposed.

How to enable. install.sh --with=spaces, then Settings → "Spaces" → "Create from example" (or copy claude/spaces.example.json to ~/.config/claude-cowork/spaces.json) and tick the AIs for each space. Check: cc-spaces validate. No file — nothing changes. A session under a space's profile: cwin --space ID [DIR].

Preset and one-time allow. The preset button in Settings → "Spaces" (same — cc-spaces preset plan|apply|rollback) creates "Work + Personal" from the example with your profile ids; plan writes nothing, apply keeps a .bak. An AI that is not allowed in a space can be let in once: cc-spaces allow --once ID PROVIDER — the next launch within 10 minutes passes and the permission is used up. Permanent — cc-spaces allow ID PROVIDER on|off. Put additions to spaces.json in spaces.d/*.json: they add spaces and fields, never remove anything; an entry with parent inherits the parent's fields.

Zones (private overlay). Sub-spaces of "work" (red/green zone etc.) with real hosts stay out of the open repo: a placeholder template is in docs/templates/zones-overlay/; keep your zones in a private repo and install them as an overlay in spaces.d/zones.json (steps — in the template README).

We recommend two spaces — "work" (allowed AIs only) and "personal" (any) — with separate Claude profiles. More — docs/spaces.md.

9. Spending tokens wisely

10. If something isn't working

Symptom What to do
Hotkeys don't fire System Settings → Privacy & Security → Accessibility → Hammerspoon; then menu 🤖 → "Reload Hammerspoon"
Dictation is silent ./install.sh --check; log — ~/Library/Logs/whisper-server.log
The panel disappeared ⌃⌥P; menu 🤖 → "Panel ▸ Reset position"
Tabs have no statuses check the hooks: ./install.sh --check
Everything is sluggish cclean -n to see forgotten sessions, then cclean
Undo everything ./install.sh --uninstall — removes only what the installer put in place and restores backups
Panel/hotkeys/voice gone after a Mac reboot as of this version, install.sh turns on Hammerspoon → Preferences → Launch at Login itself; if it's still off, enable it there and check with ./install.sh --check
A "Lagrange: some features are unavailable" notification, or the panel shows an error list Everything else keeps working — the broken module is just switched off. Press Reload on the panel; if that doesn't help, run ./install.sh --check; details are in the Hammerspoon console (boot: lines)
A notification arrived with no buttons / didn't arrive at all System Settings → Notifications → Hammerspoon: allow it and pick the "Alerts" style (open "x-apple.systempreferences:com.apple.Notifications-Settings.extension"); ./install.sh --check can't always detect this programmatically — see docs/dev/dependencies.md
"Focus" mode isn't picked up, though meetings are detected Without Full Disk Access, Hammerspoon can't see Focus mode (see §7); grant it under System Settings → Privacy & Security → Full Disk Access → Hammerspoon, or see the FDA-free option in docs/shortcuts.md; check with ./install.sh --check
Low memory — voice/semantic search temporarily unavailable Expected: bin/cc-memok blocks whisper-server/llama-server from starting when memory is tight — wait for it to free up, or raise CC_MEM_HEADROOM_MB/set CC_LOCAL_MODELS=0 if this gets in the way
Couldn't figure it out / need to attach a report ccfeedback — version, macOS/chip/RAM, install.sh --check, dependency versions, log tails, launchd status; personal data is stripped. The file lands on the Desktop, the path is printed

Skills and commands: full list

This section is generated automatically from claude/skills/*/SKILL.md and hammerspoon/commands.json, but only in the Russian source — see ../guide.md#скиллы-и-команды-полный-список. bin/cc-help --write regenerates that table when a skill or command is added or changed; it does not touch this file. Skill descriptions in that table are already in English — skills, like all instructions for Claude, are authored in English — so only the two header rows and the surrounding Russian prose differ by language. A short CLI version (5 hotkeys plus the skill list) is available without arguments: cc-help.