kubun
=================

Kubun CLI


[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![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)


<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g kubun
$ kubun COMMAND
running command...
$ kubun (--version)
kubun/0.3.2 darwin-arm64 node-v24.3.0
$ kubun --help [COMMAND]
USAGE
  $ kubun COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`kubun account generate`](#kubun-account-generate)
* [`kubun account id`](#kubun-account-id)
* [`kubun graph deploy`](#kubun-graph-deploy)
* [`kubun graph mutate ID TEXT`](#kubun-graph-mutate-id-text)
* [`kubun graph query ID TEXT`](#kubun-graph-query-id-text)
* [`kubun graphql schema`](#kubun-graphql-schema)
* [`kubun help [COMMAND]`](#kubun-help-command)
* [`kubun model cluster`](#kubun-model-cluster)
* [`kubun model create NAME SCHEMA`](#kubun-model-create-name-schema)
* [`kubun plugins`](#kubun-plugins)
* [`kubun plugins add PLUGIN`](#kubun-plugins-add-plugin)
* [`kubun plugins:inspect PLUGIN...`](#kubun-pluginsinspect-plugin)
* [`kubun plugins install PLUGIN`](#kubun-plugins-install-plugin)
* [`kubun plugins link PATH`](#kubun-plugins-link-path)
* [`kubun plugins remove [PLUGIN]`](#kubun-plugins-remove-plugin)
* [`kubun plugins reset`](#kubun-plugins-reset)
* [`kubun plugins uninstall [PLUGIN]`](#kubun-plugins-uninstall-plugin)
* [`kubun plugins unlink [PLUGIN]`](#kubun-plugins-unlink-plugin)
* [`kubun plugins update`](#kubun-plugins-update)
* [`kubun serve`](#kubun-serve)

## `kubun account generate`

Generate a random private key to use as account signer

```
USAGE
  $ kubun account generate

DESCRIPTION
  Generate a random private key to use as account signer
```

## `kubun account id`

Display the DID of an account given its private key

```
USAGE
  $ kubun account id -k <value>

FLAGS
  -k, --privateKey=<value>  (required) base64-encoded private key

DESCRIPTION
  Display the DID of an account given its private key
```

## `kubun graph deploy`

Deploy a documents model graph

```
USAGE
  $ kubun graph deploy -c <value>... -k <value> [--id <value>] [-n <value>] [--url <value>]

FLAGS
  -c, --cluster=<value>...  (required) path of the JSON file of the cluster
  -k, --privateKey=<value>  (required) base64-encoded private key
  -n, --name=<value>        graph name
      --id=<value>          graph ID
      --url=<value>         Kubun server URL

DESCRIPTION
  Deploy a documents model graph
```

## `kubun graph mutate ID TEXT`

Execute a GraphQL mutation on a graph

```
USAGE
  $ kubun graph mutate ID TEXT -k <value> [--url <value>] [--variables <value>]

ARGUMENTS
  ID    graph ID
  TEXT  mutation text

FLAGS
  -k, --privateKey=<value>  (required) base64-encoded private key
      --url=<value>         Kubun server URL
      --variables=<value>   query variables as JSON string

DESCRIPTION
  Execute a GraphQL mutation on a graph
```

## `kubun graph query ID TEXT`

Execute a GraphQL query on a graph

```
USAGE
  $ kubun graph query ID TEXT -k <value> [--url <value>] [--variables <value>]

ARGUMENTS
  ID    graph ID
  TEXT  query text

FLAGS
  -k, --privateKey=<value>  (required) base64-encoded private key
      --url=<value>         Kubun server URL
      --variables=<value>   query variables as JSON string

DESCRIPTION
  Execute a GraphQL query on a graph
```

## `kubun graphql schema`

Create a GraphQL schema from clusters of document models

```
USAGE
  $ kubun graphql schema -c <value>... [-o <value>]

FLAGS
  -c, --cluster=<value>...  (required) path of the JSON file of the cluster
  -o, --output=<value>      output file for the GraphQL schema

DESCRIPTION
  Create a GraphQL schema from clusters of document models
```

## `kubun help [COMMAND]`

Display help for kubun.

```
USAGE
  $ kubun help [COMMAND...] [-n]

ARGUMENTS
  COMMAND...  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for kubun.
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.32/src/commands/help.ts)_

## `kubun model cluster`

Create a documents cluster model

```
USAGE
  $ kubun model cluster -m <value>... [-o <value>]

FLAGS
  -m, --model=<value>...  (required) document model as JSON string
  -o, --output=<value>    output file for the cluster

DESCRIPTION
  Create a documents cluster model
```

## `kubun model create NAME SCHEMA`

Create a document model

```
USAGE
  $ kubun model create NAME SCHEMA [-b default|interface|unique] [-c] [-o <value>] [-u <value>...]

ARGUMENTS
  NAME    document model name
  SCHEMA  document schema as JSON string

FLAGS
  -b, --behavior=<option>       [default: default] behavior of the document
                                <options: default|interface|unique>
  -c, --cluster                 create a cluster model instead of a document model
  -o, --output=<value>          output file
  -u, --uniqueField=<value>...  unique field of the document when behavior is set to "unique"

DESCRIPTION
  Create a document model
```

## `kubun plugins`

List installed plugins.

```
USAGE
  $ kubun plugins [--json] [--core]

FLAGS
  --core  Show core plugins.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  List installed plugins.

EXAMPLES
  $ kubun plugins
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/index.ts)_

## `kubun plugins add PLUGIN`

Installs a plugin into kubun.

```
USAGE
  $ kubun plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]

ARGUMENTS
  PLUGIN...  Plugin to install.

FLAGS
  -f, --force    Force npm to fetch remote resources even if a local copy exists on disk.
  -h, --help     Show CLI help.
  -s, --silent   Silences npm output.
  -v, --verbose  Show verbose npm output.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Installs a plugin into kubun.

  Uses npm to install plugins.

  Installation of a user-installed plugin will override a core plugin.

  Use the KUBUN_NPM_LOG_LEVEL environment variable to set the npm loglevel.
  Use the KUBUN_NPM_REGISTRY environment variable to set the npm registry.

ALIASES
  $ kubun plugins add

EXAMPLES
  Install a plugin from npm registry.

    $ kubun plugins add myplugin

  Install a plugin from a github url.

    $ kubun plugins add https://github.com/someuser/someplugin

  Install a plugin from a github slug.

    $ kubun plugins add someuser/someplugin
```

## `kubun plugins:inspect PLUGIN...`

Displays installation properties of a plugin.

```
USAGE
  $ kubun plugins inspect PLUGIN...

ARGUMENTS
  PLUGIN...  [default: .] Plugin to inspect.

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Displays installation properties of a plugin.

EXAMPLES
  $ kubun plugins inspect myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/inspect.ts)_

## `kubun plugins install PLUGIN`

Installs a plugin into kubun.

```
USAGE
  $ kubun plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]

ARGUMENTS
  PLUGIN...  Plugin to install.

FLAGS
  -f, --force    Force npm to fetch remote resources even if a local copy exists on disk.
  -h, --help     Show CLI help.
  -s, --silent   Silences npm output.
  -v, --verbose  Show verbose npm output.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Installs a plugin into kubun.

  Uses npm to install plugins.

  Installation of a user-installed plugin will override a core plugin.

  Use the KUBUN_NPM_LOG_LEVEL environment variable to set the npm loglevel.
  Use the KUBUN_NPM_REGISTRY environment variable to set the npm registry.

ALIASES
  $ kubun plugins add

EXAMPLES
  Install a plugin from npm registry.

    $ kubun plugins install myplugin

  Install a plugin from a github url.

    $ kubun plugins install https://github.com/someuser/someplugin

  Install a plugin from a github slug.

    $ kubun plugins install someuser/someplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/install.ts)_

## `kubun plugins link PATH`

Links a plugin into the CLI for development.

```
USAGE
  $ kubun plugins link PATH [-h] [--install] [-v]

ARGUMENTS
  PATH  [default: .] path to plugin

FLAGS
  -h, --help          Show CLI help.
  -v, --verbose
      --[no-]install  Install dependencies after linking the plugin.

DESCRIPTION
  Links a plugin into the CLI for development.

  Installation of a linked plugin will override a user-installed or core plugin.

  e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
  command will override the user-installed or core plugin implementation. This is useful for development work.


EXAMPLES
  $ kubun plugins link myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/link.ts)_

## `kubun plugins remove [PLUGIN]`

Removes a plugin from the CLI.

```
USAGE
  $ kubun plugins remove [PLUGIN...] [-h] [-v]

ARGUMENTS
  PLUGIN...  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ kubun plugins unlink
  $ kubun plugins remove

EXAMPLES
  $ kubun plugins remove myplugin
```

## `kubun plugins reset`

Remove all user-installed and linked plugins.

```
USAGE
  $ kubun plugins reset [--hard] [--reinstall]

FLAGS
  --hard       Delete node_modules and package manager related files in addition to uninstalling plugins.
  --reinstall  Reinstall all plugins after uninstalling.
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/reset.ts)_

## `kubun plugins uninstall [PLUGIN]`

Removes a plugin from the CLI.

```
USAGE
  $ kubun plugins uninstall [PLUGIN...] [-h] [-v]

ARGUMENTS
  PLUGIN...  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ kubun plugins unlink
  $ kubun plugins remove

EXAMPLES
  $ kubun plugins uninstall myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/uninstall.ts)_

## `kubun plugins unlink [PLUGIN]`

Removes a plugin from the CLI.

```
USAGE
  $ kubun plugins unlink [PLUGIN...] [-h] [-v]

ARGUMENTS
  PLUGIN...  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ kubun plugins unlink
  $ kubun plugins remove

EXAMPLES
  $ kubun plugins unlink myplugin
```

## `kubun plugins update`

Update installed plugins.

```
USAGE
  $ kubun plugins update [-h] [-v]

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Update installed plugins.
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/update.ts)_

## `kubun serve`

Start a local Kubun server

```
USAGE
  $ kubun serve [--db <value>] [-p <value>] [-k <value> | --id <value>]

FLAGS
  -k, --privateKey=<value>  base64-encoded private key
  -p, --port=<value>        port to listen on
      --db=<value>          path to the local SQLite database
      --id=<value>          server ID

DESCRIPTION
  Start a local Kubun server
```
<!-- commandsstop -->
