# Lot Map for Claude Code `lot-map` is a mod for Claude Code: a live map of the work, in a pane beside the chat. Every tool call, model step, hook and skill sends a pulse from the centre to its station, so you see memory, files, shell, web and agents at work instead of reading a list of commands. It runs on your machine and sends nothing anywhere. Local does not mean blind: like any mod that follows tool calls it is handed each call whole, and it takes names from that and nothing else. [What it reads and keeps](PRIVACY.md), and [the checks that hold it to that](PRINCIPLES.md). ![The map during a work session](docs/demo.gif) *A made-up session replayed through the mod's own drawing code. [Video (MP4)](docs/demo.mp4). Or [play it in your browser](https://alexeyw.github.io/lot-map/), where the page runs the same code and shows what each call hands the mod and what the mod keeps.* ## Install At the prompt of a terminal session: ``` /plugin install lot-map --marketplace alexeyw/lot-map ``` Answer `y` to add the marketplace, then choose a scope. From a shell: ```bash claude plugin install lot-map --marketplace alexeyw/lot-map ``` If it answers that the plugin is not found in any marketplace, add the marketplace first: ```bash claude plugin marketplace add alexeyw/lot-map claude plugin install lot-map@lot-map ``` In the desktop app: click **+** next to the prompt box, then **Plugins**, **Add marketplace** with `alexeyw/lot-map`, then **Add plugin**. The pane opens by itself when a session starts; with `openAtStart` off it waits for `/lot-map`. In a terminal it needs at least 144 columns, otherwise type `/lot-map`, and it draws text only unless you ask for the map, as a picture or in braille dots: see [In a terminal](#in-a-terminal). Built and tested on Claude Code 2.1.321 on macOS; users report it working on Windows and Linux as well. On a Team or Enterprise login the transcript may get notices like `lot-map: its classic.PreToolUse hook was skipped`. Turn `guardedHooks` off and they stop; [Options](#what-it-shows) says what the map loses for it. ## Updating From a shell: ```bash claude plugin marketplace update lot-map claude plugin update lot-map@lot-map ``` Then start a new session. The first command is needed: without it the second one reports the installed version as the latest. What each version changed is in [CHANGELOG.md](CHANGELOG.md). ## What lights up | Station | When | | --- | --- | | You | your messages, questions and files sent to you, the task list, the plan, and what you are asked to approve | | Model | each model request, context compaction | | Memory | Claude Code's memory folder, plus whatever you name in the options | | Files | Read, Write, Edit, Grep, Glob, a language server's code intelligence, and shell commands that work on files and nothing else: they read, search, move, delete or edit in place (`cat`, `grep`, `mv`, `rm`, `sed`, `tee`, `find … -delete`) | | Shell | every other shell command | | Network | web fetch and search, MCP servers, work kept on claude.ai (artifacts, projects, designs), and shell commands known to reach the network: `curl`, `gh`, `ssh`, `rsync`, `git push`, `npm install`, `docker pull` and the like, also inside `$(…)` | | Browser | browser tools | | Agents | subagents, workflows, schedules, and waiting on background work; their own calls start from this station | | Skills | skills, tool search, and the skill, plugin and connector catalogue | | Hooks | settings hooks that refuse a call, ask for permission, add context or take a moment | On Windows the PowerShell tool is read the same way as Bash, with PowerShell's own names: `Get-Content` and `Select-String` light Files, `Invoke-WebRequest` lights Network. A program run by its full path is read by its name, also from a quoted path with a space, and `CURL.EXE` is `curl`. The shell stations go by the command's name, not by what it does: a script that opens a connection itself, such as `python -c "…"`, shows as Shell. A command behind `sudo`, `env`, `timeout`, `nohup`, `xargs` and the like is read as the command it runs, and `find … -exec` as the command it is told to run. So is a command inside a loop or a condition (`for … do`, `if … then`, `while`, `!`, `{ … }`), in the body of a function defined on the line, in a PowerShell script block (`ForEach-Object { … }`), and a line handed over as a text to a shell, to `eval`, to `env -S`, to PowerShell or to cmd (`bash -c "…"`, `iex '…'`, `pwsh -Command "…"`, `cmd /c …`); one kept in a variable is not known and stays Shell. The text of a here-document is not read, so a file written through one shows as Files whatever the text says; but with a mark written bare, `< | The map turned, with the person at the bottom | ## Colours of your own `colors` replaces the map's colours one by one. Set one, a few, or all thirteen; what you leave out stays as it is. ```bash echo '{"theme":"dark","colors":"accent=#7fb4ff,active=#b8d6ff,text=#e6edf7"}' | claude plugin configure lot-map@lot-map --values-stdin ``` | Name | What it colours | | --- | --- | | `background` | the map's ground, and the rim around the labels | | `node` | the inside of a station and of the centre | | `line`, `spoke` | the dashed contours and the idle spokes | | `text`, `label`, `faint` | the name in the centre and lit labels, the other labels, the counts | | `accent`, `active` | the main colour, and a station at work | | `error` | errors and refusals | | `memory`, `memoryActive` | the Memory station and its spoke | | `route` | the route between stations | The map in two palettes of one's own: a cool blue one and a green one - Only `#rgb` and `#rrggbb` are taken. Anything else, and any other name, counts as not set. - With `theme` left on `auto`, a colour of your own holds on a light surface as well, and the rest is repainted as before. With a whole palette of your own, set `theme` to `dark` or `light`. - With `background` set to `transparent`, still give `background` here the colour of your pane: the rim around the labels takes it, and the halo is gone. ## What it shows and what it keeps The mod makes no network requests, reads no files, runs no processes, calls no model and adds nothing to the conversation. Its rows live only for the session. The same on one page: [Privacy](PRIVACY.md). Like any mod that follows tool calls, it is handed every call's whole input, including command lines and the text written to files. It takes names from that and nothing else; the code that does so is `classify` in `hooks/classify.ts`. A marketplace added from this repository follows its `main` branch, so an update brings whatever is there: read the diff before updating if that matters to you. By default it asks Claude Code for one thing: how full the context window is, after each model step. With `contextCost` on it also keeps, from the same answer, how many tokens that is, and puts a number on each row and station; it reads nothing more for it. With `contextWindow` set to `compaction` it also asks how the context divides up, at a session's first model step and again after a compaction or a change of model, and takes from the answer only the size of the auto-compact window. Between sessions it keeps one thing, the name of the model last used in each folder, so that it can show a change. Each is stored under the folder's full path, in Claude Code's own store for the plugin. What its hooks do. The mod listens to the session's start, prompts, turns, model steps, tool calls, skills, compaction, with `subagentNames` on a subagent's start, and to three events of settings hooks: `PreToolUse`, where it sees whether a hook refused the call, asked for permission or took a moment, and `UserPromptSubmit` and `SessionStart`, where it sees the context a hook added. Each of its hooks passes the event on as it came and returns what came back as it was: it changes no input, no result, no context and no permission decision, and makes none of its own. Its one command, `/lot-map`, opens the pane. A label holds a name, never content: - a file: the last two parts of its path; - a web address: the host alone, without a login, password, path or query; an address that can be read two ways shows only its scheme; - a shell command or a monitor: the short description Claude wrote for it. With no description, the command's name if it is a command the mod knows by name (`git`, `make`, `curl` and the like) or one you named in `memoryCommands` or `commandStations`, and the word `shell` for any other: a program of your own, a script. The line is read by hand, and a word of it may be taken for a command by mistake; a word in no list is never shown. Never the command line. The description is the model's own words, and the mod shows them as written; - a search: the tool's name for `Grep` and `Glob`, the words `web search` for a web search and `loading tools` for a tool search, in the map's language, never the pattern or the query; - a memory call: the tool's name and a record number or short identifier, never the text or the query; - a memory command: its name, and the word after it only if you listed that word in `memorySubcommands`; - a subagent: the short description it was started with; with `subagentNames` on, its first 40 characters on that subagent's model steps as well; - a background task's report: that the task ended and whether it failed, never its summary or its output; - a hook's refusal: the name of the tool it stopped. Its first line shows only with `hookReasons` on, because a refusal may quote what the hook found. Control characters are taken out of every label before it is drawn. A fault on the map never reaches a tool call or a model turn. ## Developing ```bash claude plugin test . claude plugin validate . ``` Words live in `hooks/text.ts`; a new language is one more table there and one more value of `language` in `.claude-plugin/plugin.json`. The terminal picture is made by three files: `hooks/scene.ts` reads the drawing `drawMap` makes, `hooks/raster.ts` paints it, and `hooks/png.ts` packs the pixels for the terminal. A test paints every kind of drawing and fails on anything the painter does not know, so a change to the drawing that needs more of SVG shows there first. Another, `the terminal picture's font has every letter the map writes, in every language`, names the letters a new language needs added to `hooks/font.ts`; [FONTS.md](FONTS.md) says how to make that file again. The braille map is drawn by `hooks/braille.ts`: a second drawing of the same board, which takes its stations from `STATIONS` and its timings from `hooks/draw.ts`. Tests in `hooks/braille.test.tsx` hold it to every station under both layouts, and one in `hooks/lot-map.test.tsx` to the names of every language. Something new on the map is either drawn there too or added to the list of what braille leaves out, in [In a terminal](#the-map-in-braille-dots): the `INVENTORY` in `hooks/braille.test.tsx` has a line for each thing the first drawing shows, a test holds both drawings to it, and `scripts/check-surface.mjs` holds that list to the same lines. Before you send a change, read [CONTRIBUTING.md](CONTRIBUTING.md). What the mod holds to, and the check behind each point, is in [PRINCIPLES.md](PRINCIPLES.md). ## License [MIT](LICENSE)