# kubun

Kubun CLI.

[![Version](https://img.shields.io/npm/v/kubun.svg)](https://npmjs.org/package/kubun)
[![Downloads/week](https://img.shields.io/npm/dw/kubun.svg)](https://npmjs.org/package/kubun)

## Usage

```sh-session
$ pnpm add -g kubun
$ kubun --help
$ kubun <command> --help
```

The CLI is built on [commander](https://github.com/tj/commander.js) with [`@tejika/cli`](https://www.npmjs.com/package/@tejika/cli); status output renders to stderr (via ink) and data payloads to stdout, so command output stays pipeable.

## Commands

Run `kubun <command> --help` for the full, authoritative flag list — the descriptions below are a summary.

| Command | Description |
| --- | --- |
| `kubun account generate` | Generate a random private key to use as account signer |
| `kubun account id` | Display the DID of an account given its private key |
| `kubun graph mutate <id> <text>` | Execute a GraphQL mutation on a graph |
| `kubun graph query <id> <text>` | Execute a GraphQL query on a graph |
| `kubun graph deploy` | Deploy a documents model graph |
| `kubun graphql schema` | Create a GraphQL schema from clusters of document models |
| `kubun model cluster` | Create a documents cluster model |
| `kubun model create <name> <schema>` | Create a document model |
| `kubun mcp` | Start an MCP server for Kubun |
| `kubun serve` | Start a local Kubun server |

Common flags: `-k, --private-key <value>` (also read from `KUBUN_PRIVATE_KEY`), `--url <value>`, `-l, --log-level <level>`, `-p, --port <port>`, `-a, --allowed-origin <origin>` (also `KUBUN_ALLOWED_ORIGIN`).
