> For the complete documentation index, see [llms.txt](https://cjays-organization.gitbook.io/nexora.ts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cjays-organization.gitbook.io/nexora.ts/packages/cli.md).

# create-nexora-ts

CLI to scaffold a new Nexora bot project (Studio + `.env` ready).

```bash
npx @nexora.ts/create@latest my-bot
cd my-bot
pnpm install
cp .env.example .env
pnpm dev
```

## What you get

* `dev` / `start` scripts with `--env-file=.env`
* `@nexora.ts/config` (auto `loadEnv`), core, logger, and **dev-server** for Studio
* Optional Docker, linting, examples
* Example commands/events when selected

![CLI scaffold](https://3248729062-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFYINlcdaLANBg99zQoZP%2Fuploads%2Fgit-blob-3ab109cc7b9049407a2e4c48d9242dcf72caca02%2Fcli-scaffold.png?alt=media)

Prompts for bot name, database, Docker, linting, GitHub Actions, and examples.

## `nexora` CLI (optional)

The same package (`@nexora.ts/create`) also ships the `nexora` binary. Scaffolding a bot does **not** install that binary into the new project — after `create`, day-to-day development uses **`pnpm dev`**.

Use `nexora` only if you want the helper CLI (`dev`, `studio`, plugin commands).

### Make `nexora` available

| Method                | Commands                                               |
| --------------------- | ------------------------------------------------------ |
| One-off via npx       | `npx -p @nexora.ts/create nexora dev`                  |
| Global                | `npm install -g @nexora.ts/create` → then `nexora …`   |
| Project devDependency | `pnpm add -D @nexora.ts/create` → `pnpm exec nexora …` |

Always run from the **bot project root** (directory with `package.json`).

### Commands

| Command                   | Description                                                                                                                                                                                       |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `nexora doctor`           | Non-destructive checks: Node ≥20, `.env` / token, `nexora.config.*`, `@nexora.ts/core`, optional Studio API ping on `:3920`                                                                       |
| `nexora dev`              | Runs `pnpm run dev` / `npm run dev` (bot + Studio API). Starts Vite Studio UI when `@nexora.ts/studio` is available; otherwise relies on the embedded UI from `@nexora.ts/dev-server` on `:3002`. |
| `nexora studio`           | Studio UI only (API expected on `:3920`)                                                                                                                                                          |
| `nexora add <package>`    | Validates the npm name, then `pnpm add` (if `pnpm-lock.yaml`) or `npm install`. Prints how to register via `@nexora.ts/plugin-system`.                                                            |
| `nexora remove <package>` | Uninstalls the same way (`pnpm remove` / `npm uninstall`).                                                                                                                                        |
| `nexora list`             | Lists `./plugins` folders and dependencies matching `nexora-plugin-*` / `@nexora.ts/plugin-*`.                                                                                                    |

See [Quick start](/nexora.ts/getting-started/quick-start.md) and [Nexora Studio](/nexora.ts/nexora-studio/studio.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cjays-organization.gitbook.io/nexora.ts/packages/cli.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
