Getting started
ccdesk needs Node.js 22.19 or newer. Run it from the directory you want to look at:
cd ~/code/my-projectnpx ccdeskIt starts a small server on 127.0.0.1, opens your browser on the directory you ran it from, and prints the address:
ccdesk is running at http://127.0.0.1:41873/#token=…Press Ctrl+C to stop.The part after #token= is the key the page needs to talk to the server, so open the printed address rather than typing the host and port by hand. If you stop ccdesk with Ctrl+C and start it again within 15 minutes, it uses the same key and port, so a page left open picks up where it was. Later, or after ccdesk was killed, the key is new and so is the address. ccdesk keeps them in ccdesk/server.json in your Claude folder (~/.claude, or the one --config-dir or CLAUDE_CONFIG_DIR names), readable by you only. If another program has taken the port, ccdesk starts on a free one. Press Ctrl+C in the terminal to stop ccdesk.
Options
Section titled “Options”npx ccdesk [options] Open the page in your browsernpx ccdesk scan [dir] --json Print what Claude Code loads in dir, as JSONnpx ccdesk explain <file> [--dir <dir>] Print what loads once Claude reads or edits filenpx ccdesk check [dir] [--json] Exit 1 when a session started in dir reads a file Claude Code cannot read or parse, or a setting it ignoresnpx ccdesk compare <a> <b> [--json] Print the settings that differ between two directories, and the files each value comes fromnpx ccdesk rules --suggest [dir] [--json] Print the allow rules that would have covered calls you approved by hand in the sessions started in dirnpx ccdesk forget <dir> | --all-gone Forget a directory whose folder is gone: move its sessions and memory into ccdesk's backupsnpx ccdesk hook --install | --remove [--project] [dir] Add or take out the session check: a SessionStart hook that warns when what a new session loads has problems
--port <n> Port to listen on (default: the last run's if free, else any) --no-open Print the URL instead of opening a browser --config-dir <path> Claude folder to read, as CLAUDE_CONFIG_DIR sets it for Claude Code (wins over $CLAUDE_CONFIG_DIR) --dir <dir> For explain: the folder the session starts in (default: the current one) --strict For check: also fail on entries Claude Code may skip in a file it reads --all For check: also count ~/.claude, ~/.claude.json, managed settings and files outside dir's repository. For compare: also list the settings both directories share --suggest For rules: print the allow rules ccdesk suggests, as Permissions lists them --all-gone For forget: every listed directory whose folder is gone --install, --remove For hook: add the session check to your user settings, or take it out --project For hook: use dir's .claude/settings.json, for everyone in the repository --run For hook: what the hook itself runs; reads its input on stdin -y, --yes For forget and hook: do not ask first, as needed without a terminal -h, --help Show this helpWith --no-open, copy the printed address into a browser yourself. If the port you ask for is taken, ccdesk says so and exits.
If you keep several Claude Code profiles, --config-dir ~/.claude-work reads that one, as starting Claude Code with CLAUDE_CONFIG_DIR=~/.claude-work would. The flag wins over the variable.
Without the browser
Section titled “Without the browser”ccdesk scan prints, as JSON, everything the page shows for a directory: instruction files, settings layers and the values in effect, permissions, hooks, MCP servers, memory and problems. It reads the directory you run it from, or the one you name. A script or another tool can use it to ask what Claude Code loads there.
npx ccdesk scan ~/code/acme-api --json > acme.jsonccdesk explain is the When Claude touches a file check in the terminal: it lists the path rules, skills and folder instructions that join the session once Claude reads or edits a file. The session starts in the current directory, or in the one --dir names.
$ npx ccdesk explain src/api/users.tsOnce Claude reads or edits src/api/users.ts in ~/code/acme-api, these load: project path rule .claude/rules/api.md matches src/api/**/*.ts project folder instructions src/CLAUDE.mdccdesk check fails when a session started in a folder would trip over a file it reads: a .claude/settings.json or .mcp.json that is not valid JSON, a settings file whose shape Claude Code’s schema rejects, a CLAUDE.md or rule it cannot read. It also fails on a setting Claude Code ignores in the file it is in, such as autoMode in .claude/settings.local.json, which Claude Code reads only from user or managed settings; the settings reference says which files each key is read from. It checks what a session started in that one folder reads, the current one or the one you name, so a monorepo whose packages have their own .claude folder needs one run per folder people start Claude Code in. It exits 0 when there are none, 1 when there are, and 2 when the arguments are wrong, the folder does not exist, or ccdesk cannot run the check, so a mistyped path fails too. Run it in CI to catch a broken file before anyone pulls it. In a GitHub Actions job, after checking out the repository and setting up Node.js 22.19 or newer:
- run: npx --yes ccdesk@0.3 check- run: npx --yes ccdesk@0.3 check packages/apiPin the version you tested, so that a new release cannot change what fails your build.
$ npx ccdesk checkClaude Code cannot read these files and may skip them: .claude/settings.json: not valid JSON (line 4, column 3) .mcp.json: not valid JSON (line 2, column 1)
2 problems in a session started in ~/code/acme-api.Problems are listed in the order to fix them: files that stop Claude Code from starting (a managed settings file that does not parse as a JSON object), then files it cannot read, then files it reads with some entries skipped, then settings it ignores. Paths are relative to the repository.
$ npx ccdesk checkClaude Code ignores these settings in the files they are in: .claude/settings.local.json: autoMode (Claude Code reads this key only from managed or user settings)
1 problem in a session started in ~/code/acme-api.- Only the repository’s own files count: those under the git root, or under the folder itself outside git, and for a linked worktree also those in the main checkout, which the session reads through to. Your Claude folder,
~/.claude.jsonand managed settings never count, even when the repository holds them. A CI runner usually has none of them, and a broken one is the machine’s, not the repository’s. ccdesk says how many problems it left out;--allcounts them too. - A file Claude Code reads with some entries skipped, such as a
permissions.defaultModeit does not know, is listed but passes. ccdesk’s settings schema can lag a newer Claude Code, so failing on these could fail a valid file.--strictfails on them. - A value that waits for workspace trust, such as an
envvariable in project settings, is not a problem: Claude Code applies it once you trust the folder. Nor is a value another file overrules, such as a repository’savailableModelswhen managed settings set their own list: no edit to the file it is in would change that. --jsonprints each problem with its absolutepath, thefileas shown, the error, andcounted, whether it fails the check; an ignored setting also hassetting: the key, and forenvthe key and the names of the ignored variables, never their values.failedis the overall answer.
ccdesk compare is the settings comparison in the terminal: the keys whose values differ between two directories, with each side’s value and the files it comes from. Hidden values are compared but never printed. --all also lists the keys both share, and --json prints every key with same, whether the two match.
$ npx ccdesk compare ~/code/acme-api ~/code/acme-webSettings that differ between ~/code/acme-api and ~/code/acme-web: model ~/code/acme-api opus (project .claude/settings.json) ~/code/acme-web not set
Same in both: 4 settings; --all lists them.ccdesk rules --suggest is the list of suggested rules at the bottom of Permissions, in the terminal: the allow rules that would have covered calls you approved by hand in the sessions started in a folder, most approved first, with how often and how long ago. Run it after a session to see which prompts one rule would have saved. It prints only rule patterns and counts, never a command or path from a transcript. --json prints the folder, the sessions counted and each rule with approved and last.
$ npx ccdesk rules --suggestAllow rules for ~/code/acme-api, from calls you approved in the 12 sessions started in this repository since 3 Oct: Bash(pnpm test *) approved 41 times, last 2h ago WebFetch(domain:nodejs.org) approved 3 times, last 4d ago
Add one under permissions.allow in .claude/settings.local.json, or select it under Permissions on the page to review it first.These five only read: they write no file and keep no backup. Values the page hides, such as env values and headers, are hidden in their output too.
ccdesk forget clears away a directory whose folder is gone, as Forget… does on the page, after the same review: it prints the store, its sessions, memories and size, and asks before it moves anything. --all-gone does this for every listed directory whose folder is gone, such as the stores test runs leave behind, with one question for all of them. Without a terminal to answer in, pass --yes. It exits 0 when every directory is forgotten, and 1 when you answer no or ccdesk refuses one, saying why. Recent changes on the page can move a store back. Like the page, it changes nothing else: ~/.claude.json keeps the directory’s entry.
Session check
Section titled “Session check”The session check is ccdesk check at the start of every Claude Code session, without the CI rules: it covers your Claude folder and user settings too. It is off until you add it:
npx ccdesk hook --installThat adds one SessionStart hook, for new sessions only, to ~/.claude/settings.json. Like an edit on the page, ccdesk shows the diff first and asks, backs up the file, and lists the change in Recent changes. --project puts it in the .claude/settings.json of the folder you name, the current one by default, for everyone who works there; Claude Code runs a project hook only once the folder is trusted. --remove takes it out again and leaves your other hooks alone.
When nothing is wrong, the hook prints nothing. Otherwise you see a short warning above the prompt:
ccdesk found 1 problem in what this session loads: .claude/settings.local.json: autoMode (Claude Code reads this key only from managed or user settings)Run npx ccdesk here to see and fix them.It lists up to five problems and says how many more there are. Values in managed settings are left out, since only your organisation can change them.
What it costs:
- No context and no usage. The hook answers with a
systemMessage, which Claude Code shows to you and does not send to Claude. Plain text from aSessionStarthook would go into Claude’s context, so the hook never prints any. It runs no model. - About half a second. It runs
npx -y ccdesk@<version> hook --run, pinned to the version that installed it, so npx uses its cached copy and does not ask the registry for updates at every start. The first run after installing downloads that version. Claude Code runsSessionStarthooks in the background, though Claude’s first reply waits for them. Run--installagain after updating ccdesk to move the pin. - No writes. It only reads, like
ccdesk check.
What it reads
Section titled “What it reads”ccdesk reads the same files Claude Code reads for the directory it is started in:
- your Claude folder,
~/.claude, or--config-diror$CLAUDE_CONFIG_DIRwhen one is set; ~/.claude.json(or.claude.jsoninside that folder when it is not~/.claude), for folder trust, MCP servers and approvals;- the managed settings folder your organisation may install:
/etc/claude-codeon Linux,/Library/Application Support/ClaudeCodeon macOS andC:\Program Files\ClaudeCodeon Windows; - the directory you started in and every folder above it, for
CLAUDE.md,AGENTS.md,.claude/and.mcp.json; - transcripts in
~/.claude/projects/, but only to count tool calls, reads of memory files and your answers to permission prompts. See Tool usage counts.
It never reads ~/.claude/.credentials.json.
What it writes
Section titled “What it writes”Only ccdesk/server.json in your Claude folder, the page’s key and port, until you review a change and press the button that saves it. Then ccdesk writes only the file the diff names: a settings file, a .mcp.json, a subagent file, a memory file or MEMORY.md. Before each write it copies the old file to ~/.claude/backups/ccdesk/, and the change shows up in Recent changes, where you can restore it.
ccdesk never writes ~/.claude.json. Claude Code rewrites that file during every session. User and local MCP servers live there, so ccdesk changes them by running Claude Code’s own claude mcp commands. See MCP servers.
Live refresh
Section titled “Live refresh”ccdesk watches the config files for the open directory. When Claude Code or your editor changes one, the page updates within about a second. That includes ~/.claude.json: Claude Code rewrites it all through a session, so the page updates only when something it shows there changes, such as a trust answer, a user or local MCP server, or your answer about a project’s .mcp.json servers. If ccdesk cannot watch a folder, the page names it above the tables. Changes elsewhere still show, ccdesk tries the folder again after 5 seconds, waiting twice as long after each failure up to 5 minutes, and the page rereads everything when you switch back to the tab. On Linux the usual cause is the limit on file watches; raise fs.inotify.max_user_watches with sysctl. A folder on a network drive is never watched.
Other directories
Section titled “Other directories”The page opens on the directory you started in. The rail on the left lists every other directory Claude Code has been used in, and All directories shows them in a table with session and memory counts. Directories whose folder was deleted are folded away in both; see Reading the interface for how to forget one. You do not need to restart ccdesk to look at another project: pick it in the rail or press Ctrl+K and type part of its path.
Next: Reading the interface.



