<div align="center">
  <a href="https://archbee.com">
    <img src="https://archbee.com/archbee-logo.svg" alt="Archbee" height="64" />
  </a>
  <h3>Archbee CLI</h3>
  <p>Preview, validate, and manage your documentation locally.</p>

  <a href="https://www.npmjs.com/package/@archbee/cli"><img src="https://img.shields.io/npm/v/@archbee/cli.svg" alt="npm version" /></a>
  <a href="https://www.npmjs.com/package/@archbee/cli"><img src="https://img.shields.io/npm/dm/@archbee/cli.svg" alt="npm downloads" /></a>
  <a href="https://nodejs.org"><img src="https://img.shields.io/node/v/@archbee/cli.svg" alt="node version" /></a>
</div>

---

## Installation

```bash
npm install -g @archbee/cli
```

## Quick Start

```bash
archbee new my-docs
cd my-docs
archbee dev
```

Your docs site is running at `http://localhost:3000` with hot reload.

## What It Does

Run `archbee` with no arguments to see all available commands.

### Local Development

| Command | Description |
|---------|-------------|
| `archbee dev` | Start local preview with hot reload |
| `archbee new <dir>` | Create a new documentation project |
| `archbee validate` | Check config and doc structure for errors |
| `archbee broken-links` | Find broken internal links |
| `archbee update` | Update CLI to the latest version |
| `archbee version` | Display the current CLI version |

### API Commands

Manage docs on the Archbee platform. Require `--api-key` and `--doc-space-id`.

| Command | Description |
|---------|-------------|
| `get-doc` | Get a document by ID (markdown, html, json, or source) |
| `create-doc` | Create or update a document |
| `delete-doc` | Delete a document |
| `search-docs` | Search documents in a space |
| `import-content` | Import markdown files (.md or .zip) |
| `create-space` | Create a new space |
| `update-space` | Update space settings |
| `publish-space` | Publish documents |
| `clone-space` | Clone a space |
| `sync-openapi` | Sync an OpenAPI spec to create API reference docs |
| `info-openapi` | Get info about an OpenAPI tree |
| `upload` | Upload a file |
| `merge-suggestion` | Merge a suggestion |
| `discard-suggestion` | Discard a suggestion |
| `export` | Export team documentation |
| `display-rules` | List display rules |

Run `archbee <command> --help` for detailed options.

## Works With Your Existing Docs

Drop into any project — the CLI auto-detects the config format:

| Format | Config File |
|--------|------------|
| Archbee | `archbee.json` |
| Mintlify | `docs.json` / `mint.json` |
| Docusaurus | `docusaurus.config.js` / `.ts` |

```bash
cd your-existing-docs-project
archbee dev
```

## Documentation

Full configuration reference, guides, and examples:

**[archbee.com/docs](https://www.archbee.com/docs)**

## Troubleshooting

1. Make sure you're in a folder with a config file (`archbee.json`, `docs.json`, or `docusaurus.config.js`)
2. Run `archbee update` to get the latest version
3. Requires Node.js 18+. LTS versions recommended.

