Open-source readiness: engine bootstrap, branding, release infra

Merged
AN
8mo ago
+2146-910

Summary

Prepares the monorepo for open-source release at github.com/AltimateAI/altimate-code. This PR covers four areas:

  • Engine bootstrap — uv-managed Python engine isolation (bridge/engine.ts). The CLI auto-downloads uv, creates an isolated Python 3.12 venv at ~/.local/share/altimate-code/engine/, and installs altimate-engine with zero system dependencies required. Adds altimate-code engine status/reset/path subcommand.
  • Branding cleanup — Renames all opencode/anomalyco/OPENCODE_* references to altimate-code/AltimateAI/ALTIMATE_CLI_* across 100+ files (source, build scripts, Docker, Homebrew, AUR, SDK exports, tests, theme URLs). Fixes a critical bug where build defines (OPENCODE_VERSION) didn't match consumer declarations (ALTIMATE_CLI_VERSION), causing version detection to fall back to "local" in production builds.
  • Release infrastructure — Unified release workflow (v* tag → npm + PyPI + GitHub Release), engine-only publish workflow (engine-v* → PyPI), version sync script (bump-version.ts), and RELEASING.md guide.
  • Open-source files — LICENSE (MIT), README, CONTRIBUTING, CODE_OF_CONDUCT, CHANGELOG, SECURITY, GitHub issue/PR templates, dependabot config, CI workflow.

Files changed: 120 (101 modified + 18 new + 1 snapshot)

Key new files

FilePurpose
packages/altimate-code/src/bridge/engine.tsuv-managed engine lifecycle (download, venv, install, upgrade)
packages/altimate-code/src/cli/cmd/engine.tsaltimate-code engine CLI subcommand
packages/altimate-code/script/bump-version.tsVersion sync between pyproject.toml and init.py
.github/workflows/release.ymlUnified release: npm + PyPI + GitHub Release
.github/workflows/ci.ymlCI: TypeScript (Bun) + Python (3.10/3.11/3.12 matrix)
.github/workflows/publish-engine.ymlEngine-only PyPI releases
RELEASING.mdComplete release process documentation

Remaining opencode references (all legitimate)

  • @gitlab/opencode-gitlab-auth — third-party npm package
  • providerID: "opencode" in test fixture — external OpenCode Zen AI provider
  • sst/opencode in test — generic GitHub URL parser test data
  • models-api.json — external provider definition from models.dev

Before publishing checklist

These steps must be completed before the first release:

1. npm token

  • Create an npm access token with publish permissions
  • Add it as NPM_TOKEN in GitHub repository secrets (Settings > Secrets and variables > Actions)

2. PyPI trusted publishing (OIDC — no API tokens needed)

  1. Go to https://pypi.org/manage/account/publishing/ (logged in as <pypi-account>)
  2. Add a new pending publisher:
    • Package name: altimate-engine
    • Owner: AltimateAI
    • Repository: altimate-code
    • Workflow: release.yml
    • Environment: pypi
  3. Create a pypi environment in GitHub repo settings (Settings > Environments > New environment > pypi)

3. Homebrew tap

  • Create AltimateAI/homebrew-tap repository on GitHub
  • Ensure the GITHUB_TOKEN used in Actions has write access to this repo (or add a PAT as HOMEBREW_TAP_TOKEN)

4. First release

# Bump engine version
bun run packages/altimate-code/script/bump-version.ts --engine 0.1.0

# Commit and tag
git add -A
git commit -m "release: v0.1.0"
git tag v0.1.0
git push origin main --tags

5. Optional: AUR (Linux)

  • Register altimate-code-bin package on AUR
  • Set up SSH key for AUR push access in CI secrets

6. Verify after first release

npm info altimate-code-ai version          # npm
pip install altimate-engine==0.1.0         # PyPI
brew update && brew info altimate/tap/altimate-code  # Homebrew
docker pull ghcr.io/<org>/altimate-code:<version>   # Docker

Test plan

  • Verify bun run packages/altimate-code/script/build.ts --single succeeds and ALTIMATE_ENGINE_VERSION is injected
  • Verify cd packages/altimate-engine && pytest passes (283+ tests)
  • Verify cd packages/altimate-engine && python -m build --sdist produces valid package
  • Verify CI workflow runs on this PR
  • Verify no OPENCODE_ or anomalyco references remain: grep -rn "OPENCODE_\|anomalyco" --include="*.ts" --include="*.py" --include="*.yml"

🤖 Generated with Claude Code