Terminal and Project scripts

Run real shells inside a workspace, and share the setup, run, and archive scripts that give every workspace the same workflow.

View as Markdown

The Terminal is the bottom panel of a workspace, and it stays with you across Chat, Review, and Checks. Its tabs hold three kinds of thing:

  • interactive shells you type into, for a quick git or npm test in the worktree
  • the streamed output of the managed project scripts
  • a read-only activity feed

Project scripts

Project scripts are per-repository commands that give every workspace the same workflow. There are three kinds:

  • Setup runs once, on a workspace's first turn: install dependencies, generate files. Its output streams inline in the chat, so the first reply and the environment coming up read as one sequence.
  • Run is the long-running process, your app, server, or watcher, started by the Run button. It comes with a stop control and the workspace's preview port.
  • Archive runs before a workspace is archived, for cleanup that lives outside the worktree.

Each workspace gets its own block of ports, so parallel run scripts never fight over one address.

Scripts live in the repository's committed .cohalen/settings.toml, which every worktree checks out. That makes the workflow a team asset: a teammate launching a workspace on the same repository gets the same setup and run.

settings.toml
settings.local.toml

The second file is yours: uncommitted, per repository, and it overrides the first. A workspace can also carry its own edits to either in its worktree, which apply to it alone.

The two files take the same shape. The three scripts live under [scripts], and merge_strategy sits at the top level:

KeyValueDefault
setupa shell commandnone
runa shell commandnone
archivea shell commandnone
merge_strategysquash, rebase, or mergesquash

Where a setting comes from

Settings resolve through fixed layers, each one overriding the one below it, key by key:

  1. Built-in defaults
  2. User config, global to your machine
  3. The repository's committed .cohalen/settings.toml, shared with the team
  4. .cohalen/settings.local.toml, an uncommitted personal per-repo override
  5. Cohalen's own config kept outside any worktree (the sandbox profile lives here)

Settings shows each value next to where it came from, so "this is the default" and "the repo overrides this" stay apart. Secrets never ride a layer. API keys live in the OS keychain and nowhere else.