projects_use
Connect to a project and set it as the active profile for CLI commands. Handles authentication via API key or automatic token exchange. Requires active billing account and active project.
Instructions
Connect to a project and save it as the active profile so the 'cli' tool's data, entities, users, and other commands target it. Resolves the project, then either stores the API key you pass or exchanges a transfer token for project-scoped credentials automatically. Requires an active billing account (set one with 'accounts_use'); the project must be Active (see 'projects_list'). Returns the saved profile name, org id, API URL, and auth method.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Project to connect to — its name, org id, or UUID (a unique prefix is accepted). Find these via 'projects_list'. | |
| apiKey | No | Optional project API key (ak_...). If omitted, a project-scoped token is generated automatically via transfer-token exchange. | |
| accountId | No | Billing account id the project belongs to. Defaults to the active account set via 'accounts_use'. |