Problem
The CLI stores all configuration in a single user-level file (~/.config/dosu-cli/config.json). When working across multiple projects that each have their own MCP deployment, running dosu setup --deployment <id> overwrites the global active_account.target.deployment_id, so the last-configured deployment wins for all projects.
This means dosu audit --tasks ... always runs against the last-added deployment regardless of which project directory the user is in and regardless of what that project's MCP server is set to.
Expected Behavior
The CLI should support project-scoped deployment configuration so that running dosu audit (or other commands) in a given project directory automatically targets the correct deployment without manual overrides.
Suggested Approach
Introduce a layered config resolution that checks for a project-local config before falling back to the global user-level config. For example:
- Project-local config file — e.g.,
.dosu/config.json in the project root (the .dosu/ directory already exists for audit artifacts like .dosu/audit.json). This file could store deployment_id, org_id, data_source_id, and api_key overrides scoped to that project.
dosu setup --deployment <id> --local — a flag to write the deployment binding to the project-local config instead of the global one.
- Config resolution chain — commands like
audit would check for .dosu/config.json first, then fall back to the global config.
As a simpler interim step, supporting --deployment or --data-source-id directly on the audit command would also help.
Context
Reported by a user managing multiple projects with separate deployments. Current workarounds are either passing --data-source-id explicitly on every audit run, or re-running dosu setup --deployment <id> before switching projects.
Problem
The CLI stores all configuration in a single user-level file (
~/.config/dosu-cli/config.json). When working across multiple projects that each have their own MCP deployment, runningdosu setup --deployment <id>overwrites the globalactive_account.target.deployment_id, so the last-configured deployment wins for all projects.This means
dosu audit --tasks ...always runs against the last-added deployment regardless of which project directory the user is in and regardless of what that project's MCP server is set to.Expected Behavior
The CLI should support project-scoped deployment configuration so that running
dosu audit(or other commands) in a given project directory automatically targets the correct deployment without manual overrides.Suggested Approach
Introduce a layered config resolution that checks for a project-local config before falling back to the global user-level config. For example:
.dosu/config.jsonin the project root (the.dosu/directory already exists for audit artifacts like.dosu/audit.json). This file could storedeployment_id,org_id,data_source_id, andapi_keyoverrides scoped to that project.dosu setup --deployment <id> --local— a flag to write the deployment binding to the project-local config instead of the global one.auditwould check for.dosu/config.jsonfirst, then fall back to the global config.As a simpler interim step, supporting
--deploymentor--data-source-iddirectly on theauditcommand would also help.Context
Reported by a user managing multiple projects with separate deployments. Current workarounds are either passing
--data-source-idexplicitly on every audit run, or re-runningdosu setup --deployment <id>before switching projects.