# Install the CLI

> Install the Manykind CLI and the @manykind-ai SDK packages, pick the ones you need, and set up the credentials the CLI pushes and deploys with.

Source: https://developers.manykind.ai/get-started/install/

You can build and run a workflow entirely in ROC, with nothing installed. Install
the CLI and SDKs when you want code: code agents, workflows in code, your own
app talking to a vault, tests, and evaluations.

## Prerequisites

- **Node.js** 20 or later and a package manager. Examples use npm; pnpm, yarn,
  and bun work the same way.
- **TypeScript** for agents. Engagements use decorators (`@Engagement`,
  `@OnEvent`).

## The packages

| Package | Version | Kind | Use it for |
|---|---|---|---|
| [`@manykind-ai/cli`](https://developers.manykind.ai/reference/cli/) (`mk`, `manykind`) | 5.0.0 | dev | Scaffold, build, push, and deploy agents and workflows; push service cubbies and widgets; run evaluations. |
| [`@manykind-ai/agent-sdk`](https://developers.manykind.ai/reference/agent-sdk/) | 5.12.1 | runtime | Code agents (`@Engagement`, `@OnEvent`, `ctx`), `defineAgent` and `defineWorkflow` for `manykind.config.ts`. |
| [`@manykind-ai/vault-sdk`](https://developers.manykind.ai/reference/vault-sdk/) | 5.9.0 | runtime | Your own apps and servers talking to a vault. Not for agent code. |
| [`@manykind-ai/widget-runtime`](https://developers.manykind.ai/reference/widget-runtime/) | 2.4.5 | runtime | The browser half of a widget. The CLI vendors it into built widgets. |
| [`@manykind-ai/testing`](https://developers.manykind.ai/reference/testing/) | 3.5.4 | dev | Run your agent against an in-process fake platform in your own test runner. |
| [`@manykind-ai/eval`](https://developers.manykind.ai/reference/eval/) | 0.4.0 | dev | Datasets, experiments, and results for workflows. |
| [`@manykind-ai/eslint-plugin`](https://developers.manykind.ai/reference/eslint-plugin/) | 1.0.0 | dev | Editor rules that match the CLI's build checks. |

## Install for building agents and workflows in code

Start a project with the scaffold:

```bash
npx @manykind-ai/cli init my-agent
```

`mk init [dir]` writes a project with a config, an engagement, a cubby
migration, a widget, a test, and AI-assistant files (`AGENTS.md`, `CLAUDE.md`).
Options: `--name <alias>`, `--pm <npm|pnpm|yarn|bun>`, `--install`, `--no-git`,
`--no-ai`, `--force` (scaffold into a non-empty directory), `-y`. Set the scaffold's `@manykind-ai/*` dependencies to the versions in
the table above.

Or add the packages to an existing project:

```bash
npm install @manykind-ai/agent-sdk
npm install -D @manykind-ai/cli @manykind-ai/testing @manykind-ai/eslint-plugin
```

The CLI is a dev dependency; run it with `npx mk …` or an npm script.

## Install for an app that talks to a vault

```bash
npm install @manykind-ai/vault-sdk
```

The package is an ES module and runs in the browser and in Node. See
[Work with the Vault SDK](https://developers.manykind.ai/vaults/build-on-a-vault/work-with-the-vault-sdk/).

## Install for workflow evaluations

```bash
npm install -D @manykind-ai/eval
```

`mk eval` uses the same library. See [Evaluations](https://developers.manykind.ai/agents/workflows/evaluate/overview/).

## Verify

```bash
npx mk version
```

It prints the CLI version, whether a newer one exists, and where credentials
would come from. `npx mk --help` lists the commands; `npx mk help "<task>"`
finds the one for a task.

## Credentials

The CLI talks to two places, with two kinds of credential:

| For | Credential | Set with |
|---|---|---|
| `mk push`, `mk widget push`, `mk cubby push` (writing to your Agent Service's storage bucket) | The bucket owner's secret phrase, or an access token the owner granted you | `MANYKIND_DDC_SECRET_PHRASE`, or `MANYKIND_DDC_ACCESS_TOKEN` |
| `mk deploy`, `mk publish` | A CLI access token minted in ROC | `MANYKIND_ACCESS_TOKEN` |

Each has a matching command-line flag, but a secret on the command line stays in
your shell history; prefer the environment variables. `--env <dev|stage|prod>`
(or `MANYKIND_ENV`) picks the network. See [Push and deploy](https://developers.manykind.ai/agents/ship/push-and-deploy/)
and the [CLI reference](https://developers.manykind.ai/reference/cli/).

## Pin your versions

Pin exact versions. Check the current one before upgrading:

```bash
npm view @manykind-ai/cli version
```

## Next steps

- [Quickstart](https://developers.manykind.ai/get-started/quickstart/): build and run a workflow
- [Write an agent](https://developers.manykind.ai/agents/code-agents/overview/)
- [Workflows in code](https://developers.manykind.ai/agents/workflows/author-in-code/)

## Related

- [Next: Quickstart](https://developers.manykind.ai/get-started/quickstart/)
- [CLI reference](https://developers.manykind.ai/reference/cli/)
- [Push and deploy](https://developers.manykind.ai/agents/ship/push-and-deploy/)
- [Build with AI](https://developers.manykind.ai/reference/build-with-ai/)
- [How it fits together](https://developers.manykind.ai/get-started/how-it-fits-together/)
