Skip to content

feat: add altimate-dbt CLI for dbt project operations#145

Closed
suryaiyer95 wants to merge 10000 commits intomainfrom
feat/dbt-tools-cli
Closed

feat: add altimate-dbt CLI for dbt project operations#145
suryaiyer95 wants to merge 10000 commits intomainfrom
feat/dbt-tools-cli

Conversation

@suryaiyer95
Copy link
Contributor

Summary

  • New packages/dbt-tools/ TypeScript package wrapping @altimateai/dbt-integration to provide one-shot dbt CLI operations
  • 16 commands covering the full dbt workflow: compile, build, run, test, execute SQL, introspect columns/DAG, manage packages
  • Config auto-detected via altimate-dbt init, stored at ~/.altimate-code/dbt.json
  • Prerequisite validation (doctor) checks Python, dbt-core, and project health before loading the heavy adapter
  • Structured JSON output with actionable error + fix fields for all failure modes
  • Patch for python-bridge@1.1.0 to fix bluebird.promisifyAll crash with class private fields
  • Builds with bun build --target node for Node.js runtime (workaround for Bun IPC channel bug)
  • /dbt-cli skill teaching AI agents when and how to invoke each command

Architecture

altimate-dbt CLI (packages/dbt-tools/)
  ├── bin/altimate-dbt          # #!/usr/bin/env node shebang
  ├── src/index.ts              # CLI entry: argv dispatch, error handling, JSON output
  ├── src/config.ts             # Read/write ~/.altimate-code/dbt.json
  ├── src/adapter.ts            # Wire DBTProjectIntegrationAdapter (10 parsers, 4 factories)
  ├── src/check.ts              # Prerequisite validation (Python, dbt, project)
  ├── src/commands/             # 9 command files implementing 16 commands
  └── test/                     # 11 tests (config round-trip, CLI dispatch, error paths)

.opencode/skills/dbt-cli/       # AI skill with workflow patterns and invocation guidance
patches/python-bridge@1.1.0.patch  # Fix bluebird.promisifyAll crash

Commands

Category Commands
Setup init, doctor
Info info
Compile compile, compile-query
Build build, run, test, build-project
Execute execute
Introspect columns, columns-source, column-values, children, parents
Packages deps, add-packages

Test plan

  • bun test --cwd packages/dbt-tools — 11/11 tests pass
  • bun turbo typecheck — 0 type errors in dbt-tools
  • altimate-dbt init --project-root <path> — writes config, runs health checks
  • altimate-dbt doctor — returns structured check results
  • altimate-dbt info — returns project info via adapter
  • /dbt-cli skill loads and guides AI to run correct commands
  • Full compile/build/execute flow requires dbt_core_integration Python module

🤖 Generated with Claude Code

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.