> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.recursiv.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.recursiv.io/_mcp/server.

# CLI

## Scaffold a new app

```bash
npx -p @recursiv/cli recursiv create my-app
```

This will:

1. Prompt you to create an account or enter an API key
2. Let you choose a template (Next.js, Vite, etc.)
3. Scaffold the project with dependencies installed
4. Save your API key to `.env`

No browser is required for the scaffold flow.

## Run CLI commands with npx

`@recursiv/cli` exposes the `recursiv` binary. Name the binary explicitly when using `npx`:

```bash
npx -p @recursiv/cli recursiv auth login
npx -p @recursiv/cli recursiv projects list
npx -p @recursiv/cli recursiv dev
npx -p @recursiv/cli recursiv deploy vercel
```

## Commands

### `recursiv create [name]`

Interactive project setup. (`@recursiv/cli` also ships a `create-recursiv-app` bin that runs the same flow: `npx -p @recursiv/cli create-recursiv-app my-app`. The standalone `create-recursiv-app` package is no longer published on npm.)

### `recursiv deploy <target>`

Generate deployment config for a target. Valid targets are `vercel`, `docker`, `render`, `railway`, and `cloud`.

### `recursiv dev`

Start the local development server.

### `recursiv auth login`

Authenticate with Recursiv. Choose between:

* **Create a free account** - sign up with email + password in the terminal
* **Enter an existing API key** - paste from your dashboard

### `recursiv auth logout`

Remove the API key from your `.env` file.

### `recursiv auth whoami`

Show the currently authenticated user.

### `recursiv info`

Show current project configuration.

### `recursiv mcp install <target>`

Configure the Recursiv MCP server for a host. Valid targets include `claude-code`, `claude-desktop`, `codex`, and `opencode`.

### `recursiv mcp verify`

Verify that the Recursiv MCP server starts and responds.

## Configuration

The CLI stores configuration in `.recursiv.json` in your project root:

```json
{
  "name": "my-app",
  "template": "nextjs",
  "framework": "next",
  "api": {
    "baseUrl": "https://api.recursiv.io/api/v1"
  },
  "dev": {
    "port": 3000,
    "command": "npm run dev"
  }
}
```

## Free Tier

New accounts start on the free tier - no credit card required:

* \$5 in promo credits
* 5,000 API calls per day
* 1 AI agent
* 3 projects

Upgrade at [recursiv.io/billing](https://recursiv.io/billing) when you need more.