Configuration
State cascade
Section titled “State cascade”brainjar state merges in three tiers. Each tier overrides the previous:
workspace → project → envWorkspace state
Section titled “Workspace state”Stored on the server. Applies to all projects within the workspace.
brainjar persona use engineer # Sets workspace personabrainjar rules add security # Adds to workspace rulesProject state
Section titled “Project state”Stored on the server at project scope. Overrides workspace for that project only. Project scope is auto-detected when your working directory contains a .brainjar/ directory — no --project flag needed.
cd my-project # has .brainjar/ dirbrainjar persona use planner # auto-scoped to projectbrainjar rules add no-delete # auto-scoped to projectYou can also use --project explicitly to force project scope.
Workspace settings still apply — project only overrides what you specify:
soul craftsman (workspace)persona planner (project)rules boundaries (workspace), no-delete (+project)Environment variables
Section titled “Environment variables”Override everything for a single session:
| Variable | Effect |
|---|---|
BRAINJAR_HOME | Override ~/.brainjar/ location |
BRAINJAR_SOUL | Override active soul |
BRAINJAR_PERSONA | Override active persona |
BRAINJAR_RULES_ADD | Comma-separated rules to add |
BRAINJAR_RULES_REMOVE | Comma-separated rules to remove |
Set to empty string to explicitly unset (e.g., BRAINJAR_SOUL="" removes the soul for that session).
BRAINJAR_PERSONA=reviewer claudeConfig file
Section titled “Config file”The CLI config lives at ~/.brainjar/config.yaml and uses named contexts:
version: 2current_context: localcontexts: local: url: http://localhost:7742 mode: local bin: ~/.brainjar/bin/brainjar-server pid_file: ~/.brainjar/server.pid log_file: ~/.brainjar/server.log workspace: defaultbackend: claudeEach context has its own URL, mode, and workspace. See Architecture for details on server modes and contexts.
Backends
Section titled “Backends”brainjar supports multiple agent backends:
brainjar init --backend claude # Default — writes ~/.claude/CLAUDE.mdbrainjar init --backend codex # Writes ~/.codex/AGENTS.mdSwitch backends:
brainjar reset --backend codexBackup & restore
Section titled “Backup & restore”On first sync, brainjar backs up any existing config to CLAUDE.md.pre-brainjar. Running brainjar reset removes brainjar-managed config and restores the backup.
For a step-by-step guide to decomposing an existing config file into brainjar layers, see Migrating from Monolithic Prompts.