Skip to content

Configuration

aisw stores its configuration at ~/.aisw/config.json. To use a different directory, set the AISW_HOME environment variable:

AISW_HOME=/path/to/custom/dir aisw list

This is useful for testing or for running multiple isolated aisw environments.

config.json is written with 0600 permissions (owner read/write only). aisw will warn if it finds the file with broader permissions.

{
"version": 1,
"active": {
"claude": "work",
"codex": null,
"gemini": null
},
"profiles": {
"claude": {
"work": {
"added_at": "2026-03-25T10:00:00Z",
"auth_method": "oauth",
"label": "Work Max subscription"
}
},
"codex": {},
"gemini": {}
},
"settings": {
"backup_on_switch": true,
"max_backups": 10
}
}
FieldTypeDescription
versionintegerSchema version. aisw will refuse to load a config with a version higher than it supports.
active.<tool>string or nullThe currently active profile name for each tool. Null means no profile is active.
profiles.<tool>.<name>objectMetadata for a stored profile. Does not contain credentials — those live in the profile directory.
profiles.<tool>.<name>.added_atISO 8601 timestampWhen the profile was added.
profiles.<tool>.<name>.auth_method"oauth" or "api_key"How the profile authenticates.
profiles.<tool>.<name>.labelstring or nullOptional human-readable description.
settings.backup_on_switchbooleanWhether to create a backup before every profile switch. Default: true.
settings.max_backupsintegerMaximum number of backups to keep. Older ones are pruned automatically. Default: 10.
~/.aisw/
├── config.json
├── profiles/
│ ├── claude/
│ │ └── work/
│ │ └── .credentials.json
│ ├── codex/
│ │ └── work/
│ │ ├── auth.json
│ │ └── config.toml
│ └── gemini/
│ └── default/
│ └── .env
└── backups/
└── 2026-03-25T10-00-00Z/
└── claude/
└── work/
└── .credentials.json

Profile directories store the per-profile credential state that aisw copies into each tool’s live config location on use. aisw treats most credential files as opaque blobs — it copies them in and out but does not validate token contents.

If config.json has a version higher than the installed aisw supports, aisw will exit with an error and a link to upgrade. It will never silently corrupt a config it does not understand.

Downgrading aisw after upgrading is not supported. Keep backups if you need to roll back.