Skip to content

dct init

Bootstrap a dbt charts project, plus its AI and editor integrations.

dct init [OPTIONS]
dct init [OPTIONS] COMMAND [ARGS]

Without a subcommand, dct init runs the interactive bootstrap wizard. With a subcommand, it targets a specific integration.

Subcommands

Command Purpose
dct init skills Install dbt charts workflow skills to agent skill directories
dct init mcp Wire dbt charts into an AI assistant via MCP (Cursor, Claude Code, ChatGPT, etc.)
dct init code Install the dbt charts extension into VS Code
dct init vscode Alias for dct init code
dct init cursor Install the dbt charts extension into Cursor

Top-level options

Flag Description
--project-dir PATH Project directory. Overrides the wizard's default root selection.
--force, -f Overwrite existing scaffold files.
--yes, -y Accept all defaults without prompting.
--skills / --no-skills Install dbt charts workflow skills to agent skill directories.
--mcp / --no-mcp Set up MCP server for AI assistants.
--skills / --no-skills Install workflow skills to agent skill directories.
--with-playground / --no-with-playground Install the dbt-charts[playground] extra (enables dct playground). Off by default — dbt-charts-playground is not yet on public PyPI; if install fails, dct init warns instead of aborting.
--vscode / --no-vscode Install dbt charts extension into VS Code.
--cursor / --no-cursor Install dbt charts extension into Cursor.

Examples

# Interactive wizard
dct init

# Accept all defaults
dct init --yes

# Skip MCP setup
dct init --no-mcp

# Install workflow skills and MCP, no editor extensions
dct init --no-vscode --no-cursor

# Request playground install (not attempted by default; warns if unavailable)
dct init --with-playground

Project root resolution

dct init resolves its scaffold target in this order:

  1. --project-dir or DCT_PROJECT_DIR
  2. The detected dbt charts or dbt project root, when dbt_charts.yml or dbt_project.yml exists at or above the current directory
  3. Git root, when no dbt_charts.yml or dbt_project.yml exists above the current directory but a .git/ directory does
  4. Current directory, when no project marker or git root is found

In the bare-git-repo case, the interactive wizard shows both paths and asks whether to scaffold at the git root instead of the current subdirectory. The default is the git root. dct init --yes takes that same default without prompting.

dct init skills

Install dbt charts workflow skills for file-based agent auto-discovery. Writes CLI-rendered skill files to .agents/skills/ (Cursor, Codex, Copilot) and/or the Claude Code skills directory. Does not configure MCP or modify AGENTS.md / CLAUDE.md.

dct init skills [OPTIONS] [TARGET]

Arguments

Argument Description
TARGET Install target: agents (Cursor/Codex/Copilot), codex, or claude. Omit to auto-detect.

Options

Flag Description
--all Install to every detected skill directory.
--dir PATH Explicit destination directory.
--force, -f Overwrite existing skill files.
--check Dry run: show what would be installed without writing files.
--project-dir PATH Project root.

Examples

dct init skills                 # Detect targets and install
dct init skills agents          # .agents/skills/ only (Cursor, Codex, Copilot)
dct init skills claude          # Claude Code skills directory only
dct init skills --all           # Every detected target directory
dct init skills --dir PATH      # Explicit destination
dct init skills --check         # Dry run
dct init skills -f              # Overwrite existing files

After upgrading dbt charts (pip install -U dbt-charts), re-run dct init skills to pick up new or updated skills.

dct init mcp

Add dbt charts to your AI client's MCP configuration. Configures the MCP server only. Run dct init skills separately to install workflow skills to agent file directories.

dct init mcp [OPTIONS] [CLIENT]

Arguments

Argument Description
CLIENT One of: cursor, vscode, claude, claude-code, codex, copilot, or print. Omit to auto-detect installed clients.

Options

Flag Description
--all Write MCP config files for every supported client.
--force, -f Overwrite existing dbt charts config.
--project-dir PATH Path to the dbt charts or dbt project the MCP server should target. Embedded into the generated server entry.

Project root resolution

dct init mcp walks up from the current directory looking for dbt_charts.yml or dbt_project.yml. Pass --project-dir to override. When the project root diverges from the AI client's workspace (e.g. a project nested under a larger repo), the generated server entry includes --project-dir <abs-path> so the server still starts in the right place.

Examples

dct init mcp                              # Auto-detect clients + project
dct init mcp cursor                       # Configure Cursor only
dct init mcp claude-code                  # Configure Claude Code
dct init mcp --all                        # Write every supported config file
dct init mcp --project-dir ./analytics    # Target a specific project dir
dct init mcp print                        # Print config JSON (for manual setup)

dct init code / dct init vscode

Install the dbt charts extension into VS Code. Adds YAML schema, completion, and live-preview integration — see VS Code & Cursor Extension.

dct init code
dct init vscode    # alias

dct init cursor

Install the dbt charts extension into Cursor.

dct init cursor