Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions agent-skills.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Build CometChat with AI Agent Skills"
sidebarTitle: "Agent Skills"
description: "Install the CometChat agent skills and let your AI coding agent — Claude Code, Cursor, GitHub Copilot, Replit, and more — add production-grade chat and calling to your React or Angular app from natural-language prompts."

Check warning on line 4 in agent-skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

agent-skills.mdx#L4

Did you really mean 'Replit'?
canonical: "https://www.cometchat.com/docs/agent-skills"
---

Expand All @@ -26,7 +26,7 @@
- **Node.js 18+** — the installer runs through `npx`, so there's nothing to install globally.
- A **CometChat account** — [sign up free](https://app.cometchat.com) to get an app's App ID, Region, and Auth Key.
- An **existing React or Angular app**:
- **React** 18+ — **Vite**, **Create React App**, **Next.js**, **React Router**, or **Astro**.

Check warning on line 29 in agent-skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

agent-skills.mdx#L29

Did you really mean 'Astro'?
- **Angular** 17–21 — **Angular CLI** or **Nx**. (Angular 22 is not yet installable: the UI Kit's peer range is `<22.0.0`.)
- One of the [supported AI coding agents](#supported-agents) below.

Expand All @@ -45,9 +45,12 @@
npx @cometchat/skills add
```

It detects your React or Angular setup and opens a picker to install the skills for
the AI agent(s) you use. To pin a single agent — useful in CI or a Dockerfile — pass
`--ide`:
It detects your React or Angular setup and installs the skills for **Claude Code**
by default. It also connects the CometChat Docs MCP server (`cometchat-docs`) for
that agent; pass `--no-mcp` to skip it. In Claude Code, approve `cometchat-docs`
when `claude` asks on first start in the project — until then `claude mcp list`
shows it as *Pending approval*, and the skills fall back to the docs site. To
install for a different agent, pass `--ide`:

```bash
npx @cometchat/skills add --ide claude # Claude Code → .claude/skills/
Expand All @@ -64,20 +67,20 @@
| Cursor | `--ide cursor` |
| GitHub Copilot | `--ide copilot` |
| Windsurf | `--ide windsurf` |
| Replit Agent | `--ide replit` |

Check warning on line 70 in agent-skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

agent-skills.mdx#L70

Did you really mean 'Replit'?
| Cline | `--ide cline` |
| Codex | `--ide codex` |
| Gemini | `--ide gemini` |
| Continue | `--ide continue` |
| Aider | `--ide aider` |
| Kiro | `--ide kiro` |

Check warning on line 76 in agent-skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

agent-skills.mdx#L76

Did you really mean 'Kiro'?
| Antigravity | `--ide antigravity` |

<Note>
Claude Code, Kiro, and Replit get a native `SKILL.md` tree. The other agents get

Check warning on line 80 in agent-skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

agent-skills.mdx#L80

Did you really mean 'Kiro'?

Check warning on line 80 in agent-skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

agent-skills.mdx#L80

Did you really mean 'Replit'?
an orienting router plus a `./.cometchat/skills` tree. Add `--global` (Claude
Code, Kiro, and Replit only) to install into your user-level directory instead of
the project.
Code only) to install into your user-level `~/.claude/skills` instead of the
project.
</Note>

## Use it
Expand Down Expand Up @@ -116,7 +119,7 @@
- **Fetch from your dashboard (recommended)** — the skill runs the standalone
CometChat CLI for you, on demand: it opens the dashboard login in your
browser, lets you pick one of your **existing** apps, pulls the credentials,
and writes a neutral `.cometchat/config.json`. You can also run the CLI yourself
and writes a neutral `.cometchat/config.json`. You can also [run the CLI yourself](/cli)
— it works on its own, in a script, or in CI.
- **Paste manually** — copy App ID, Region, and Auth Key from **Dashboard → Your
App → Credentials** if you'd rather not log in.
Expand All @@ -128,7 +131,7 @@
<Warning>
**Keep credentials out of version control.** Both `.cometchat/config.json` and
the generated env file contain your **Auth Key**. Make sure they're in
`.gitignore` — Vite, CRA, and Astro ignore only `*.local` (not `.env`), so add

Check warning on line 134 in agent-skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

agent-skills.mdx#L134

Did you really mean 'Astro'?
`.env` yourself; Next.js ignores `.env.local` by default. The Auth Key is for
**development only**: in production, mint a short-lived per-user **auth token** on
your backend and log in with `loginWithAuthToken()` — never ship the Auth Key to
Expand All @@ -149,7 +152,7 @@
| `cometchat-react-v7-components` | The v7 component catalog + props / slots |
| `cometchat-react-v7-placement` | Where chat lives — full app / sidebar / popup / embed |
| `cometchat-react-v7-customization` | Theming · brand · light/dark · view slots |
| `cometchat-react-v7-patterns` | Vite / Next.js / React Router / Astro glue (env · SSR · routing) |

Check warning on line 155 in agent-skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

agent-skills.mdx#L155

Did you really mean 'Astro'?
| `cometchat-react-v7-features` | Enable a feature — reactions · polls · AI · moderation · … |
| `cometchat-react-v7-calls` | Voice / video calling |
| `cometchat-react-v7-push` | Web push (Notifications product) |
Expand All @@ -163,7 +166,7 @@
| `cometchat-angular-v5-components` | The v5 component catalog + inputs / outputs / view slots |
| `cometchat-angular-v5-placement` | Where chat lives — chat shell · thread and details panels · routing |
| `cometchat-angular-v5-customization` | Theming · brand · light/dark · view slots |
| `cometchat-angular-v5-patterns` | Angular CLI / Nx glue (environments · SSR · lazy routes · RxJS) |

Check warning on line 169 in agent-skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

agent-skills.mdx#L169

Did you really mean 'Nx'?
| `cometchat-angular-v5-features` | Enable a feature — reactions · polls · AI · moderation · … |
| `cometchat-angular-v5-calls` | Voice / video calling |
| `cometchat-angular-v5-push` | Web push (Notifications product) |
Expand Down Expand Up @@ -222,8 +225,11 @@
## Manage the skills

- **Update** — re-run `npx @cometchat/skills add` to pull the latest skills; it overwrites the installed skill tree in place.
- **Inspect** — `npx @cometchat/skills list` shows the installed skills, and `npx @cometchat/skills doctor` runs an environment health check.
- **Uninstall** — delete the installed skill directory for your agent (for example `.claude/skills/cometchat*`, `.agents/skills/`, or `./.cometchat/skills`).
- **Inspect** — `npx @cometchat/skills list` lists the skills the pack ships, and `npx @cometchat/skills doctor` runs an environment health check.
- **Uninstall** — there's no uninstall command. Remove what `add` wrote for your agent:
- **The skill files** — `.claude/skills/cometchat*` (Claude Code), `.kiro/skills/cometchat*` (Kiro), `.agents/skills/cometchat*` (Replit), or `./.cometchat/skills` (every other agent).

Check warning on line 230 in agent-skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

agent-skills.mdx#L230

Did you really mean 'Kiro'?

Check warning on line 230 in agent-skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

agent-skills.mdx#L230

Did you really mean 'Replit'?
- **The router block** — for the other agents, `add` also writes a block between `<!-- cometchat-skills:start -->` and `<!-- cometchat-skills:end -->` into the agent's instruction file: `AGENTS.md` (Cursor, Codex, Antigravity, Continue), `.windsurfrules`, `.github/copilot-instructions.md`, `.clinerules/cometchat.md`, `GEMINI.md`, or `CONVENTIONS.md` (Aider). Delete that block and keep the rest of the file.
- **The Docs MCP entry** — remove the `cometchat-docs` server from `.mcp.json` (Claude Code), `.cursor/mcp.json` (Cursor), `.gemini/settings.json` (Gemini), or `.codex/config.toml` (Codex). Other agents get no MCP entry.
- **Version control** — commit the skill files so your whole team shares the same setup. Do **not** commit `.cometchat/config.json` or the generated env file — they hold your Auth Key.

## Troubleshooting
Expand All @@ -231,10 +237,10 @@
| Symptom | Likely cause | Fix |
| --- | --- | --- |
| The agent doesn't pick up the skills | Installed for a different agent, or a router-based agent needs pointing at the tree | Re-run `npx @cometchat/skills add --ide <your-agent>`. For router agents (Cursor, Copilot, …) open `.cometchat/skills/cometchat/SKILL.md` to orient it. |
| Blank screen, no errors | A UI Kit component rendered before `init()` + `login()` resolved, or the wrong Region / env prefix | The `init → login → render` order is required. Check that the Region matches your dashboard app and the env prefix matches your bundler (`VITE_` / `NEXT_PUBLIC_` / `PUBLIC_`). |

Check warning on line 240 in agent-skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

agent-skills.mdx#L240

Did you really mean 'bundler'?
| `login()` fails — "user not found" | Logging in a UID that doesn't exist in the app | Use a UID that exists (Dashboard → your app → **Users**; fresh apps seed `cometchat-uid-1`). |
| Auth error on init / login | Region mismatch between your code and the dashboard app | Re-check the Region (`us` / `eu` / `in`) in both the dashboard and your env file. |
| `ERROR_API_KEY_NOT_FOUND` | An env var is empty or not picked up by the bundler | Confirm the env file uses the right prefix for your bundler, then restart the dev server. |

Check warning on line 243 in agent-skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

agent-skills.mdx#L243

Did you really mean 'bundler'?

Check warning on line 243 in agent-skills.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

agent-skills.mdx#L243

Did you really mean 'bundler'?
| Version conflict during install | An older **v6** UI Kit is already installed | Ask the agent to migrate — the `cometchat-react-v7-migration` skill upgrades v6 → v7. |

## Compatibility
Expand Down
264 changes: 264 additions & 0 deletions cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
---
title: "CometChat CLI"
sidebarTitle: "CLI"
description: "Authenticate against the CometChat dashboard, provision app credentials, toggle features, and manage the AI agent skills — all from your terminal, with JSON output for scripting and CI."
canonical: "https://www.cometchat.com/docs/cli"
---

CometChat ships two complementary command-line tools:

| Tool | Package | What it does |
| --- | --- | --- |
| **Credentials CLI** (`cometchat`) | `@cometchat/skills-cli` | Dashboard authentication + app-credential provisioning + feature toggles |
| **Skills installer** | `@cometchat/skills` | Install, list, and verify the [AI Agent Skills](/agent-skills) |

<Note>
Despite its package name, `@cometchat/skills-cli` is the **credentials** tool —
it doesn't install skills. It provides a `cometchat` command, so the CLI's own
messages (for example *"Run `cometchat auth login`"*) use that short form. This
page runs it through `npx`; `cometchat auth login` and
`npx @cometchat/skills-cli auth login` are the same command. The skills
themselves are installed by `@cometchat/skills`.
</Note>

<Note>
The credentials CLI is **standalone** — use it on its own, in a script, or in CI.
It's a pure dashboard/API client: it authenticates, fetches your app credentials
(App ID / Region / Auth Key), and writes a neutral `.cometchat/config.json`. By
design it does **not** detect your framework, write env files, or generate code,
so it stays framework-agnostic and works with any stack. The
[agent skills](/agent-skills) are one consumer that can run it for you — but the
CLI doesn't require them.
</Note>

Both run through `npx` with no global install, and most commands accept `--json`
for machine-readable output (the exceptions are `config set` and `config path`,
which print plain text).

## Prerequisites

- **Node.js 18+** — both CLIs run through `npx`.

Check warning on line 40 in cli.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

cli.mdx#L40

Did you really mean 'CLIs'?
- A **CometChat account** — [sign up free](https://app.cometchat.com). `auth login` opens the dashboard in your browser to authenticate.

---

## Credentials CLI — `@cometchat/skills-cli`

Its only job is authenticating against the CometChat dashboard and fetching your
**App ID / Region / Auth Key**, then writing a neutral `.cometchat/config.json`
that any tool — your own scripts, a CI job, or the agent skills — can read.

### Quick start

```bash
# 1. Authenticate against the dashboard (opens your browser)
npx @cometchat/skills-cli auth login

# 2. List the apps on your account
npx @cometchat/skills-cli provision list --json

# 3. Select an app, fetch its creds, write .cometchat/config.json
npx @cometchat/skills-cli provision run

# 4. Inspect the local config you just wrote
npx @cometchat/skills-cli config show --json
```

### Authenticate

```bash
npx @cometchat/skills-cli auth login
```

Opens your browser at the CometChat dashboard for device authentication and
stores the bearer token in your OS keychain (falling back to a `chmod 600` file).

| Command | Purpose |
| --- | --- |
| `auth login` | Sign in via the dashboard (device auth) |
| `auth status` | Show whether you're signed in |
| `auth me` | Print the authenticated account |
| `auth logout` | Clear the stored token |
| `auth signup` | Create a CometChat account |

### Provision credentials

```bash
npx @cometchat/skills-cli provision run
```

Fetches the app's **App ID / Region / Auth Key** and writes a neutral
`.cometchat/config.json`, then prints the selected app (`✓ App <id> (<region>)`)
and the config path. Add `--json` to get the credentials as JSON instead. It
writes **no** framework env file — read `config.json` and set your framework's
env vars (`.env` / `VITE_` / `NEXT_PUBLIC_` …) yourself, or let the agent skills
do it.

Which app it uses depends on how many your account has:

- **One app** — it uses that app.
- **Several apps** — it lists them and asks you to pick one, or to enter `n` to
create a new app. This needs an interactive terminal; in a script, use
`provision list` and then `provision use --app-id <id>`.
- **No apps** — it exits with an error. Create one first with
`provision create --name <name>`.

| Command | Purpose |
| --- | --- |
| `provision run` | Select an app (see above), fetch its creds, write config |

Check warning on line 108 in cli.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

cli.mdx#L108

Did you really mean 'creds'?
| `provision list` | List the apps on your account |
| `provision create --name <name>` | Create a new app (`--name` required) |
| `provision use --app-id <id>` | Select a specific app by id |

Create a new app non-interactively — `--name` is required, `--region` and
`--industry` are optional:

```bash
npx @cometchat/skills-cli provision create --name "My Chat" --region us
```

The config file `provision` writes:

```json
{
"$schema": "https://cometchat.com/schemas/config.json",
"version": 1,
"appId": "…",
"region": "us",
"authKey": "…",
"appName": "My Chat",
"plan": "…",
"industry": "…"
}
```

<Warning>
`.cometchat/config.json` contains your **Auth Key**. The CLI writes it readable
by your user only (`chmod 600`) and adds it to `.gitignore` for you. If the file
is **already tracked** by git, the CLI warns you — a `.gitignore` entry doesn't
untrack it, so run `git rm --cached .cometchat/config.json` and commit. The Auth
Key is for **development only**; in production, mint a per-user **auth token** on
your backend and log in with `loginWithAuthToken()` instead of shipping the Auth
Key to a client.
</Warning>

### Manage config

Read and edit the local `.cometchat/config.json` (credential/app state only):

| Command | Purpose |
| --- | --- |
| `config init [--app-id <id>] [--region <region>] [--auth-key <key>]` | Create or update the config from the given values — no dashboard login needed |
| `config get <key>` | Read a single value |
| `config set <key> <value>` | Write a single value |
| `config show` | Print the full config |
| `config path` | Print the config file location |

<Note>
`config show` prints the **Auth Key** in clear text, with or without `--json`,
and so do `config get authKey` and `provision run --json`. Avoid running them
while screen-sharing or anywhere the output is logged.
</Note>

### Toggle features

Enable or disable app features from the terminal. These commands call the
dashboard, so run `auth login` first:

| Command | Purpose |
| --- | --- |
| `features list` | List available features and their state |
| `features enable <feature>` | Turn a feature on |
| `features disable <feature>` | Turn a feature off |
| `features ai-key <openai-key>` | Set the app's OpenAI key that AI features need |

Every `features` command targets the app in `.cometchat/config.json`. Pass
`--app-id <id>` to target a different app:

```bash
npx @cometchat/skills-cli features list --app-id "$COMETCHAT_APP_ID" --json
```

AI features need an OpenAI key before they can run. The key is a required
argument — pass it from an environment variable so it doesn't land in your shell
history:

```bash
npx @cometchat/skills-cli features ai-key "$OPENAI_API_KEY"
```

---

## Skills CLI — `@cometchat/skills`

Installs and manages the [AI Agent Skills](/agent-skills) that let your coding
agent build with CometChat.

```bash
npx @cometchat/skills add
```

| Command | Purpose |
| --- | --- |
| `detect` | Probe the current project (framework, UI Kit, version conflicts) |
| `add [--ide <agent>] [--no-mcp]` | Install the skills for an AI agent (default: Claude Code) and connect the CometChat Docs MCP (`--no-mcp` skips it) |
| `list` | List the skills this pack ships |
| `info <skill>` | Show a skill's triggers + compatibility |
| `verify [tier]` | Run the skill quality gates |
| `catalog` | Refresh the component catalog from the installed UI Kit |
| `doctor` | Environment health check |

`add` doesn't prompt: with no `--ide` it installs for Claude Code. See
[Agent Skills](/agent-skills) for the supported agents and their `--ide` values,
`--global`, and the prompt-driven workflow.

---

## Scripting and CI

`auth login` is interactive: it opens a browser and waits for you to approve the
sign-in, so on a CI runner it times out (`TIMEOUT`). In CI, skip the dashboard
login and write the config straight from your pipeline secrets with
`config init`, which needs no login:

```bash
# Write .cometchat/config.json from CI secrets, then install the skills for Claude Code
npx @cometchat/skills-cli config init --app-id "$COMETCHAT_APP_ID" --region "$COMETCHAT_REGION" --auth-key "$COMETCHAT_AUTH_KEY"
npx @cometchat/skills add --ide claude
```

<Warning>
Don't add `--json` to `config init` in CI — its JSON output includes the Auth
Key, which would end up in your build logs. Store the App ID, Region, and Auth
Key as masked CI secrets.
</Warning>

The commands that call the dashboard — `provision` and `features` — need
`auth login`, so run them from your own machine rather than in CI. Everywhere
else, most commands support `--json` (the exceptions are `config set` and
`config path`, which print plain text).

Commands **exit non-zero on failure** and surface dashboard errors verbatim (for
example `ACCESS_DENIED`, `EXPIRED`, `TIMEOUT`, `ABORTED`), so a broken auth or
provisioning step fails the CI job loudly instead of continuing with empty
credentials.

## Next steps

<CardGroup cols={2}>
<Card title="Agent Skills" icon="robot" href="/agent-skills">
Install the skills and build CometChat from natural-language prompts
</Card>
<Card title="MCP Integration" icon="plug" href="/mcp-server">
Connect CometChat to any Model Context Protocol–compatible agent
</Card>
<Card title="React Integration" icon="react" href="/ui-kit/react/integration-react">
The manual React UI Kit setup, credentials and all
</Card>
<Card title="Angular Integration" icon="angular" href="/ui-kit/angular/integration">
The manual Angular UI Kit setup, credentials and all
</Card>
<Card title="Get your credentials" icon="key" href="https://app.cometchat.com">
Open the CometChat dashboard
</Card>
</CardGroup>
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"group": "Developer Tools",
"pages": [
"agent-skills",
"cli",
"mcp-server"
]
}
Expand Down
9 changes: 7 additions & 2 deletions index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
iconType="solid"
href="/ai-agents"
>
Automate conversations using AI-powered chatbot technology.

Check warning on line 52 in index.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

index.mdx#L52

Did you really mean 'chatbot'?
</Card>

<Card
Expand Down Expand Up @@ -124,7 +124,7 @@
Additional solutions to customize your CometChat experience.
</p>

<CardGroup cols={3}>
<CardGroup cols={2}>

<Card
title="On-Premise Deployment"
Expand All @@ -142,8 +142,13 @@
</Card>

<Card title="Agent Skills" icon="wand-magic-sparkles" iconType="solid" href="/agent-skills">
Let your AI coding agent add CometChat chat & calling to your React app.
Let your AI coding agent add CometChat chat & calling to your React or Angular app.
</Card>

<Card title="CLI" icon="terminal" iconType="solid" href="/cli">
Authenticate, provision credentials, and manage the skills from your terminal.
</Card>

</CardGroup>

</div>
Expand Down