| name | ARW Release Manager |
| description | Build and release manager for ARW CLI package. Handles local development, testing, building, documentation, version tagging, and publishing to npm and crates.io. Use when developing locally, running tests, building packages, releasing new versions, or publishing packages. |
ARW Release Manager
Build, test, and release orchestration for the ARW (Agent-Ready Web) CLI package supporting multiple build targets and publishing to npm and crates.io.
Build Targets
The ARW CLI supports three distinct build targets:
| Target | Command | Output | Use Case |
|---|
| napi-rs | npm run build | arw-cli.darwin-arm64.node | Node.js native addon (require in JS) |
| Standalone CLI | cargo build --release --features native | target/release/arw | Executable binary |
| WASM | npm run build:wasm | wasm-pkg/ | Browser/bundler usage |
Prerequisites
- Node.js 18+ and npm 8+
- Rust toolchain (rustc, cargo) for Rust builds
- Git repository
- wasm-pack (for WASM builds):
cargo install wasm-pack
For publishing only:
- npm account with publish access
- crates.io account with API token
What This Skill Does
- Local development - Watch mode, hot reload, iterative builds
- Testing - Unit tests, integration tests, WASM tests, linting
- Building - napi-rs native addon, standalone CLI, and WASM builds
- Pre-release validation - Git status, version checks, secrets scanning
- Documentation - CHANGELOG generation, API docs
- Version management - Semantic versioning, git tagging
- Publishing - npm publish, cargo publish with dry-run validation
Quick Start
Local Development (No Publishing)
npm install && npm run build
cargo build --release --features native
./target/release/arw --version
npm test && npm run test:wasm && cargo test
Full Release Workflow
./scripts/quick-publish.sh --dry-run
./scripts/quick-publish.sh
Build Targets Explained
1. napi-rs Native Addon (Node.js)
This builds a native Node.js addon using napi-rs. The result is a .node file that can be require()'d from JavaScript.
npm run build
npm run build:debug
node -e "const cli = require('./index.js'); console.log(cli.getVersionInfo());"
Exports: validateManifest, checkCompatibility, generateManifest, getVersionInfo
2. Standalone CLI Binary
This builds a standalone executable that can be run directly from the command line.
cargo build --release --features native
./target/release/arw --version
./target/release/arw --help
./target/release/arw validate path/to/manifest.json
./target/release/arw init
./target/release/arw generate
CLI Commands: init, generate, sitemap, validate, serve, scan, policy, robots, watch, actions, build
3. WASM Build
For browser and bundler usage.
npm run build:wasm
npm run build:wasm:web
npm run build:wasm:bundler
npm run test:wasm
Local Development Guide
Node.js Native Addon Development
npm install
npm run build
npm run build:debug
node -e "const {validateManifest, getVersionInfo} = require('./index.js'); console.log(getVersionInfo());"
npm link
Standalone CLI Development
cargo build --features native
cargo run --features native -- --version
cargo run --features native -- --help
cargo run --features native -- validate ./test-manifest.json
cargo build --release --features native
./target/release/arw --version
cargo install --path . --features native
arw --version
cargo install cargo-watch
cargo watch -x "run --features native -- --help"
WASM Development
npm run build:wasm
npm run test:wasm
Development Workflow
- Make code changes in
src/
- Run tests:
cargo test / npm run test:wasm
- Build target you need:
- Node.js addon:
npm run build
- Standalone CLI:
cargo build --release --features native
- WASM:
npm run build:wasm
- Test locally
- Repeat
Testing
Node.js Tests
npm test
npm run test:wasm
Rust Tests
cargo fmt --check
cargo clippy -- -D warnings
cargo test
cargo test -- --nocapture
cargo fmt --check && cargo clippy -- -D warnings && cargo test
Building
napi-rs Native Addon
npm run build
npm run build:debug
Output: arw-cli.<platform>.node + index.js + index.d.ts
Standalone CLI Binary
cargo build --features native
cargo build --release --features native
Output: target/release/arw or target/debug/arw
WASM Builds
npm run build:wasm
npm run build:wasm:web
npm run build:wasm:bundler
Output: wasm-pkg/nodejs/, wasm-pkg/web/, wasm-pkg/bundler/
Cross-Platform Standalone CLI Builds
cargo build --release --features native --target x86_64-unknown-linux-gnu
cargo build --release --features native --target x86_64-apple-darwin
cargo build --release --features native --target aarch64-apple-darwin
cargo build --release --features native --target x86_64-pc-windows-msvc
Pre-Release Validation
Run before any release:
./scripts/verify-package.sh
This checks:
- package.json validity and required fields
- Semantic version format
- Built files exist
- CLI executables have shebangs
- No hardcoded secrets
- Documentation files present
- Package size reasonable
Version Management
Semantic Versioning Rules
| Change Type | Version Bump | Example |
|---|
| Breaking changes | MAJOR | 1.0.0 → 2.0.0 |
| New features (backwards compatible) | MINOR | 1.0.0 → 1.1.0 |
| Bug fixes | PATCH | 1.0.0 → 1.0.1 |
Bump Version
npm version patch --no-git-tag-version
Update CHANGELOG
Use Keep a Changelog format. See resources/templates/CHANGELOG.template.md.
git log $(git describe --tags --abbrev=0)..HEAD --oneline
Publishing
npm
npm whoami
npm pack --dry-run
npm publish --dry-run --access public
npm publish --access public
npm view arw-cli
crates.io
cargo login
cargo publish --dry-run
cargo publish
cargo search arw-cli
Available Scripts
| Script | Purpose |
|---|
scripts/build-all.sh | Build all packages |
scripts/build-all.sh --dev | Development build only |
scripts/build-all.sh --release | Production release build |
scripts/verify-package.sh | Pre-release validation |
scripts/quick-publish.sh --dry-run | Preview release |
scripts/quick-publish.sh | Full release workflow |
scripts/quick-publish.sh --skip-tests | Release without tests |
scripts/quick-publish.sh --npm-only | Publish to npm only |
scripts/quick-publish.sh --cargo-only | Publish to crates.io only |
Troubleshooting
npm Issues
403 Forbidden
- Check
npm whoami - must be logged in
- Verify package name isn't taken
- Ensure
--access public for scoped packages
Version Already Exists
- npm doesn't allow republishing same version
- Bump version and try again
EPERM / Permission Denied
- Fix npm prefix:
npm config set prefix ~/.npm-global
- Or use
sudo (not recommended)
Cargo Issues
Not Logged In
- Run
cargo login with API token from crates.io
- Token stored in
~/.cargo/credentials.toml
Version Already Published
- crates.io doesn't allow version overwrites
- Must bump version
Missing Required Fields
- Cargo.toml needs: name, version, edition, description, license, repository
Git Issues
Dirty Working Tree
- Commit or stash changes before release
git stash or git add -A && git commit
Tag Already Exists
- Delete and recreate:
git tag -d v1.0.0 && git tag v1.0.0
- Or use different version
Advanced Configuration
See docs/ADVANCED.md for:
- CI/CD integration with GitHub Actions
- Multi-platform release builds
- Automated changelog generation
- GPG signing releases
- Pre-release channels (alpha, beta, rc)
Resources