---
title: "CLI"
description: "Use the Blyp CLI for Studio, environment checks, skills, and guided database logging setup."
canonical_url: "https://www.blyp.dev/docs/cli"
markdown_url: "https://www.blyp.dev/docs/cli.md"
last_updated: "2018-10-20"
x_farming_labs_generated_preamble: true
agent:
  task: "Run Blyp CLI workflows for Studio, health checks, skills, or database setup."
  outcome: "The selected CLI command completes against the intended project directory."
  appliesTo:
    package:
      - "@blyp/cli"
  prerequisites:
    - "Run commands from the application root or pass the intended target path explicitly."
  files:
    - "package.json"
    - "blyp.config.ts"
    - ".agents/skills"
  commands:
    - "pnpm dlx @blyp/cli --version"
  sideEffects:
    - "Studio starts a local server; skills and database commands can write project files."
  verification:
    - "Run blyp --version or the command-specific health check and inspect its exit status."
  rollback:
    - "Stop Studio and revert files generated by the selected command."
  failureModes:
    - symptom: "The CLI targets the wrong project."
      resolution: "Run from the intended root or pass the documented target path to Studio."
---

# CLI
URL: /docs/cli
LLM index: /llms.txt
Description: Use the Blyp CLI for Studio, environment checks, skills, and guided database logging setup.
Related: /docs/installation, /docs/database/migrations, /docs/skills, /docs/troubleshooting

<!-- farming-labs:agent-contract:start -->
## Agent Contract

Task: Run Blyp CLI workflows for Studio, health checks, skills, or database setup.
Outcome: The selected CLI command completes against the intended project directory.

### Applies To

- Package: `@blyp/cli`

### Prerequisites

- Run commands from the application root or pass the intended target path explicitly.

### Files

- `package.json`
- `blyp.config.ts`
- `.agents/skills`

### Commands

- `pnpm dlx @blyp/cli --version`

### Side Effects

- Studio starts a local server; skills and database commands can write project files.

### Verification

- Run blyp --version or the command-specific health check and inspect its exit status.

### Rollback

- Stop Studio and revert files generated by the selected command.

### Failure Modes

- The CLI targets the wrong project. — Recovery: Run from the intended root or pass the documented target path to Studio.
<!-- farming-labs:agent-contract:end -->

# CLI

Use `bunx @blyp/cli` without a global install and run it from the target project root. Treat Studio
as a local server and database/skill commands as file-changing operations. Verify the CLI version
and review generated files; wrong-project behavior means the working directory or explicit target
path is incorrect.

Blyp now has a separate CLI project for local developer workflows.

- GitHub: [Blyphq/cli](https://github.com/Blyphq/cli)
- npm: [`@blyp/cli`](https://www.npmjs.com/package/@blyp/cli)

The CLI package is `@blyp/cli`, and the executable command is `blyp`.

If you do not want a global install, use:

```bash
bunx @blyp/cli <command>
```

## What it does

The current CLI README describes `blyp` as the local entrypoint for:

- launching Blyp Studio for a target project
- printing runtime and workspace diagnostics
- installing Blyp skills into a project-local `.agents/skills` directory
- guiding Prisma or Drizzle database logging setup for `@blyp/core`

## Studio

Studio is the local web UI that ships with the Blyp CLI. It runs at `http://localhost:3003` and connects to a target project on your machine.

### What Studio does

- Inspects the target project from your local machine
- Connects assistant workflows to a specific project path
- Uses project-level AI settings via `OPENROUTER_API_KEY` and `OPENROUTER_MODEL`

### Launching Studio

Launch for the current directory:

```bash
blyp studio
```

Launch for a specific subdirectory:

```bash
blyp studio ./apps/my-app
```

If Studio is already running, the CLI reuses the existing instance and opens the correct project in the browser.

If Studio opens but does not connect to the right project, or if port `3003` is already in use, use the [Troubleshooting](/docs/troubleshooting) guide before digging into framework-specific setup.

## Commands

### `blyp studio [targetPath]`

Starts or reuses the local Studio app for the target project. If `targetPath` is omitted, the current directory is used.

### `blyp health`

Prints runtime details such as the current directory, runtime versions, detected workspace root, and the Studio web app path.

### `blyp skills install [source-or-skill-name] [--force]`

Installs a local skill folder, installs a bundled skill by name, or opens the bundled skill picker.

Installed skills are copied into:

```text
./.agents/skills/<skill-name>
```

### `blyp db:init`

Guided Blyp database logging setup.

- prompts for adapter: `prisma` or `drizzle`
- prompts for dialect: `postgres` or `mysql`
- scaffolds the `blyp_logs` schema
- runs the generated migration workflow
- writes `blyp.config.ts` for the project

### `blyp db:migrate`

Runs the configured Prisma or Drizzle migration workflow after the project has been initialized.

### `blyp db:generate`

Runs Prisma client generation for configured Prisma projects.

This command is Prisma-only and is not used for Drizzle projects.

### `blyp help`

Shows command usage.

### `blyp --version`

Prints the CLI version.

## Supported database setups

- Prisma + Postgres
- Prisma + MySQL
- Drizzle + Postgres
- Drizzle + MySQL

## Upgrade note

> **Upgrade note:** Use `blyp db:init` for guided database setup.

Use the shorter top-level commands instead:

```bash
blyp db:init
blyp db:migrate
blyp db:generate
```

Without a global install:

```bash
bunx @blyp/cli db:init
bunx @blyp/cli db:migrate
bunx @blyp/cli db:generate
```

For the required schema contract and adapter-specific setup details, use:

- [Database](/docs/database)
- [Schema Contract](/docs/database/schema)
- [Prisma](/docs/database/prisma)
- [Drizzle](/docs/database/drizzle)
- [Database Migrations](/docs/database/migrations)
- [Database Troubleshooting](/docs/database/troubleshooting)

## Troubleshooting

Use [Troubleshooting](/docs/troubleshooting) when Studio does not connect, the wrong `targetPath` is selected, or logs are not appearing in the local UI.

## Notes

- The CLI lives in a separate repository from `@blyp/core`.
- The published command name is `blyp`.
- Studio runs locally at `http://localhost:3003`.

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
Docs-scoped sitemap: [/docs/sitemap.md](/docs/sitemap.md).
Well-known sitemap: [/.well-known/sitemap.md](/.well-known/sitemap.md).
