|
| 1 | +<div align="center"> |
| 2 | + |
1 | 3 | # altimate-code |
2 | 4 |
|
3 | | -AI-powered CLI for SQL analysis, dbt integration, and data engineering. |
| 5 | +**The AI coding agent for data teams.** |
| 6 | + |
| 7 | +Batteries included for SQL, dbt, and data warehouses. |
4 | 8 |
|
5 | | -[](https://www.npmjs.com/package/altimate-code-ai) |
6 | | -[](https://pypi.org/project/altimate-engine/) |
| 9 | +[](https://www.npmjs.com/package/@altimateai/altimate-code) |
| 10 | +[](https://pypi.org/project/altimate-engine/) |
7 | 11 | [](./LICENSE) |
8 | 12 | [](https://github.com/AltimateAI/altimate-code/actions/workflows/ci.yml) |
9 | 13 |
|
10 | | -## Features |
| 14 | +</div> |
11 | 15 |
|
12 | | -- **SQL Analysis & Formatting** -- Parse, validate, and auto-format SQL across dialects |
13 | | -- **Column-Level Lineage** -- Trace data flow at the column level through complex SQL transformations |
14 | | -- **dbt Integration** -- Profile management, project-aware lineage, and `+` operator for upstream/downstream selection |
15 | | -- **Warehouse Connectivity** -- Connect to Snowflake, BigQuery, Databricks, Postgres, DuckDB, and MySQL |
16 | | -- **AI-Powered Code Review** -- Get intelligent suggestions on SQL quality, performance, and best practices |
17 | | -- **TUI Interface** -- Interactive terminal UI built with Solid.js |
18 | | -- **MCP Server** -- Model Context Protocol support for integration with AI assistants |
| 16 | +--- |
19 | 17 |
|
20 | | -## Quick Install |
| 18 | +An AI coding agent with 40+ specialized data tools, column-level lineage, dbt integration, and warehouse connectivity built in -- all available to any AI provider. |
| 19 | + |
| 20 | +## Install |
21 | 21 |
|
22 | 22 | ```bash |
23 | 23 | # npm |
24 | | -npm install -g @altimateai/altimate-code |
| 24 | +npm i -g @altimateai/altimate-code |
25 | 25 |
|
26 | 26 | # Homebrew |
27 | | -brew install altimate/tap/altimate-code |
| 27 | +brew install AltimateAI/tap/altimate-code |
28 | 28 | ``` |
29 | 29 |
|
30 | | -## Getting Started |
| 30 | +Then run `altimate-code` to launch the interactive TUI, or `altimate-code run "your prompt"` for one-shot mode. |
31 | 31 |
|
32 | | -```bash |
33 | | -# Launch the interactive TUI |
34 | | -altimate-code |
| 32 | +## Highlights |
35 | 33 |
|
36 | | -# Analyze a SQL file |
37 | | -altimate-code analyze query.sql |
| 34 | +| Capability | Details | |
| 35 | +|---|---| |
| 36 | +| **SQL analysis** | 40+ tools -- lint, format, transpile, optimize, safety checks | |
| 37 | +| **Column-level lineage** | Trace data flow through complex SQL and dbt models | |
| 38 | +| **dbt integration** | Manifest parsing, profile management, `+` operator | |
| 39 | +| **Warehouse connectivity** | Snowflake, BigQuery, Redshift, Databricks, Postgres, DuckDB, MySQL, SQL Server | |
| 40 | +| **PII detection** | Classify sensitive columns, flag risky queries | |
| 41 | +| **Query cost prediction** | Estimate execution costs before running | |
| 42 | +| **FinOps** | Credit analysis, query history insights | |
| 43 | +| **AI providers** | 15+ providers -- Anthropic, OpenAI, Gemini, Bedrock, and more | |
| 44 | +| **TUI + headless** | Interactive terminal UI or `altimate-code serve` for CI/CD | |
| 45 | +| **MCP + LSP** | Model Context Protocol and Language Server Protocol support | |
38 | 46 |
|
39 | | -# Trace column lineage |
40 | | -altimate-code lineage --sql "SELECT a.id, b.name FROM a JOIN b ON a.id = b.id" |
41 | | -``` |
| 47 | +## Features |
| 48 | + |
| 49 | +### SQL Analysis (40+ tools) |
| 50 | + |
| 51 | +The AI has access to specialized SQL tools that go far beyond what a general coding agent can do: |
| 52 | + |
| 53 | +- **Lint & validate** -- Catch anti-patterns like implicit casts, NULL comparisons, unused CTEs |
| 54 | +- **Format** -- Consistent SQL formatting across your team |
| 55 | +- **Transpile** -- Convert between Snowflake, BigQuery, Postgres, T-SQL, MySQL, DuckDB |
| 56 | +- **Optimize** -- Get index suggestions, query rewrites, complexity reduction |
| 57 | +- **Safety checks** -- Detect breaking changes, SQL injection risks, schema violations |
| 58 | +- **Test generation** -- Auto-generate SQL tests for your models |
| 59 | +- **Equivalence checking** -- Verify two queries produce the same results |
| 60 | + |
| 61 | +### Column-Level Lineage |
| 62 | + |
| 63 | +Trace data flow at the column level through complex SQL transformations. Works standalone or with dbt manifests for project-wide lineage across models. |
| 64 | + |
| 65 | +### dbt Integration |
| 66 | + |
| 67 | +- Parse `manifest.json` and `profiles.yml` natively |
| 68 | +- Column-level lineage across dbt models with `+` operator for upstream/downstream selection |
| 69 | +- Execute dbt commands (compile, run, test) directly from the agent |
| 70 | +- Profile management across environments |
| 71 | + |
| 72 | +### Warehouse Connectivity |
| 73 | + |
| 74 | +Connect directly to your data warehouse -- the AI can query schemas, run SQL, predict costs, and analyze query history: |
| 75 | + |
| 76 | +- Snowflake (with IAM auth) |
| 77 | +- BigQuery (service account + ADC) |
| 78 | +- Redshift (with IAM auth) |
| 79 | +- Databricks |
| 80 | +- PostgreSQL |
| 81 | +- DuckDB |
| 82 | +- MySQL |
| 83 | +- SQL Server |
| 84 | +- SSH tunneling for secure connections |
| 85 | + |
| 86 | +### AI Providers |
| 87 | + |
| 88 | +Use any model you want. altimate-code supports 15+ providers via the Vercel AI SDK: |
| 89 | + |
| 90 | +Anthropic, OpenAI, Google Gemini, Google Vertex AI, Amazon Bedrock, Azure OpenAI, Mistral, Groq, DeepInfra, Cerebras, Cohere, Together AI, Perplexity, xAI, OpenRouter, GitHub Copilot, GitLab |
| 91 | + |
| 92 | +### And more |
| 93 | + |
| 94 | +- Interactive TUI with Solid.js + OpenTUI |
| 95 | +- Headless server mode (`altimate-code serve`) |
| 96 | +- MCP server support (stdio, HTTP, SSE transports) |
| 97 | +- LSP integration (workspace symbols, diagnostics) |
| 98 | +- Session management (continue, fork, export/import) |
| 99 | +- Custom agents and plugins |
| 100 | +- GitHub integration (PR analysis, automated workflows) |
| 101 | +- Token usage stats and cost tracking |
42 | 102 |
|
43 | 103 | ## Architecture |
44 | 104 |
|
45 | 105 | ``` |
46 | | -CLI (TypeScript / Bun) |
| 106 | +altimate-code (TypeScript CLI) |
47 | 107 | | |
48 | | - JSON-RPC Bridge (stdio) |
| 108 | + JSON-RPC 2.0 (stdio) |
49 | 109 | | |
50 | | -Python Engine (altimate-engine) |
| 110 | +altimate-engine (Python) |
| 111 | + SQL analysis, lineage, dbt, warehouse connections |
51 | 112 | ``` |
52 | 113 |
|
53 | | -The CLI is written in TypeScript and runs on Bun. It communicates with the Python engine (`altimate-engine`) over a JSON-RPC 2.0 bridge using stdio. The Python engine handles SQL parsing, analysis, lineage computation, and warehouse interactions. |
| 114 | +The CLI handles AI interactions, TUI, and tool orchestration. The Python engine handles SQL parsing, analysis, lineage computation, and warehouse interactions via a JSON-RPC bridge. |
54 | 115 |
|
55 | | -The Python engine **auto-bootstraps using `uv`** -- no system Python dependencies are required. On first run, the CLI downloads `uv`, creates an isolated virtual environment, and installs the engine automatically. |
56 | | - |
57 | | -## Monorepo Structure |
58 | | - |
59 | | -``` |
60 | | -packages/ |
61 | | - altimate-code/ TypeScript CLI (@altimate/cli) |
62 | | - altimate-engine/ Python engine (SQL analysis, lineage, warehouse) |
63 | | - plugin/ CLI plugin system (@altimate/cli-plugin) |
64 | | - sdk/js/ JavaScript SDK (@altimate/cli-sdk) |
65 | | - util/ Shared TypeScript utilities |
66 | | -``` |
| 116 | +**Zero-dependency bootstrap**: On first run the CLI downloads [`uv`](https://github.com/astral-sh/uv), creates an isolated Python environment, and installs the engine automatically. No system Python required. |
67 | 117 |
|
68 | 118 | ## Development |
69 | 119 |
|
70 | | -See [CONTRIBUTING.md](./CONTRIBUTING.md) for full development setup instructions. |
| 120 | +See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full setup guide. |
71 | 121 |
|
72 | 122 | ```bash |
73 | | -# Install dependencies |
| 123 | +git clone https://github.com/AltimateAI/altimate-code.git |
| 124 | +cd altimate-code |
| 125 | + |
| 126 | +# TypeScript |
74 | 127 | bun install |
| 128 | +cd packages/altimate-code && bun test |
| 129 | + |
| 130 | +# Python engine |
| 131 | +cd packages/altimate-engine |
| 132 | +python -m venv .venv && source .venv/bin/activate |
| 133 | +pip install -e ".[dev]" |
| 134 | +pytest |
| 135 | +``` |
75 | 136 |
|
76 | | -# Build the CLI |
77 | | -cd packages/altimate-code && bun run script/build.ts --single |
| 137 | +### Monorepo structure |
78 | 138 |
|
79 | | -# Run tests |
80 | | -bun test |
| 139 | +``` |
| 140 | +packages/ |
| 141 | + altimate-code/ TypeScript CLI |
| 142 | + altimate-engine/ Python engine (SQL, lineage, warehouses) |
| 143 | + plugin/ Plugin system |
| 144 | + sdk/js/ JavaScript SDK |
| 145 | + util/ Shared utilities |
81 | 146 | ``` |
82 | 147 |
|
83 | 148 | ## Documentation |
84 | 149 |
|
85 | | -Full documentation is available at [altimate-code.sh](https://altimate-code.sh). |
| 150 | +Full docs at [altimate-code.sh](https://altimate-code.sh). |
86 | 151 |
|
87 | 152 | ## Contributing |
88 | 153 |
|
89 | | -We welcome contributions! Please read our [Contributing Guide](./CONTRIBUTING.md) before submitting a pull request. |
| 154 | +Contributions welcome! Please read the [Contributing Guide](./CONTRIBUTING.md) before opening a PR. |
| 155 | + |
| 156 | +## Acknowledgements |
| 157 | + |
| 158 | +altimate-code is a fork of [opencode](https://github.com/anomalyco/opencode), the open-source AI coding agent. We build on top of their excellent foundation to add data-team-specific capabilities. |
90 | 159 |
|
91 | 160 | ## License |
92 | 161 |
|
93 | | -This project is licensed under the MIT License -- see the [LICENSE](./LICENSE) file for details. |
| 162 | +MIT -- see [LICENSE](./LICENSE). |
0 commit comments