Skip to content

Support project-local deployment configuration #138

Description

@dosu-oss-pool-10

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:

  1. 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.
  2. dosu setup --deployment <id> --local — a flag to write the deployment binding to the project-local config instead of the global one.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions