Skip to content

Configuration

~/.aisw/config.json

Override with the AISW_HOME environment variable:

Terminal window
AISW_HOME=/tmp/aisw-test aisw list

AISW_HOME is useful for isolated testing or for keeping multiple independent aisw data directories.

config.json is written with 0600 permissions (owner read/write only). aisw doctor warns if the file has broader permissions. The ~/.aisw/ directory is created with 0700.

{
"version": 2,
"active": {
"claude": "work",
"codex": null,
"gemini": null,
"antigravity": null
},
"profiles": {
"claude": {
"work": {
"added_at": "2026-03-25T10:00:00Z",
"auth_method": "oauth",
"credential_backend": "file",
"label": "Work"
}
},
"codex": {},
"gemini": {},
"antigravity": {}
},
"contexts": {
"acme": {
"profiles": {
"claude": "acme-claude",
"codex": "acme-codex",
"gemini": null,
"antigravity": null
},
"created_at": "2026-03-25T10:05:00Z",
"updated_at": "2026-03-25T10:05:00Z"
}
},
"settings": {
"backup_on_switch": true,
"max_backups": 10,
"claude": { "state_mode": "isolated" },
"codex": { "state_mode": "isolated" }
}
}
FieldTypeDescription
versionintegerConfig schema version. Commands fail with an upgrade message if this exceeds the installed binary’s supported version.
active.<tool>string or nullName of the currently active profile for the tool, or null if none.
profiles.<tool>.<name>objectMetadata for a stored profile. Does not contain credential material.
profiles.<tool>.<name>.added_atISO 8601 timestampWhen the profile was created.
profiles.<tool>.<name>.auth_method"oauth" or "api_key"How the profile was authenticated.
profiles.<tool>.<name>.credential_backend"file" or "system_keyring"Where the credential bytes are stored.
profiles.<tool>.<name>.labelstring or nullOptional human-readable label.
contexts.<name>objectSaved sparse mapping from tool to profile names.
contexts.<name>.profiles.<tool>string or nullProfile name to activate for that tool when the context is used.
contexts.<name>.created_atISO 8601 timestampWhen the context was created.
contexts.<name>.updated_atISO 8601 timestampWhen the context was last changed.
settings.backup_on_switchbooleanCreate a backup before activating a profile. Default: true.
settings.max_backupsintegerMaximum number of backups to retain. Older ones are pruned when the limit is exceeded. Default: 10.
settings.<tool>.state_mode"isolated" or "shared"Remembered state mode. Present for claude and codex only - the tools that support it.

active, profiles, and each context’s profiles always carry a key for every supported tool, using null where nothing is set.

Credentials are stored under ~/.aisw/profiles/, not in config.json. Contexts also store only references, never credential material.

Workspace bindings live in a separate file, ~/.aisw/workspaces.json, written by aisw workspace bind, unbind, and guard:

{
"version": 1,
"guard_mode": "warn",
"default_context": null,
"path_rules": [{ "path": "/home/you/clients/acme", "context": "client-acme" }],
"git_remote_rules": [{ "pattern": "github.com/acme/*", "context": "client-acme" }]
}

A repo can also carry its own binding at <repo>/.git/info/aisw.json, which takes precedence over these user-level rules. See Workspace guardrails.

~/.aisw/
├── config.json # profile registry and settings (0600)
├── config.json.lock # advisory write lock
├── workspaces.json # workspace binding rules (0600)
├── profiles/
│ ├── claude/
│ │ ├── work/
│ │ │ ├── .credentials.json # Claude credential file (0600)
│ │ │ └── oauth-account.json # OAuth account metadata (if OAuth)
│ │ └── personal/
│ ├── codex/
│ │ └── work/
│ │ ├── auth.json # Codex auth file (0600)
│ │ └── config.toml
│ ├── gemini/
│ │ └── personal/
│ │ ├── .env # API-key profiles (GEMINI_API_KEY=...)
│ │ └── oauth_creds.json # OAuth profiles (0600)
│ └── antigravity/
│ └── work/
│ ├── keyring.json # captured live keyring metadata
│ └── keyring-secret.json # secret, when file-backed (0600)
└── backups/
└── 2026-03-25T11-45-02.123Z-0000/ # backup id
└── claude/
└── work/ # snapshot of the profile directory

Profiles stored with --credential-backend system-keyring keep their secret in the OS keyring instead of a file in the profile directory.

If config.json has a schema version higher than your installed aisw binary supports, all commands fail with a message asking you to upgrade. Downgrade compatibility (using a newer config with an older binary) is not guaranteed.

This is intentional for contexts: version 2 prevents an older binary from silently rewriting config.json and dropping saved context definitions.