Skip to content

Commit 221220b

Browse files
anandgupta42kulvirgit
authored andcommitted
docs: rewrite README, update package name and Homebrew tap path
1 parent f2cd5c1 commit 221220b

5 files changed

Lines changed: 145 additions & 70 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@ jobs:
1515

1616
- uses: oven-sh/setup-bun@v2
1717

18+
- name: Configure git for tests
19+
run: |
20+
git config --global user.name "CI"
21+
git config --global user.email "ci@test.local"
22+
1823
- name: Install dependencies
1924
run: bun install
2025

2126
- name: Run tests
2227
run: bun test
28+
working-directory: packages/altimate-code
2329

2430
python:
2531
name: Python ${{ matrix.python-version }}

README.md

Lines changed: 117 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,162 @@
1+
<div align="center">
2+
13
# altimate-code
24

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.
48

5-
[![npm version](https://img.shields.io/npm/v/altimate-code-ai)](https://www.npmjs.com/package/altimate-code-ai)
6-
[![PyPI version](https://img.shields.io/pypi/v/altimate-engine)](https://pypi.org/project/altimate-engine/)
9+
[![npm](https://img.shields.io/npm/v/@altimateai/altimate-code)](https://www.npmjs.com/package/@altimateai/altimate-code)
10+
[![PyPI](https://img.shields.io/pypi/v/altimate-engine)](https://pypi.org/project/altimate-engine/)
711
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
812
[![CI](https://github.com/AltimateAI/altimate-code/actions/workflows/ci.yml/badge.svg)](https://github.com/AltimateAI/altimate-code/actions/workflows/ci.yml)
913

10-
## Features
14+
</div>
1115

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+
---
1917

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
2121

2222
```bash
2323
# npm
24-
npm install -g @altimateai/altimate-code
24+
npm i -g @altimateai/altimate-code
2525

2626
# Homebrew
27-
brew install altimate/tap/altimate-code
27+
brew install AltimateAI/tap/altimate-code
2828
```
2929

30-
## Getting Started
30+
Then run `altimate-code` to launch the interactive TUI, or `altimate-code run "your prompt"` for one-shot mode.
3131

32-
```bash
33-
# Launch the interactive TUI
34-
altimate-code
32+
## Highlights
3533

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 |
3846

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
42102

43103
## Architecture
44104

45105
```
46-
CLI (TypeScript / Bun)
106+
altimate-code (TypeScript CLI)
47107
|
48-
JSON-RPC Bridge (stdio)
108+
JSON-RPC 2.0 (stdio)
49109
|
50-
Python Engine (altimate-engine)
110+
altimate-engine (Python)
111+
SQL analysis, lineage, dbt, warehouse connections
51112
```
52113

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.
54115

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.
67117

68118
## Development
69119

70-
See [CONTRIBUTING.md](./CONTRIBUTING.md) for full development setup instructions.
120+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full setup guide.
71121

72122
```bash
73-
# Install dependencies
123+
git clone https://github.com/AltimateAI/altimate-code.git
124+
cd altimate-code
125+
126+
# TypeScript
74127
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+
```
75136

76-
# Build the CLI
77-
cd packages/altimate-code && bun run script/build.ts --single
137+
### Monorepo structure
78138

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
81146
```
82147

83148
## Documentation
84149

85-
Full documentation is available at [altimate-code.sh](https://altimate-code.sh).
150+
Full docs at [altimate-code.sh](https://altimate-code.sh).
86151

87152
## Contributing
88153

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.
90159

91160
## License
92161

93-
This project is licensed under the MIT License -- see the [LICENSE](./LICENSE) file for details.
162+
MIT -- see [LICENSE](./LICENSE).

packages/altimate-code/src/cli/cmd/uninstall.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ async function showRemovalSummary(targets: RemovalTargets, method: Installation.
129129

130130
if (method !== "curl" && method !== "unknown") {
131131
const cmds: Record<string, string> = {
132-
npm: "npm uninstall -g altimate-code-ai",
133-
pnpm: "pnpm uninstall -g altimate-code-ai",
134-
bun: "bun remove -g altimate-code-ai",
135-
yarn: "yarn global remove altimate-code-ai",
132+
npm: "npm uninstall -g @altimateai/altimate-code",
133+
pnpm: "pnpm uninstall -g @altimateai/altimate-code",
134+
bun: "bun remove -g @altimateai/altimate-code",
135+
yarn: "yarn global remove @altimateai/altimate-code",
136136
brew: "brew uninstall altimate-code",
137137
choco: "choco uninstall altimate-code",
138138
scoop: "scoop uninstall altimate-code",
@@ -180,10 +180,10 @@ async function executeUninstall(method: Installation.Method, targets: RemovalTar
180180

181181
if (method !== "curl" && method !== "unknown") {
182182
const cmds: Record<string, string[]> = {
183-
npm: ["npm", "uninstall", "-g", "altimate-code-ai"],
184-
pnpm: ["pnpm", "uninstall", "-g", "altimate-code-ai"],
185-
bun: ["bun", "remove", "-g", "altimate-code-ai"],
186-
yarn: ["yarn", "global", "remove", "altimate-code-ai"],
183+
npm: ["npm", "uninstall", "-g", "@altimateai/altimate-code"],
184+
pnpm: ["pnpm", "uninstall", "-g", "@altimateai/altimate-code"],
185+
bun: ["bun", "remove", "-g", "@altimateai/altimate-code"],
186+
yarn: ["yarn", "global", "remove", "@altimateai/altimate-code"],
187187
brew: ["brew", "uninstall", "altimate-code"],
188188
choco: ["choco", "uninstall", "altimate-code"],
189189
scoop: ["scoop", "uninstall", "altimate-code"],

packages/altimate-code/src/installation/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export namespace Installation {
104104
for (const check of checks) {
105105
const output = await check.command()
106106
const installedName =
107-
check.name === "brew" || check.name === "choco" || check.name === "scoop" ? "altimate-code" : "altimate-code-ai"
107+
check.name === "brew" || check.name === "choco" || check.name === "scoop" ? "altimate-code" : "@altimateai/altimate-code"
108108
if (output.includes(installedName)) {
109109
return check.name
110110
}
@@ -121,8 +121,8 @@ export namespace Installation {
121121
)
122122

123123
async function getBrewFormula() {
124-
const tapFormula = await $`brew list --formula altimate/tap/altimate-code`.throws(false).quiet().text()
125-
if (tapFormula.includes("altimate-code")) return "altimate/tap/altimate-code"
124+
const tapFormula = await $`brew list --formula AltimateAI/tap/altimate-code`.throws(false).quiet().text()
125+
if (tapFormula.includes("altimate-code")) return "AltimateAI/tap/altimate-code"
126126
const coreFormula = await $`brew list --formula altimate-code`.throws(false).quiet().text()
127127
if (coreFormula.includes("altimate-code")) return "altimate-code"
128128
return "altimate-code"
@@ -138,19 +138,19 @@ export namespace Installation {
138138
})
139139
break
140140
case "npm":
141-
cmd = $`npm install -g altimate-code-ai@${target}`
141+
cmd = $`npm install -g @altimateai/altimate-code@${target}`
142142
break
143143
case "pnpm":
144-
cmd = $`pnpm install -g altimate-code-ai@${target}`
144+
cmd = $`pnpm install -g @altimateai/altimate-code@${target}`
145145
break
146146
case "bun":
147-
cmd = $`bun install -g altimate-code-ai@${target}`
147+
cmd = $`bun install -g @altimateai/altimate-code@${target}`
148148
break
149149
case "brew": {
150150
const formula = await getBrewFormula()
151151
if (formula.includes("/")) {
152152
cmd =
153-
$`brew tap altimate/tap && cd "$(brew --repo altimate/tap)" && git pull --ff-only && brew upgrade ${formula}`.env(
153+
$`brew tap AltimateAI/tap && cd "$(brew --repo AltimateAI/tap)" && git pull --ff-only && brew upgrade ${formula}`.env(
154154
{
155155
HOMEBREW_NO_AUTO_UPDATE: "1",
156156
...process.env,
@@ -220,7 +220,7 @@ export namespace Installation {
220220
return reg.endsWith("/") ? reg.slice(0, -1) : reg
221221
})
222222
const channel = CHANNEL
223-
return fetch(`${registry}/altimate-code-ai/${channel}`)
223+
return fetch(`${registry}/@altimateai/altimate-code/${channel}`)
224224
.then((res) => {
225225
if (!res.ok) throw new Error(res.statusText)
226226
return res.json()

packages/altimate-code/test/cli/github-remote.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ import { test, expect } from "bun:test"
22
import { parseGitHubRemote } from "../../src/cli/cmd/github"
33

44
test("parses https URL with .git suffix", () => {
5-
expect(parseGitHubRemote("https://github.com/AltimateAI/altimate-code.git")).toEqual({ owner: "sst", repo: "opencode" })
5+
expect(parseGitHubRemote("https://github.com/AltimateAI/altimate-code.git")).toEqual({ owner: "AltimateAI", repo: "altimate-code" })
66
})
77

88
test("parses https URL without .git suffix", () => {
9-
expect(parseGitHubRemote("https://github.com/AltimateAI/altimate-code")).toEqual({ owner: "sst", repo: "opencode" })
9+
expect(parseGitHubRemote("https://github.com/AltimateAI/altimate-code")).toEqual({ owner: "AltimateAI", repo: "altimate-code" })
1010
})
1111

1212
test("parses git@ URL with .git suffix", () => {
13-
expect(parseGitHubRemote("git@github.com:AltimateAI/altimate-code.git")).toEqual({ owner: "sst", repo: "opencode" })
13+
expect(parseGitHubRemote("git@github.com:AltimateAI/altimate-code.git")).toEqual({ owner: "AltimateAI", repo: "altimate-code" })
1414
})
1515

1616
test("parses git@ URL without .git suffix", () => {
17-
expect(parseGitHubRemote("git@github.com:AltimateAI/altimate-code")).toEqual({ owner: "sst", repo: "opencode" })
17+
expect(parseGitHubRemote("git@github.com:AltimateAI/altimate-code")).toEqual({ owner: "AltimateAI", repo: "altimate-code" })
1818
})
1919

2020
test("parses ssh:// URL with .git suffix", () => {
21-
expect(parseGitHubRemote("ssh://git@github.com/AltimateAI/altimate-code.git")).toEqual({ owner: "sst", repo: "opencode" })
21+
expect(parseGitHubRemote("ssh://git@github.com/AltimateAI/altimate-code.git")).toEqual({ owner: "AltimateAI", repo: "altimate-code" })
2222
})
2323

2424
test("parses ssh:// URL without .git suffix", () => {
25-
expect(parseGitHubRemote("ssh://git@github.com/AltimateAI/altimate-code")).toEqual({ owner: "sst", repo: "opencode" })
25+
expect(parseGitHubRemote("ssh://git@github.com/AltimateAI/altimate-code")).toEqual({ owner: "AltimateAI", repo: "altimate-code" })
2626
})
2727

2828
test("parses http URL", () => {

0 commit comments

Comments
 (0)