# ASA CLI v2 — Starter Kit

> Slice-oriented architecture tool for AI-built apps.
> New repo from scratch. Replaces `asa-starter-kit` + `asa-cli`.

## Quick Start

```bash
pip install -e ".[dev]"
asa --help
```

## Commands

### Public Core (9)

| Command | Role | Description |
|---|---|---|
| `asa init` | Builder | Initialize ASA project (config, domains/, shared/) |
| `asa scan` | Diagnostic | ACI score, structural risk, hotspots |
| `asa install <module>` | Builder | Install foundation module (auth-basic, db-basic, payments-basic) |
| `asa slice new <name>` | Builder | Create new vertical slice (FE + BE + contract) |
| `asa slice update <name>` | Builder | Regenerate slice (preserve user code via markers) |
| `asa slice plan <spec>` | Builder | Spec → slice architecture proposal |
| `asa slice split <name>` | Builder | Analyze oversized slice, propose split |
| `asa lint` | Enforcement | Boundary, contract, security checks |
| `asa deploy` | Delivery | Vercel + Supabase deployment |

### Advanced (4)

| Command | Description |
|---|---|
| `asa slice build <name>` | Run internal build pipeline (contract → zod → skeleton) |
| `asa slice sync` | Validate all contracts across project |
| `asa slice analyze <name>` | Detailed slice analysis (LOC, coupling, complexity) |
| `asa ui generate <name>` | Regenerate frontend part of slice |

## ASA Native Stack v1

All generated code targets this stack:

- **Frontend:** Next.js (App Router) + TypeScript + React
- **UI:** Tailwind CSS + shadcn/ui
- **Backend:** Next.js route handlers / server actions
- **Database:** PostgreSQL via Supabase
- **Auth:** Supabase Auth (SSR/cookie-based)
- **Payments:** Stripe
- **Deploy:** Vercel + Supabase

## Foundation Modules

| Module | Command | What it creates |
|---|---|---|
| `db-basic` | `asa install db-basic` | Supabase client, types, utils, migrations framework |
| `auth-basic` | `asa install auth-basic` | 4 slices (register, login, logout, reset-password) + middleware + session |
| `payments-basic` | `asa install payments-basic` | 4 slices (subscribe, cancel, webhook, check-limits) + Stripe config |

## Documentation

- [Implementation Spec](docs/SPEC.md) — full technical specification
- [Commands Reference](docs/COMMANDS.md) — user-facing docs (TODO)
- [Architecture](docs/ARCHITECTURE.md) — internal architecture (TODO)

## Development

```bash
# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Lint
ruff check .

# Type check
mypy asa/
```

## Related

| Resource | Repo |
|---|---|
| Distribution | [janvoldan/asa-cli](https://github.com/janvoldan/asa-cli) |
| Demo 02 spec | [janvoldan/02-asa-demo-spec](https://github.com/janvoldan/02-asa-demo-spec) |
| v1 source (archived) | [janvoldan/asa-starter-kit-old-bck](https://github.com/janvoldan/asa-starter-kit-old-bck) |
| v1 distribution (archived) | [janvoldan/asa-cli-old-bck](https://github.com/janvoldan/asa-cli-old-bck) |

---

*v2.0.0 — 2026-03-08*
