Skip to content

feat: add script to build and run compiled binary locally#262

Merged
anandgupta42 merged 3 commits intomainfrom
feat/local-build-script
Mar 18, 2026
Merged

feat: add script to build and run compiled binary locally#262
anandgupta42 merged 3 commits intomainfrom
feat/local-build-script

Conversation

@anandgupta42
Copy link
Contributor

What does this PR do?

Adds script/local.sh — a convenience script to build a single-platform compiled binary and run it locally with the correct NODE_PATH for @altimateai/altimate-core resolution.

Running the compiled binary locally was painful — required manually setting NODE_PATH and finding the right platform binary in dist/.

Usage:

./script/local.sh              # build + run
./script/local.sh --skip-build # run without rebuilding
./script/local.sh -- --help    # pass flags to altimate-code
bun run build:local            # just build for current platform

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Issue for this PR

Closes #260

How did you verify your code works?

  • Manually tested ./script/local.sh on macOS ARM64
  • Verified binary resolves correctly from dist/
  • Verified NODE_PATH allows @altimateai/altimate-core to load
  • 6-model consensus code review (Claude, GPT 5.2 Codex, Gemini 3.1 Pro, Kimi K2.5, MiniMax M2.5, GLM-5) — fixed all critical/major findings before commit

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • New and existing tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works

Running the compiled binary locally was painful — required manually
setting `NODE_PATH` and finding the right platform binary in `dist/`.

Adds:
- `script/local.sh` — builds single-platform binary and runs it with
  correct `NODE_PATH` for `@altimateai/altimate-core` resolution
- `build:local` and `local` package.json scripts for convenience

Usage:
  ./script/local.sh              # build + run
  ./script/local.sh --skip-build # run without rebuilding
  ./script/local.sh -- --help    # pass flags to altimate-code

Closes #260
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review.

Replace outdated "Building a localcode" section (referenced old
`opencode` naming and manual binary path) with the new `local.sh`
workflow including `--skip-build` and package.json script shortcuts.
Comment on lines +39 to +44
ARCH="$(uname -m)"
case "$ARCH" in
aarch64|arm64) ARCH="arm64" ;;
x86_64) ARCH="x64" ;;
esac

This comment was marked as outdated.

Under Rosetta 2, `uname -m` reports `x86_64` but `bun` builds a
native `arm64` binary. Check `sysctl.proc_translated` on macOS to
override arch when running under translation.
@anandgupta42 anandgupta42 merged commit 045b3df into main Mar 18, 2026
8 checks passed
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.

Add script to build and run altimate-code locally from compiled binary

1 participant