> 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/readme.md).

# Home

**The platform that revolutionizes how Discord bots are built** — open-source TypeScript, production-ready from minute one.

Nexora isn’t another bot template — **it’s the platform Discord developers have been missing.** CLI, Studio, plugins, auto-discovery, auth, and more so you can focus on features instead of scaffolding.

|             |                                                                           |
| ----------- | ------------------------------------------------------------------------- |
| **GitHub**  | [ogcjay/nexorats](https://github.com/ogcjay/nexorats)                     |
| **Discord** | [Join the server](https://discord.gg/fHbCrdHnms) (maintainer: **ogcjay**) |
| **npm**     | [`@nexora.ts/core`](https://www.npmjs.com/package/@nexora.ts/core)        |
| **Status**  | Early preview (`0.1.x`)                                                   |

![Nexora Studio](/files/gVcV7kpOnmoTMSVu0xKa)

## Quick start

```bash
npx @nexora.ts/create my-bot
cd my-bot
pnpm install
cp .env.example .env   # add your Discord token
pnpm dev
```

Open **<http://localhost:3002>** for Nexora Studio. Continue with [**Quick start**](/nexora.ts/getting-started/quick-start.md), [**Nexora Studio**](/nexora.ts/nexora-studio/studio.md), [**Classes**](/nexora.ts/classes/index.md), or [**Introduction**](/nexora.ts/getting-started/introduction.md).

## Nexora vs a typical DIY bot stack

| Feature                           | From-scratch Discord project | Nexora |
| --------------------------------- | :--------------------------: | :----: |
| Discord API compatibility         |        ✅ (you wire it)       |    ✅   |
| Project CLI / scaffold            |        ❌ / copy-paste        |    ✅   |
| Local Developer Center (Studio)   |               ❌              |    ✅   |
| Plugin system                     |              DIY             |    ✅   |
| Auto-discovery                    |              DIY             |    ✅   |
| Typed config + structured logging |              DIY             |    ✅   |

## What you get

| Building block        | What you get                                                                                         |
| --------------------- | ---------------------------------------------------------------------------------------------------- |
| **CLI**               | `@nexora.ts/create` scaffolds a full project                                                         |
| **Studio**            | Local Developer Center (`localhost:3002`)                                                            |
| **Classes**           | `Nexora`, `SlashCommand`, `EmbedBuilder`, Components V2 — see [Classes](/nexora.ts/classes/index.md) |
| **Commands & events** | `command()` / `event()` or class-based commands                                                      |
| **Plugin system**     | Commands, events, API, migrations                                                                    |
| **Auth**              | Discord OAuth, sessions, permissions                                                                 |
| **Database**          | Drizzle + repository layer (PostgreSQL / SQLite)                                                     |
| **API + WebSocket**   | Internal REST API and live events                                                                    |
| **Config & logging**  | Type-safe `defineConfig()`, structured logs                                                          |

## Open source

MIT licensed. Use it, extend it with plugins, improve core and docs — community-driven.

```ts
import { command } from '@nexora.ts/core';
import { defineConfig } from '@nexora.ts/config';

export default defineConfig({
  bot: {
    token: process.env.DISCORD_TOKEN!,
    clientId: process.env.DISCORD_CLIENT_ID!,
  },
});

export const ping = command({
  name: 'ping',
  description: 'Check bot latency',
  async execute(ctx) {
    await ctx.interaction.reply('Pong!');
  },
});
```


---

# 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/readme.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.
