Build from source

For contributors, or to build a binary for a platform that has no published release yet.

Prerequisites

  • Bun ≥ 1.1 (smartspec uses bun build --compile).
  • Git.

Clone and build

git clone https://github.com/smartwebanto/smartspec.git
cd smartspec
bun install

# Single binary for your current platform
bash scripts/build.sh

# Or all six supported targets at once
bash scripts/build-all.sh

scripts/build.sh produces dist/smartspec. scripts/build-all.sh produces six binaries under dist/bun-<target>/smartspec:

  • bun-darwin-arm64
  • bun-darwin-x64
  • bun-linux-arm64
  • bun-linux-arm64-musl
  • bun-linux-x64
  • bun-linux-x64-musl

Run without installing globally

bun src/cli.ts audit https://example.com

This is what the dev:cli npm script does.

Run the test suite

npm run test:cli       # unit tests for the CLI
npm run test:e2e       # end-to-end tests
npm run smoke          # smoke audit against a known-good URL