solanum.json
solanum.json is a file a repository keeps at its root, so everyone who works on it in Solanum gets the same actions, worktree setup and defaults for new threads. This page lists every key.
Where it goes
Put solanum.json in the project's folder, at the top, and commit it. Solanum reads it from there.
Three places can set the same thing. What you choose for the project in Solanum comes first, then solanum.json, then the workspace's settings.
A complete file
{
"actions": [
{
"name": "dev",
"command": "pnpm dev",
"icon": "play",
"preview": "localhost:5173",
"stopOnSettle": true
},
{ "name": "test", "command": "pnpm test", "icon": "test" }
],
"worktree": {
"copy": [".env", ".env.local", "apps/*/.env"],
"setup": "pnpm install",
"settle": "rm -rf dist"
},
"defaults": {
"workIn": "worktree",
"startFromOrigin": true,
"branchPrefix": "feat/",
"branchNames": "fix/ or feat/, then a few words, with the issue number if there is one"
}
}Every key is optional.
actions
A list of commands the Run button in a thread's header runs, each in a terminal tab of its own. The file's actions are listed after the project's own, and marked as the file's. To change one, change the file.
- name
What the action is called in the menu, such as
dev. Required.- command
The command to run, such as
pnpm dev. Required.- icon
One of
play,test,lint,build,configure,debug,installanddeploy.playunless set.- preview
An address, such as
localhost:5173. Running the action opens the browser on it as soon as the server answers.- stopOnSettle
truestops the action when its thread settles. Use it for a dev server or a watcher, so a settled thread leaves nothing running.
worktree
What Solanum does to a new worktree before its thread starts, and as its thread settles. Each key fills in a field that Worktree setup… leaves empty for the project.
- copy
A list of files to copy from the project folder into the worktree, such as
.env.*matches any name. Files the worktree already has stay as they are.- setup
A script that runs in your shell, in the worktree's project folder, before the thread starts. Use it to install dependencies.
- settle
A script that runs in the worktree as its thread settles, to free what builds left there.
defaults
How the project's new threads start. Each takes the place of the workspace's setting of the same name in Settings › Threads, unless you've chosen one for the project there.
- workIn
worktreestarts each thread in a new worktree on a new branch.localstarts it in the project folder, on its current branch. You can still choose per thread.- startFromOrigin
truecreates the worktree from the latest matching branch on origin instead of your local branch.- branchPrefix
What a new worktree's branch starts with, such as
feat/.- branchNames
How to name a worktree's branch after its prefix, in words. Without it, the branch is named after the thread's title.
When the file can't be read
A file that isn't valid JSON, or that holds a key with the wrong kind of value, is left out whole, and the project goes on with its own settings and the workspace's. Worktree setup…, in the menu under the message box, says what's wrong with it.