Usage
What it does
- Validates your API key against the Median backend
- Saves credentials to a named profile in
~/.config/mdn/ - Optionally binds the current directory to that profile with
.median/config.json - Optionally writes agent instructions to
CLAUDE.mdandAGENTS.mdin your project
Profiles
Median API keys are scoped to one workspace. Profiles let you keep multiple workspace keys on the same machine:--profile, Median uses the workspace prefix lowercased, such as med.
Project-local config
Use--local when a repository should always use a specific workspace:
.median/config.json in the current directory:
~/.config/mdn/.
Median looks for .median/config.json in the current directory and parent directories. Run mdn commands from inside the repository so the right workspace is selected.
Reconfiguring
Runmdn setup --profile <name> again to update that profile’s API key.
Run mdn setup --profile <name> --local inside a repository to switch that repository to another workspace profile.
Stored config
Global credentials live in~/.config/mdn/:
| Field | Description |
|---|---|
defaultProfile | Profile used when no local project config is found |
profiles | Saved workspace credentials by profile name |
| Field | Description |
|---|---|
apiKey | Median API key for one workspace |
convexUrl | Backend URL extracted from the key |
workspaceId | Workspace identifier |
workspaceName | Workspace name |
workspacePrefix | Task code prefix, such as MED |
.median/config.json and stores only profile.