> ## Documentation Index
> Fetch the complete documentation index at: https://noorle.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Commands

> Complete noorle CLI command reference: login, logout, check-update, and the eight plugin subcommands with their flags

Every command the `noorle` CLI accepts. There are eleven.

## Global flags

```bash theme={"dark"}
noorle [--server <URL>] <COMMAND>
```

| Flag | Default | Description |
| - | - | - |
| `--server <URL>` | `https://api.noorle.com` | Management API base URL |
| `--version` | | Print the CLI version |
| `--help` | | Print help. Works on any subcommand |

> [!NOTE]
>
> There is no `--json`, `--format`, `--verbose`, or `--api-key` flag.

## Authentication

### `noorle login`

Authenticate through the OAuth 2.0 device flow.

```bash theme={"dark"}
noorle login
```

Opens your browser to the Portal's device-verify page and prints a code to
enter. It polls until you approve, then stores the token at `~/.noorle_token`.
Polling gives up after 10 minutes.

The `--username` and `--password` flags are accepted but **currently unused** —
authentication is device-flow only.

### `noorle logout`

```bash theme={"dark"}
noorle logout
```

Deletes `~/.noorle_token`. Reports "No active session found" when there is
nothing to delete.

## Plugins

### `noorle plugin init`

Scaffold a plugin project from a template.

```bash theme={"dark"}
noorle plugin init my-plugin                    # prompts for a template
noorle plugin init my-plugin --template rust    # non-interactive
```

| Argument | Required | Description |
| - | - | - |
| `<plugin_name>` | Yes | Creates a directory with this name. ASCII only |
| `--template <name>` | No | Omit and you get an interactive picker |

Templates are fetched from the platform. Run
[`plugin list-templates`](#noorle-plugin-list-templates) to see the current set;
`rust`, `python`, `typescript`, `javascript`, and `go` are the supported
languages.

### `noorle plugin list-templates`

```bash theme={"dark"}
noorle plugin list-templates
```

Prints the templates the platform currently offers.

### `noorle plugin prepare`

Run the project's `prepare.sh` to install build dependencies.

```bash theme={"dark"}
noorle plugin prepare           # interactive install
noorle plugin prepare --check   # report only, change nothing
noorle plugin prepare --ci      # non-interactive install
```

| Flag | Description |
| - | - |
| `--check` | Check whether dependencies are present, install nothing |
| `--ci` | Install without prompting |

Every template ships a `prepare.sh` that knows its own toolchain. A project
without one prints guidance rather than failing.

### `noorle plugin build`

Compile the plugin and pack it.

```bash theme={"dark"}
noorle plugin build
```

Runs `./build.sh` through `sh`, then packs the result. It fails with an
actionable error when:

* `build.sh` does not exist
* `build.sh` is not executable — run `chmod +x build.sh`
* The build does not create `dist/`
* The build does not produce `dist/plugin.wasm`

Run it from the plugin directory.

### `noorle plugin pack`

Create the `.npack` archive from an already-built plugin.

```bash theme={"dark"}
noorle plugin pack
```

Rarely needed on its own — `build` packs automatically. Use it to re-pack
without recompiling.

Reads `dist/plugin.wasm` and writes `dist/{plugin-name}.npack`, a gzipped tar
containing:

| File | Included when |
| - | - |
| `plugin.wasm` | Always — required |
| `noorle.yaml` | The project root has one |
| `world.wit` | `wit/world.wit` exists |
| `.env` | The project root has one |

The plugin name comes from `Cargo.toml`, then `package.json`, then `go.mod`,
then the directory name.

### `noorle plugin deploy`

Upload the archive.

```bash theme={"dark"}
noorle plugin deploy                    # auto-detect from dist/
noorle plugin deploy dist/my-plugin.npack
```

| Argument | Required | Description |
| - | - | - |
| `<npack_file>` | No | Path to a specific archive. Omit to take the first `.npack` in `dist/` |

Requires `noorle login` first. Posts multipart form-data to
[`POST /v1/capabilities/upload`](https://noorle.com/docs/reference/rest/plugins-upload).

### `noorle plugin publish`

```bash theme={"dark"}
noorle plugin publish
```

`build` then `deploy`. Requires `noorle login` first.

### `noorle plugin validate`

Check a plugin configuration file.

```bash theme={"dark"}
noorle plugin validate noorle.yaml
```

| Argument | Required | Description |
| - | - | - |
| `<file_path>` | Yes | Path to the YAML file |

Validates YAML syntax and structure and prints the resolved plugin name. This is
a **local syntax check only** — it does not contact the platform and does not
run the full server-side validation the upload endpoint applies.

## Maintenance

### `noorle check-update`

```bash theme={"dark"}
noorle check-update
```

Reports whether a newer CLI release exists. It **does not install** it — re-run
the [install script](https://noorle.com/docs/reference/cli/installation.md) to upgrade.

## What does not exist

These commands appear in older documentation and are **not** implemented:

`agent`, `gateway`, `api-call`, `api-key`, `config`, `env`, `token`, `session`,
`audit`, `update`, `completion`, `plugin new`, `plugin push`, `plugin list`,
`plugin info`, `plugin versions`, `plugin activate`, `plugin delete`.

Use the [Portal](https://platform.noorle.com) or the
[management API](https://noorle.com/docs/reference/rest/capabilities-list.md) for anything outside the
plugin build loop.

## Related

* [Installation](https://noorle.com/docs/reference/cli/installation.md)
* [Plugin development workflow](https://noorle.com/docs/reference/cli/workflows.md)
* [Upload Plugin](https://noorle.com/docs/reference/rest/plugins-upload.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.