# Commands (/docs/cli)



## Overview [#overview]

The Hackhaton-Space-Stack CLI provides several commands to manage your TypeScript projects.

## `create` (Default Command) [#create-default-command]

Creates a new Hackhaton-Space-Stack project.

```bash
create-hackhaton-space-stack [project-directory] [options]
```

### Parameters [#parameters]

* `project-directory` (optional): Name or path for your project directory

### Key Options [#key-options]

* `--yes, -y`: Use default configuration (skips prompts)
* `--dry-run`: Validate configuration and target directory without writing files
* `--verbose`: Show detailed result information as JSON
* `--yolo`: Bypass validations and compatibility checks
* `--package-manager <pm>`: `npm`, `pnpm`, `bun`
* `--install / --no-install`: Install dependencies after creation
* `--open <target>`: Open the project in an installed editor, IDE, or coding agent
* `--git / --no-git`: Initialize Git repository
* `--frontend <types...>`: Web and/or native frameworks (see [Options](/docs/cli/options#frontend))
* `--backend <framework>`: `hono`, `express`, `fastify`, `elysia`, `convex`, `self`, `none`
* `--runtime <runtime>`: `bun`, `node`, `workers` (`none` only with `--backend convex`, `--backend none`, or `--backend self`)
* `--database <type>`: `none`, `sqlite`, `postgres`, `mysql`, `mongodb`
* `--orm <type>`: `none`, `drizzle`, `prisma`, `mongoose`
* `--api <type>`: `none`, `trpc`, `orpc`
* `--auth <provider>`: `better-auth`, `clerk`, `none` (see [Options](/docs/cli/options#authentication))
* `--payments <provider>`: `polar`, `stripe`, `autumn`, `none`
* `--storage <adapter>`: `s3`, `r2`, `hetzner`, `supabase`, `neon`, `uploadthing`, `convex`, `none` (see [Options](/docs/cli/options#storage))
* `--email <provider>`: `resend`, `postmark`, `unosend`, `cloudflare-email`, `ses`, `sendgrid`, `mailgun`, `none` (see [Options](/docs/cli/options#email))
* `--db-setup <setup>`: `none`, `turso`, `d1`, `neon`, `supabase`, `prisma-postgres`, `planetscale`, `mongodb-atlas`, `docker`
* `--examples <types...>`: `none`, `todo`, `ai`
* `--web-deploy <setup>`: `none`, `cloudflare`
* `--server-deploy <setup>`: `none`, `cloudflare`
* `--template <type>`: `none`, `mern`, `pern`, `t3`, `uniwind`
* `--directory-conflict <strategy>`: `merge`, `overwrite`, `increment`, `error`
* `--render-title / --no-render-title`: Show/hide ASCII art title
* `--disable-analytics / --no-disable-analytics`: Control analytics collection
* `--manual-db`: Skip automatic database setup prompts

See the full reference in [Options](/docs/cli/options).

For JSON-first automation and agent usage, see [Agent Workflows](/docs/cli/agent-workflows).

### Examples [#examples]

```bash
# Default setup with prompts
create-hackhaton-space-stack

# Quick setup with defaults
create-hackhaton-space-stack --yes

# Specific configuration
create-hackhaton-space-stack --database postgres --backend hono --frontend tanstack-router

# Validate without writing files
create-hackhaton-space-stack my-app --yes --dry-run
```

## `add` [#add]

Adds addons or scaffolds a workspace package in an existing Hackhaton-Space-Stack project.

```bash
create-hackhaton-space-stack add [options]
```

### Options [#options]

* `--addons <types...>`: Addons to add (see [Addons](/docs/cli/options#addons))
* `--package <name>`: Scaffold `packages/<name>` with a package manifest, shared TypeScript config, and `src/index.ts`
* `--project-dir <path>`: Project directory (defaults to current directory)
* `--install [boolean]`: Install dependencies after adding (defaults to `false`)
* `--package-manager <pm>`: Package manager to use (`npm`, `pnpm`, `bun`)
* `--dry-run`: Preview the changes without writing files
* `--disable-analytics`: No-op flag (telemetry is permanently disabled)

### Examples [#examples-1]

```bash
# Add addons interactively
create-hackhaton-space-stack add

# Add specific addons
create-hackhaton-space-stack add --addons pwa tauri --install

# Add addons in a specific project directory
create-hackhaton-space-stack add --project-dir ./my-app --addons mcp skills

# Scaffold @my-app/shared in packages/shared
create-hackhaton-space-stack add --package shared
```

## `create-json` [#create-json]

Create a project from a raw JSON payload.

```bash
create-hackhaton-space-stack create-json --input '{"projectName":"my-app","yes":true,"dryRun":true}'
```

Use this when you want a single machine-readable input object instead of many flags.

## `add-json` [#add-json]

Add addons from a raw JSON payload.

```bash
create-hackhaton-space-stack add-json --input '{"projectDir":"./my-app","addons":["wxt"],"addonOptions":{"wxt":{"template":"react"}}}'
```

## `schema` [#schema]

Print runtime CLI and input schemas as JSON.

```bash
create-hackhaton-space-stack schema --name all
create-hackhaton-space-stack schema --name createInput
create-hackhaton-space-stack schema --name hssConfigFile
create-hackhaton-space-stack schema --name addonOptions
create-hackhaton-space-stack schema --name dbSetupOptions
```

This is the best way for scripts and agents to discover the current input contract at runtime.

## `mcp` [#mcp]

Start the Hackhaton-Space-Stack MCP server over stdio. It is launched by an MCP client (Claude Code, Codex, Cursor, opencode, and others), not run directly.

```bash
create-hackhaton-space-stack mcp
```

It exposes tools for planning and creating projects (`ds_plan_project`, `ds_create_project`) and managing addons (`ds_plan_addons`, `ds_add_addons`), plus schema and guidance helpers. See [Agent Workflows](/docs/cli/agent-workflows#use-it-inside-your-ai-agent) for setup and the full tool list.

## `docs` [#docs]

Opens the Hackhaton-Space-Stack documentation in your default browser.

````bash
create-hackhaton-space-stack docs
```hackhaton-space.vercel.app

Opens `https://www.hackhaton-space.vercel.app/docs` in your browser.

## `builder`

Opens the web-based stack builder in your default browser.

```bash
create-hackhaton-space-stack builder
```hackhaton-space.vercel.app

Opens `https://www.hackhaton-space.vercel.app/builder` where you can configure your stack visually.

## `history`

Shows project creation history stored on your local machine.

```bash
create-hackhaton-space-stack history [options]
````

### Options [#options-1]

* `--limit <number>`: Number of entries to show (default: 10)
* `--json`: Output history as JSON
* `--clear`: Clear all history entries

### Examples [#examples-2]

```bash
# Show latest entries
create-hackhaton-space-stack history

# Show 5 entries
create-hackhaton-space-stack history --limit 5

# JSON output
create-hackhaton-space-stack history --json

# Clear history
create-hackhaton-space-stack history --clear
```

## Global Options [#global-options]

These options work with any command:

* `--help, -h`: Display help information
* `--version, -V`: Display CLI version

## Command Examples [#command-examples]

### Create a Full-Stack App [#create-a-full-stack-app]

```bash
create-hackhaton-space-stack \
  --database postgres \
  --orm drizzle \
  --backend hono \
  --frontend tanstack-router \
  --auth better-auth \
  --addons pwa biome
```

### Create a Backend-Only Project [#create-a-backend-only-project]

```bash
create-hackhaton-space-stack api-server \
  --frontend none \
  --backend hono \
  --database postgres \
  --orm drizzle \
  --api trpc
```

### Add Features to Existing Project [#add-features-to-existing-project]

```bash
cd my-existing-project
create-hackhaton-space-stack add --addons tauri starlight --install
```

### Show Local History [#show-local-history]

```bash
create-hackhaton-space-stack history --limit 20
```

## Programmatic Usage [#programmatic-usage]

For advanced use cases, automation, or integration with other tools, you can use the [Programmatic API](/docs/cli/programmatic-api) to create projects from Node.js code:

```typescript
import { create } from "create-hackhaton-space-stack";

const result = await create("my-app", {
  frontend: ["tanstack-router"],
  backend: "hono",
  database: "sqlite",
  orm: "drizzle",
});

result.match({
  ok: (data) => console.log(`Project created at: ${data.projectDirectory}`),
  err: (error) => console.error(`Failed: ${error.message}`),
});
```

This is useful for:

* **Build tools and generators** - Create projects from templates
* **CI/CD pipelines** - Generate test projects automatically
* **Development workflows** - Batch create related projects
* **Custom tooling** - Integrate with your existing development setup

See the [Programmatic API documentation](/docs/cli/programmatic-api) for complete examples and API reference.
