Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[FEATURE]: Add missing dbt commands or pass-through to native dbt CLI

Aperta
#897 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
50/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
typescript

Direzione di ricerca

Inizia da src/index.ts esaminando la mappa USAGE e il dispatch dei comandi, quindi leggi src/dbt-cli.ts e dbt-resolve.ts per comprendere la risoluzione esistente del binario dbt e il flusso run/configure. Confronta l’approccio proposto basato su allowlist o configurazione con il comportamento esistente dei comandi, inclusi gli argomenti dei selettori. Il lavoro è completato quando i comandi mancanti supportati possono raggiungere la CLI nativa dbt configurata senza modificare la gestione strutturata dei comandi curati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem:

altimate-dbt provides a curated subset of dbt commands (16 total), but several standard and frequently-used dbt commands are missing. When a user tries to invoke one of these, the CLI returns a hard error instead of falling back to the already-configured dbt binary.

Current behavior:
bash
$ altimate-dbt seed
{ "error": "Unknown command: seed", "usage": { ... } }

$ altimate-dbt snapshot
{ "error": "Unknown command: snapshot", "usage": { ... } }


Missing commands (not in src/index.ts USAGE map):

| Command       | dbt reference                      | Typical use case            |
|---------------|------------------------------------|-----------------------------|
| seed          | dbt seed                           | Load CSV seed files         |
| snapshot      | dbt snapshot                       | SCD Type-2 snapshots        |
| source        | dbt source freshness               | Source freshness checks     |
| docs          | dbt docs generate / dbt docs serve | Documentation               |
| clean         | dbt clean                          | Clean target/ and packages  |
| debug         | dbt debug                          | Full connection diagnostics |
| list / ls     | dbt list                           | Resource listing            |
| parse         | dbt parse                          | Parse project only          |
| run-operation | dbt run-operation                  | Execute macros              |
| clone         | dbt clone                          | Clone models (1.6+)         |
| retry         | dbt retry                          | Retry failed models (1.6+)  |

Additionally: even for implemented commands (build, run, test, compile), only single-model --model is supported. Native dbt selectors (--select, --exclude, --selector, tags) are not exposed.

Proposed solutions:

Option A: Add native wrappers for all commands. High maintenance as dbt evolves.

Option B (Recommended): Pass-through to configured dbt CLI. For any command not in the USAGE map, instead of returning Unknown command, delegate the full argument vector to the dbt binary that altimate-dbt init already resolved.

Implementation sketch:
ts
// src/index.ts — after the switch(cmd) block
default:
  const dbt = getDbt() // from dbt-resolve.ts
  const result = await run([cmd, ...rest])
  return { stdout: result.stdout, stderr: result.stderr, passthrough: true }


Why this works well:
- altimate-dbt init already resolves the correct Python env and dbt binary (venv, conda, pyenv, pipx, uv, pdm, poetry, etc.)
- src/dbt-cli.ts already has run() and configure() for this purpose
- Users get full native dbt power for advanced commands, while still benefiting from structured output for the 16 curated commands
- No need to maintain JSON log parsers for every sub-command

Safety considerations:
- Could be gated behind a config flag (allowPassthrough: true)
- Or allowlisted to known-safe commands (seed, snapshot, docs, clean, source, debug, list, parse, run-operation, clone, retry)

Context:
- Source inspected: packages/dbt-tools/src/index.ts @ main (commit a490bd4)
- altimate-code version: 0.8.3
- dbt versions tested: 1.5, 1.7, 1.9, 1.11 (JSON log format changes across these already make the CLI fallback in dbt-cli.ts necessary for compile/execute/ls)

Would you accept a PR for Option B (pass-through with an allowlist)? If so, I can draft the implementation.
Lingua principale
TypeScript
Stelle
815
Fork
135
Merge medio
1g 11h
PR unite (30g)
55

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AltimateAI/altimate-code

Tutte le issue di AltimateAI/altimate-code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.