WARSHALL
Docs/Reference/The data folder

The data folder

Everything the app keeps lives in one folder on your disk. It sits apart from where the app is installed, so upgrading the app never touches it.

Where it is

The installed app uses .warshall in your home folder. A machine that already has a folder from an earlier name of the app, .codewright or .pulseworkspace, keeps using that one, so a rename never strands an account, a worktree or a map.

A copy of the app run from its source code uses .warshall-dev instead, so it never shares state with the installed app.

On Windows the app installs for your user only, by default under %LOCALAPPDATA%\Programs\Warshall. Running a newer installer replaces the app in place and leaves the data folder alone. A fresh install starts with no projects and no sample data.

What it holds

ItemWhereWhat it is
Settingssettings.jsonEvery switch in Settings, including the projects the phone may see.
Warshall accountaccount.jsonThis desktop’s sign in, sealed by the operating system where the system offers that.
Agent accountsagentsA folder of sign in files for each account you link through the app, which its command line tool reads.
WorkMapstrackersThe map of each project and its history.
Conversationsusers, agent conversationsThe database of what each terminal has run, and a readable log per terminal.
WorktreesworktreesThe checkout and branch of each terminal.
BuildsbuildsThe build script found for each project and its settings.
Prompts and skillsprompts, skillsSaved prompts and the skills offered beside the composer.
Vault and attachmentsvault, attachmentsThe encrypted store for attachments, node summaries and how they relate.
Context docscontextsThe context written for each feature and carried with a prompt.
ApprovalsapprovalsThe small script the agent tools call to ask whether a command may run.
ScreenshotsscreenshotsThe pictures of an interface a run tested, per terminal.
Mobile remoteremoteThis desktop’s identity for the phone link, sealed like the account, and the phones it trusts.
ToolstoolsTools the app installs for itself, such as the engine that renders LaTeX to PDF.
InstancesinstancesA data folder of its own for each terminal, described below.

The list of linked agent accounts and API keys is kept in a MongoDB database, named by db.json in the data folder. Without one, the app still finds the sign ins your command line tools already hold, but an account linked through the app is not remembered after a restart.

Deleting the data folder removes what the app keeps. It does not touch your project folders or the sign in folders of the command line tools themselves.

Moving it

Set WARSHALL_DATA_DIR to an absolute path and the app uses that path exactly as given. The window’s browser profile moves inside it as well, so the whole instance is one folder. The older name for the same variable, CODEWRIGHT_DATA_DIR, still works.

WARSHALL_DATA_DIR=D:\warshall

Nothing is copied, moved or migrated into the new folder. It starts empty, with no projects and no settings. Copy settings.json across by hand if you want your settings there.

Two launches pointed at different folders each get their own window. Two launches pointed at the same folder fold into one window, which is what the Start menu shortcut relies on.

One folder per terminal

Every agent run already carries WARSHALL_DATA_DIR in its environment. It points at a folder of its own inside instances, named for the terminal. Anything the agent launches therefore gets its own settings, its own profile and its own database, so two terminals can each run the app they are building at the same time without overwriting each other.

The variable is set for every project, and an app that does not read it is unaffected. Nothing clears these folders yet. A terminal that never launched anything leaves nothing behind, and one that did leaves a profile of about 20 MB plus whatever that run wrote.

A run carries these variables, the same for every provider.

VariableWhat it holds
WARSHALL_DATA_DIRThe terminal’s own folder inside instances.
WARSHALL_TERMINAL_IDThe terminal’s id.
WARSHALL_PORT_OFFSETA number added to default ports, so each terminal’s servers get ports of their own.
WARSHALL_PORT_BASEThe first port of the block this terminal owns.
WARSHALL_MONGODB_URIA MongoDB address with a database named after the terminal.
WARSHALL_SCREENSHOTS_DIRThe folder a run saves its screenshots into. See Pictures and files.

Your own variables ride on top of these. Set them in Settings > Harness, once for every project and again per project. A value can name another variable of the run, so PORT=${WARSHALL_PORT_BASE} gives a project’s server the terminal’s own port.