Skip to content

Configuration ​

Gyrus stores its configuration in a global JSON file that tracks all your workspaces and settings.

Configuration File Location ​

The configuration file is located at:

~/.config/gyrus/config.json

On different platforms:

  • macOS: ~/.config/gyrus/config.json
  • Linux: ~/.config/gyrus/config.json
  • Windows: %USERPROFILE%\.config\gyrus\config.json

Configuration Structure ​

json
{
  "version": 1,
  "default": "personal",
  "workspaces": [
    {
      "name": "personal",
      "path": "~/gyrus",
      "description": "Personal knowledge and projects"
    },
    {
      "name": "work",
      "path": "~/work/brain",
      "description": "Work projects"
    }
  ],
  "settings": {
    "serve": {
      "port": 3333
    },
    "daemon": {
      "port": 3334
    }
  }
}

Configuration Fields ​

Top-Level Fields ​

FieldTypeDescription
versionnumberConfiguration schema version (currently 1)
defaultstringName of the default workspace
workspacesarrayList of registered workspaces
settingsobjectGlobal settings

Workspace Fields ​

FieldTypeRequiredDescription
namestringYesUnique identifier for the workspace
pathstringYesPath to the workspace directory
descriptionstringNoHuman-readable description

Settings Fields ​

FieldTypeDefaultDescription
serve.portnumber3333Port for the dashboard server
daemon.portnumber3334Port for the HTTP/SSE MCP server

Path Resolution ​

Paths in the configuration support:

  • Absolute paths: /Users/name/gyrus
  • Home directory: ~/gyrus (expanded at runtime)
  • Relative paths: ./brain (relative to current directory when registered)

WARNING

Relative paths are stored as-is. They resolve relative to where you run Gyrus commands.

Managing Configuration ​

View Current Configuration ​

The configuration file is plain JSON. View it directly:

bash
cat ~/.config/gyrus/config.json

Or use the doctor command to see parsed configuration:

bash
gyrus doctor

Adding Workspaces ​

Use the init command to add workspaces:

bash
gyrus init ~/new-workspace --name new --description "New workspace"

This automatically updates the configuration file.

Changing Default Workspace ​

bash
gyrus use work

This updates the default field in the configuration.

Manual Editing ​

You can edit the configuration file directly, but be careful to maintain valid JSON:

bash
# Open in your editor
code ~/.config/gyrus/config.json

After manual edits, verify the configuration:

bash
gyrus doctor

Workspace Structure ​

Each workspace directory should contain:

<workspace>/
├── knowledge/
│   ├── README.md
│   ├── index.md
│   ├── instructions.md
│   ├── projects/
│   ├── patterns/
│   ├── tools/
│   ├── gotchas/
│   └── decisions/
└── adrs/
    └── template.md

The gyrus init command creates this structure automatically.

Environment Variables ​

Gyrus respects the following environment variables:

VariableDescription
GYRUS_CONFIGOverride the config file location
GYRUS_WORKSPACEOverride the default workspace

Example:

bash
GYRUS_WORKSPACE=work gyrus mcp

Troubleshooting ​

Configuration Not Found ​

If Gyrus can't find the configuration:

bash
# Initialize a workspace (creates config if missing)
gyrus init

Invalid Configuration ​

If the configuration is corrupted:

  1. Back up the existing file
  2. Delete or rename ~/.config/gyrus/config.json
  3. Re-initialize your workspaces

Workspace Path Changed ​

If you moved a workspace:

bash
# Re-initialize at the new location with the same name
gyrus init /new/path --name existing-name

This updates the path in the configuration.

Configuration Validation ​

Gyrus validates the configuration on startup. Common validation errors:

ErrorCauseSolution
Invalid JSONSyntax error in config fileFix JSON syntax or regenerate
Missing versionOld or corrupted configRe-initialize workspaces
Duplicate workspace nameTwo workspaces with same nameEdit config to rename one
Invalid workspace pathPath doesn't existUpdate path or remove workspace

Released under the MIT License.