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

> ## Agent Instructions
> The docs are served at https://docs.devias.io. Every path in these docs is relative to that root: /llms.txt is https://docs.devias.io/llms.txt.
> Devias is an open-source platform that works as an operating system for a business: a core (records, views, workflows, agents, permissions) with installable modules.
> Pages are typed by folder. concepts/ explains what things are, guides/ gives procedures, reference/ is exhaustive (SDK, CLI, HTTP API), operate/ covers hosting. Use /start/glossary for exact terms.
> Every id in a module (module, object, field, view, action, workflow, step, connection, variable, event, policy) is a uuid. Generate them with `devias id <count>`. Never invent dotted or readable ids.
> Run `devias plan` and read its output before `devias apply`. Apply only what the plan says.
> The OpenAPI document, including the routes of the modules in the reference setup, is at /reference/api/openapi.json.
> Devias is young and changes quickly. If a page and the source repository (github.com/devias-io/devias) disagree, the repository is right.

# devias CLI

> The devias command previews and applies a module manifest to a workspace from a terminal or CI. Lists the five commands (plan, apply, dev, uninstall, id), the options every command takes with their environment variables, how to run it from the repository, and the API key permission it needs.

`devias` is a command-line tool for working with modules. It reads a manifest, asks the server what would change, and applies it. It never uses a browser session: every command signs in with an **API key**.

## Run it

Inside the repository, run the entry point with Node. There is nothing to build.

```bash theme={"dark"}
node packages/cli/bin/devias.js plan -w <workspaceId> -m ./src/manifest/index.ts
```

If `@devias/cli` is a dependency of your project, the same command is available as plain `devias`. The rest of these pages write `devias`.

## Options every command takes

| Flag | Environment variable | Meaning |
| - | - | - |
| `-m, --manifest <path>` | | Your manifest file: `.ts`, `.js` or `.json`. It must export `manifest`, or a default export. |
| `-w, --workspace <id>` | | The workspace id. Copy it from **Settings → General**. |
| `-u, --url <url>` | `DEVIAS_URL` | The server. Defaults to `http://localhost:3000`. |
| `-k, --api-key <key>` | `DEVIAS_API_KEY` | The API key to use. |

> [!WARNING]
>
> The key must be allowed to manage modules. A key made in **Settings → API keys** can only read records, so create the key through the API with `permissions: { "module": ["manage"] }`.

## Commands

| Command | Purpose |
| - | - |
| [`devias plan`](https://docs.devias.io/reference/cli/plan) | Show what would change. |
| [`devias apply`](https://docs.devias.io/reference/cli/apply) | Apply the change. |
| [`devias dev`](https://docs.devias.io/reference/cli/dev) | Re-apply on every save. |
| [`devias uninstall`](https://docs.devias.io/reference/cli/uninstall) | Remove a module. |
| [`devias id`](https://docs.devias.io/reference/cli/id) | Generate new ids. |

## Related

* [Plan and apply](https://docs.devias.io/guides/modules/plan-and-apply.md): how plans work.
* [Create a first module](https://docs.devias.io/guides/modules/first-module.md): a procedure that uses the CLI.


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