Skip to content

docs(cli): re-add CometChat CLI page (CLI-only re-application of #470) - #522

Open
raj-dubey1 wants to merge 3 commits into
mainfrom
docs/cli-docs
Open

docs(cli): re-add CometChat CLI page (CLI-only re-application of #470)#522
raj-dubey1 wants to merge 3 commits into
mainfrom
docs/cli-docs

Conversation

@raj-dubey1

@raj-dubey1 raj-dubey1 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Description

CLI-only re-application of #470 on top of current main.

#470 ("Added CLI Docs") merged into docs/skills-v5-temp, not main. The CLI page was then removed from that branch (commit e6e6422a, which deleted cli.mdx and reverted the related docs.json / index.mdx hunks), so /cli never reached main. This PR brings back only the CLI part.

Applied from #470 (CLI part)

  • cli.mdx (new): the CometChat CLI reference, covering the @cometchat/skills-cli credentials CLI and the @cometchat/skills pack CLI. It started from Added CLI Docs #470's final version; the review fixes below then corrected it against the published CLI.
  • docs.json: adds cli to the hidden Developer Tools group, between agent-skills and mcp-server, the same order as Added CLI Docs #470.
  • index.mdx: adds the CLI card after the existing Agent Skills card.

Already present on main (agent part, not re-added)

  • agent-skills.mdx already exists on main, and has been updated since Added CLI Docs #470 to cover the Angular UI Kit v5 pack.
  • The hidden Developer Tools tab with the Developer Tools group already contains agent-skills and mcp-server. Added CLI Docs #470's move of mcp-server out of the hidden Docs MCP group under Home is also already done on main.
  • The Agent Skills card on index.mdx already exists.

Small supporting change (not in #470)

  • agent-skills.mdx: turns "run the CLI yourself" in Connect your credentials into a link to /cli. The Developer Tools tab is hidden, so without this the page would only be reachable from the home-page card.

No pages were moved or renamed, so no redirects are needed. There was no existing redirect or page at /cli.

Source check

I checked the CLI claims against the current cometchat-skills source (packages/cli/src, bin/cometchat-skills.mjs) and against public npm (@cometchat/skills-cli@3.0.0 and @cometchat/skills@5.0.0 are both latest). The following all match the source:

  • the subcommands, including auth me and features list|enable|disable|ai-key
  • the provision create --name/--region/--industry flags
  • the $schema key written to .cometchat/config.json
  • --json being unsupported on config set and config path
  • the skills-pack commands

packages/cli/README.md in that repo is out of date: it omits features and auth me, and says all commands accept --json. Where the README and the source disagree, this page follows the source.

Verification

  • docs.json is valid JSON, and every navigation page reference resolves to an existing file. That's 3,153 refs with 0 missing, the same as main.
  • Every internal link in cli.mdx, index.mdx and agent-skills.mdx resolves (/agent-skills, /cli, /mcp-server, /ui-kit/react/integration-react, and the rest).
  • mint broken-links on the full repo can't finish on main today. It aborts on a pre-existing MDX syntax error in sdk/react-native/authentication-overview.mdx (line 16), which this PR doesn't touch, and its output is identical with and without this change. I also ran it against a minimal project containing just the changed pages: they parse cleanly, and cli.mdx has zero broken links.

Review fixes (2b6dcdd)

Checked against the published @cometchat/skills-cli@3.0.0 and @cometchat/skills@5.0.0:

  • Scripting and CI (was broken): auth login needs a browser approval and times out (TIMEOUT) on a CI runner, and no command prints a bearer token for CC_TOKEN. The example now writes the config from pipeline secrets with config init --app-id --region --auth-key, which needs no login. A warning says not to add --json there, because its output includes the Auth Key. It also says that provision and features need auth login.
  • config init: it creates or updates the config from --app-id / --region / --auth-key, rather than creating an empty one.
  • No install picker: add installs for Claude Code unless you pass --ide. Fixed in cli.mdx and in agent-skills.mdx (Install section).
  • Credential warning: the CLI already makes config.json owner-only (chmod 600), adds it to .gitignore, and warns if it's already tracked. The page now says so, and gives git rm --cached for the tracked case.
  • features: documents --app-id and that the commands need auth login, and passes the OpenAI key as "$OPENAI_API_KEY" so it stays out of shell history.
  • Docs MCP: add also connects the Docs MCP, and --no-mcp skips it. Documented on both pages.
  • Naming: a note explains that @cometchat/skills-cli is the credentials tool and provides the cometchat command, which the CLI's own messages use. @cometchat/skills is now labelled "Skills installer".
  • agent-skills.mdx: --global is Claude Code only, not Kiro or Replit, and list lists the skills the pack ships, not the installed ones.
  • index.mdx: the "More" group is now cols={2}, so its 4 cards form a 2×2 grid and the CLI card no longer sits alone on a row. The Agent Skills card now says "React or Angular".
  • Next steps: adds the Angular Integration card.

Not fixed here (CLI-side): https://cometchat.com/schemas/config.json returns 404. The page correctly shows what the CLI writes; the CLI needs to publish the schema or drop $schema.

Re-verified: all three changed pages parse cleanly in mint broken-links (minimal project), with no broken links.

Second review pass (1915fe5)

  • provision run: it doesn't generally "pick or create" an app. With one app it uses that app. With several it asks you to pick, and entering n there creates a new one; this needs a TTY. With none it exits with an error that points to provision create. Without --json it prints ✓ App <id> (<region>), not JSON. Fixed in the Quick start comment, the Provision section and the command table.
  • Auth Key output: a note says that config show (with or without --json), config get authKey and provision run --json print the Auth Key in clear text.
  • Claude Code MCP approval: agent-skills.mdx now says to approve cometchat-docs on first start; until then claude mcp list shows it as Pending approval.
  • Uninstall: now lists everything add writes. That's the skill folders, the <!-- cometchat-skills:start/end --> block in the agent's instruction file (AGENTS.md, .windsurfrules, .github/copilot-instructions.md, .clinerules/cometchat.md, GEMINI.md, CONVENTIONS.md), and the cometchat-docs MCP entry. Only Claude Code, Cursor, Gemini and Codex get an MCP entry.

Left as is: the pages stay scoped to React and Angular, although the package also ships React Native, iOS, Android, Flutter and calls skills. That's a product decision.

Type of Change

  • Documentation correction/update
  • New documentation
  • Improvement to existing documentation
  • Typo fix
  • Other (please specify)

Checklist

  • I have read the CONTRIBUTING document
  • My branch name follows the naming convention
  • My changes follow the documentation style guide
  • I have checked for spelling and grammar errors
  • All links in my changes are valid and working
  • My changes are accurately described in this pull request

🤖 Generated with Claude Code

https://claude.ai/code/session_016PKoDnjiUuSaNFfuKLMJFs

PR #470 merged into docs/skills-v5-temp, not main, and the CLI page was
later dropped from that branch. This re-applies only the CLI part on top
of current main:

- cli.mdx: CometChat CLI reference (@cometchat/skills-cli credentials CLI
  + @cometchat/skills pack CLI), content identical to #470
- docs.json: add "cli" to the hidden Developer Tools group
- index.mdx: add the CLI card next to the existing Agent Skills card
- agent-skills.mdx: link "run the CLI yourself" to /cli so the page is
  reachable from where the CLI is mentioned

The agent part of #470 (agent-skills page, Developer Tools tab with
agent-skills + mcp-server, Agent Skills index card) is already on main.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PKoDnjiUuSaNFfuKLMJFs
@mintlify

mintlify Bot commented Sep 11, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
cometchat 🟢 Ready View Preview Sep 11, 2026, 4:56 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

- cli.mdx: replace the Scripting and CI example. auth login needs a browser
  approval and times out on CI runners; use config init with pipeline
  secrets instead, and warn against --json there (it echoes the Auth Key).
- cli.mdx: config init creates/updates the config from --app-id, --region
  and --auth-key; it isn't an "empty config".
- cli.mdx: add is non-interactive (defaults to Claude Code), not a picker.
- cli.mdx: the CLI already chmods config.json to 600, gitignores it, and
  warns when it's tracked; say so instead of asking readers to do it.
- cli.mdx: document features --app-id, pass the OpenAI key from an env
  var, note add connects the Docs MCP (--no-mcp), explain the
  skills-cli package / `cometchat` command naming, add Angular next step.
- agent-skills.mdx: add has no picker and connects the Docs MCP; --global
  is Claude Code only; list shows the skills the pack ships.
- index.mdx: 2-column "More" group so the 4 cards form a 2x2 grid;
  Agent Skills card mentions Angular.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PKoDnjiUuSaNFfuKLMJFs
…val, uninstall

- cli.mdx: provision run doesn't "pick or create" in general. It uses the
  only app, prompts when there are several (entering `n` there creates
  one; needs a TTY), and exits when there are none. Without --json it
  prints "✓ App <id> (<region>)", not JSON.
- cli.mdx: note that config show (with or without --json), config get
  authKey and provision run --json print the Auth Key in clear.
- agent-skills.mdx: Claude Code must approve the cometchat-docs MCP on
  first start ("Pending approval" until then).
- agent-skills.mdx: full uninstall list, covering skill folders, the
  managed router block in the agent's instruction file, and the
  cometchat-docs MCP entry (Claude Code, Cursor, Gemini, Codex only).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PKoDnjiUuSaNFfuKLMJFs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants