Spec4AI

Getting Started

Install the sai CLI, browse the marketplace, and start shipping with executable specs in minutes.

1. Install the CLI

The sai CLI is a standalone binary — no Node.js, no Python, no package manager required. Download the binary for your platform from the Download page, then add it to your PATH.

macOS / Linux

# Extract the downloaded archive
tar -xzf sai-linux-x64.tar.gz
# Move to your PATH
sudo mv sai /usr/local/bin/
# Verify install
sai --version

Windows

# Extract sai-windows-x64.zip, then add the folder to your PATH
sai --version

2. Browse the Marketplace

The Marketplace lists all published specs. Filter by capability (Auth, Payments, Search), stack (Next.js 15, Node 20, Postgres 16), and maturity (stable vs canary). Each spec shows its artifact type, install count, and latest channel.

What to look for

  • Stable channel — tested, production-ready, backed by creator
  • Canary channel — latest features, may have breaking changes
  • Compatibility profile — matches your exact stack version
  • Maturity badge — Draft → Beta → Usable → Stable → Maintained

3. Install a Spec

Use sai install with the spec slug and channel. The CLI downloads and extracts the spec bundle into your project directory.

# Install from stable channel
sai install auth-system@stable
# Install from canary channel
sai install auth-system@canary
# Install pinned version
sai install auth-system@1.2.0

The spec is installed into a .specs/ directory in your project root. Your AI agent reads from this directory during development.

4. Validate Your Spec

Before publishing or handing off to an AI agent, validate the spec structure and completeness score.

# Validate spec structure and show score
sai verify ./my-spec
# Publish once score is 80%+
sai publish

Why specs beat prompts

Unlike a raw prompt, a Spec is a versioned, structured build contract. It tells your AI agent exactly what to build, what decisions have been made, and how to verify the result.

  • QA file — structured inputs, no ambiguity
  • Agent file — step-by-step build instructions
  • Checks file — automated validation that it actually works
  • Status file — living memory, survives context resets
  • Channels — update the spec without breaking stable users