Skip to main content

Usage

Paste your API key when prompted. Find it in your Median dashboard under Settings > API Keys.

What it does

  1. Validates your API key against the Median backend
  2. Saves credentials to a named profile in ~/.config/mdn/
  3. Optionally binds the current directory to that profile with .median/config.json
  4. Optionally writes agent instructions to CLAUDE.md and AGENTS.md in your project

Profiles

Median API keys are scoped to one workspace. Profiles let you keep multiple workspace keys on the same machine:
If you do not pass --profile, Median uses the workspace prefix lowercased, such as med.

Project-local config

Use --local when a repository should always use a specific workspace:
This writes .median/config.json in the current directory:
The local config only stores the profile name. API keys stay in ~/.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

Run mdn 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/: Each profile stores: Project-local config lives in .median/config.json and stores only profile.