Reference·FilesIndexClose
Files
Every file and folder Nodecode keeps: the home, the cache, and the folder it leaves in each project.
Nodecode keeps a home for each profile, a cache every profile shares, and an undo folder in each project it edits.
The home
The home is ~/.nodecode/. This one has had an afternoon: four turns, one key, one /backup and one profile. In it are and , of kept definitions, of memories and skills, , and .
A profile has a home of its own under ~/.nodecode/profiles/<name>/, laid out the same way.
Settings
Files you or the agent write on purpose. A profile and an export carry them.
| Entry | Holds |
|---|---|
config.jsonc | The settings. See Config. |
AGENTS.md | Your rules for every session. See Instruction files. |
SOUL.md | The persona channel bots speak in. |
themes.json | Your own themes. |
auth.json | Provider keys, at api_keys.<id>.key. /connect writes it. |
secrets/ | Secrets pasted into setup, one file each. |
cells/ | Cell folders. See Cells. |
cells/<you>/ | The layer: the definitions the agent kept, one file each. A git repository. |
cells/<you>-memory/ | The knowledge cell: memories and skills, kept as definitions. Read by the index, never loaded. |
profile.jsonc | The profile's manifest: what this profile is. |
<you> is git's user.name in lowercase, each run of other characters one hyphen: Mike Smith is mike-smith. Without one it is USER, then you.
Writing a key into config.jsonc as api_key
An export and a new profile carry config.jsonc, key and all, and no mode is forced on it.
Instead: /connect. The key goes in auth.json, 0600, which an export leaves out.
Keeping ~/.nodecode in a dotfiles repository
It carries auth.json, operator-token and the store.
Instead: nodecode profile export NAME PATH: the settings and the cells, no store, no keys.
The plain export, the one meant for sharing, has the key in it.
The key /connect saved is nowhere in it.
State
Files Nodecode makes for itself. A new profile starts without them, and an export leaves them out.
| Entry | Holds |
|---|---|
history.db | The store: every session and every event. SQLite, with -wal and -shm beside it. |
history.db.lock | Held by the process that owns the store, for as long as it runs. |
history.db.owner | That process's pid and gateway port, as JSON. |
history.db.stdio.log | The organism's boot log and stray output. |
operator-token | The gateway token. See Safety and trust. |
usage.jsonl | Each keep, view and call of a memory or skill. The index ranks by it. |
generations/ | A manifest per sealed generation, and a restore's markers. |
release-pin | The release a rollback pinned. nodecode update lifts it. |
keybinds.json | Key overrides. See The shell. |
theme-selection | The theme picked with /themes. |
composer-history | Prompts you typed. |
composer-catalogs.sexp | The lists @ and / complete from, as last read. |
cells-named | Shipped cells already named as not installed. |
distribution.json | Where this home was installed from. |
gateway-off | The background gateway's off switch. |
import/ | The import's marker and its reports. |
hub/ | The cell index, as last read. |
cells/.locks/ | Write locks of the knowledge cells. |
mcp/ | MCP servers' error logs, mcp/<name>.stderr.log. |
link/state.json | This machine's name at its relay, and the browsers let in. |
backups/ | /backup's archives, each with a .json note. |
team/, chrome-extension/, chrome-screenshots/ | Written by the team and chrome cells. |
The store
While Nodecode runs, and . The lock names who owns them: and . Every shell you open attaches to that one.
Copying history.db while Nodecode runs
You get the header and none of the sessions: no such table: events.
Instead: nodecode profile export NAME PATH --whole, or /backup. Both take a whole copy of the store while it runs.
Deleting history.db.lock
A second organism takes the same store on another port. When it stops it deletes history.db.owner, and the shells lose the first.
Instead: Nothing to clear. The lock goes with the process that holds it, crash or not. nodecode profile list shows who holds it.
The copy has no tables. The second organism served on its own port, then took the owner file with it.
The archive's store answers 78 events. The list names the process that holds the lock.
The layer
Each definition the agent keeps is a file in cells/<you>/ and , and each keep seals . To go back, roll back to one.
Deleting a kept file to take a definition back
The folder now has an edit nothing versions, and a rollback refuses until it is gone.
Instead: nodecode rollback N to the generation before it. The layer takes one commit forward, and its history stays.
Profiles
A new profile copies the settings and : auth.json, secrets/ and every knowledge cell. It gets a fresh store and a fresh layer. --clone-all copies the keys and clones the layer instead. See Profiles.
| Only in the default home | Holds |
|---|---|
profiles/<name>/ | The home of each named profile. |
active-profile | The profile a bare nodecode boots. nodecode profile use writes it. |
/connect inside a profile to change the shared key
The save puts a file where the link was. That profile keeps the new key, every other one keeps the old, and profile list still says it shares.
Instead: /connect in the default home. Every profile that links auth.json reads the new key.
After /connect in work: a plain file, two keys, and the list unchanged.
After /connect in the default home: still a link, one key.
Outside the home
| Path | Holds |
|---|---|
<project>/.nodecode/workspace_snapshots | Snapshots for undo, in each folder a session edits. Never in your home folder or /. See Sessions and undo. |
~/.local/share/nodecode/ | The installed releases. On Windows, %LOCALAPPDATA%\Programs\nodecode. See Install. |
~/.local/bin/<profile> | The command profile create writes for a profile. |
nodecode-gateway.service | The background gateway, in ~/.config/systemd/user/. On macOS, a plist in ~/Library/LaunchAgents/. |
nodecode-ephemeral-<pid>.db | The store of an --ephemeral run, in the temp folder. |
Nodecode does not add .nodecode/ to your project's ignore list. Until you do, .
git add -A in a project Nodecode has edited
The snapshot repository goes into your commit: 30 files after one edit.
Instead: Add .nodecode/ to .gitignore, or to .git/info/exclude to keep it to yourself.
Cache
What Nodecode can fetch or build again. Every profile shares it. Most of it is ; the home itself is .
| Platform | Cache root |
|---|---|
| Linux, macOS | $XDG_CACHE_HOME/nodecode/, else ~/.cache/nodecode/ |
| Windows | %LOCALAPPDATA%\nodecode\, unless XDG_CACHE_HOME is set |
| Entry | Holds |
|---|---|
models.dev/api.json | The models.dev catalog. |
provider-models.json | Model lists fetched from providers. |
layers/, peripherals/ | The compiled layer and cells, per build. |
warm/ | Launch images. Linux and macOS. |
previews/ | Images converted for the prompt. |
profile-import/, profile-install/ | Where a profile is unpacked before it moves in. |
leases/ | One lock per bot token, so two organisms never run one bot. |
channel-files/, channel-images/ | Channel attachments and images. |
card-pictures/ | Pictures for Discord cards. Gone after a day. |
libdave/, speaker/, transcriber/ | Discord's voice encryption, and the local voice and speech engines. |
prs/ | Scratch clones for the prs cell. |
open-url.log | Output of the last link opener. |
Deleting ~/.nodecode to free space
That is the agent: its store, its layer, its keys. Here it is 4 MB.
Instead: Clear the cache. rm -rf ~/.cache/nodecode/warm is always safe; the next launch builds it again.
Permissions
The home is , and so is . .
| Path | Mode |
|---|---|
~/.nodecode/ | 0700. Set when the store opens, and again at every write of a key. |
auth.json, operator-token | 0600, at every write. |
Files in secrets/ | 0600, in a 0700 folder. |
history.db.owner, history.db.lock | 0600 |
link/state.json | 0600, in a 0700 folder. |
backups/ | 0700. Each archive and note: 0600. |
An export --whole archive | 0600 |
config.jsonc | No mode is forced. A write keeps the file's mode. |
Backups and exports
Three ways to take a home with you, and only one is for sharing.
| Entry | New profile | --clone-all | Export | --whole | /backup |
|---|---|---|---|---|---|
config.jsonc, AGENTS.md, SOUL.md, themes.json | Copied | Copied | Copied | Copied | Copied |
auth.json, secrets/ | Linked | Copied | No | Copied | Copied |
cells/<you>/, the layer | New | Cloned | Copied | Copied | Copied |
cells/<you>-memory/ | Linked | Cloned | Copied | Copied | Copied |
history.db, the store | New | New | No | Copied | Copied |
operator-token and the rest of State | No | No | No | No | No |
Linked is one file for both homes. nodecode profile import PATH brings either export back as a profile.
Sending someone a backup to share your setup
It holds auth.json and every session you had.
Instead: nodecode profile export NAME PATH, without --whole.