Skip to content

Commit cf32cda

Browse files
docs: align README, AGENTS, CONTRIBUTING, and Pages entrypoints
Keep install commands on the GitHub raw installer across index and llms, document open/mcp/completion and project metadata in README, refresh AGENTS layout and release/tag notes, and match CONTRIBUTING to CHANGELOG [Unreleased] plus docs-preview and automation cross-links.
1 parent b09124f commit cf32cda

5 files changed

Lines changed: 45 additions & 7 deletions

File tree

AGENTS.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ This repository contains Agora CLI, the native CLI for Agora developer onboardin
1919

2020
```
2121
main.go Entry point — wires the root command and calls Execute()
22+
cmd/
23+
gendocs/ Regenerates docs/commands.md from the live cobra tree
2224
internal/cli/
2325
app.go App struct, Execute(), output-mode resolver, env snapshot
2426
commands.go Root command tree; subcommand builders for auth/config/upgrade/etc.
@@ -28,6 +30,11 @@ internal/cli/
2830
config.go appConfig type, defaults, env injection
2931
version.go Build-time version vars, versionInfo, formattedVersion
3032
introspect.go agora introspect + buildIntrospectionData (agent discovery contract)
33+
mcp.go agora mcp serve — JSON-RPC MCP stdio transport + tool dispatch
34+
open_targets.go Canonical URLs for agora open (docs, Console, product docs)
35+
features.go Product feature catalog (rtc/rtm/convoai) shared by doctor, introspect, init defaults
36+
cache.go Short-lived on-disk API caches (project list for shell completion)
37+
completion.go Dynamic shell completion helpers
3138
upgrade.go agora upgrade self-update logic (download, SHA-256, atomic rename)
3239
progress.go NDJSON progress event emitter for long-running JSON-mode commands
3340
auth.go login / logout / whoami / auth status
@@ -42,9 +49,15 @@ internal/cli/
4249
docs/
4350
automation.md Stable JSON output contract — machine-consumption source of truth
4451
install.md Direct installer, platform, CI, and security guidance
52+
_config.yml Jekyll / GitHub Pages configuration (human docs site)
53+
_layouts/, assets/ Theme assets for Pages
54+
scripts/
55+
preview-pages-site.sh Local Jekyll build + URL injection (`make docs-preview`)
56+
prepare-pages-site.py Pages artifact prep (Markdown /md mirror, token expansion)
4557
.github/workflows/
4658
ci.yml Push/PR matrix: Ubuntu, macOS, Windows
4759
release.yml Tag-driven cross-platform release
60+
pages.yml Publish docs to GitHub Pages
4861
apt-repo.yml Signed apt repository publishing
4962
```
5063

@@ -57,6 +70,8 @@ agora
5770
├── init <name> Recommended path: reuses existing project (or creates if none); add --new-project to force creation
5871
├── version Build version, commit, and date
5972
├── introspect Machine-readable command metadata for agents
73+
├── open Open Console, CLI docs (human or /md/), or product docs
74+
├── mcp MCP stdio server for agent tool integrations
6075
├── telemetry Telemetry status/enable/disable
6176
├── upgrade (alias: update) Print package-manager-specific upgrade guidance
6277
├── project
@@ -181,7 +196,7 @@ When adding a command:
181196
| `release.yml` | `v*` tag | Builds cross-platform binaries, publishes GitHub release and package channels |
182197
| `apt-repo.yml` | published release | Updates the signed apt repository |
183198

184-
Tagging `v0.1.4` triggers the release workflow automatically.
199+
Tagging `v0.2.0` (or any `v*` semver tag) triggers the release workflow automatically.
185200

186201
## Gotchas
187202

CONTRIBUTING.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ so it is kept current as the canonical engineering guide.
2727
For end-user behavior and machine-readable contracts, see:
2828

2929
- [`README.md`](README.md) — install, getting-started, command tree.
30+
- [Published docs](https://agoraio.github.io/cli/) — human-readable CLI documentation (GitHub Pages).
3031
- [`docs/automation.md`](docs/automation.md) — JSON envelope, agent guidance,
3132
output mode precedence (including CI auto-detect).
3233
- [`docs/error-codes.md`](docs/error-codes.md) — every stable `error.code`.
@@ -66,8 +67,14 @@ gofmt -l . # must print nothing
6667
golangci-lint run --timeout=5m # uses .golangci.yml
6768
./scripts/check-error-codes.sh # docs/error-codes.md drift check
6869
go run ./cmd/gendocs -check # docs/commands.md drift check
70+
make docs-preview # optional: local Jekyll site + /md preview (requires Ruby/Jekyll)
6971
```
7072

73+
Documentation work:
74+
75+
- Run `make docs-commands` after command-tree changes; CI uses `go run ./cmd/gendocs -check`.
76+
- For GitHub Pages content, use `make docs-preview` (see `scripts/preview-pages-site.sh`). Published docs resolve `@@CLI_DOCS_*@@` tokens via `scripts/prepare-pages-site.py` and `docs/site.env` as documented in `docs/automation.md`.
77+
7178
Install `golangci-lint` (matches the CI version):
7279

7380
```bash
@@ -132,9 +139,11 @@ change; prefer adding a new code and deprecating the old one over a rename.
132139

133140
- Fill in the [pull request template](.github/pull_request_template.md).
134141
- Make sure `make test && make lint` pass locally.
135-
- Include changelog entries in the `## Unreleased` section of `CHANGELOG.md`
142+
- Include changelog entries under the `## [Unreleased]` section of `CHANGELOG.md`
136143
for user-facing changes (new commands, behavior changes, breaking changes,
137-
CLI exit code changes, error code additions).
144+
CLI exit code changes, error code additions). When cutting a release, move
145+
those bullets into a dated `## [x.y.z] - YYYY-MM-DD` section per the note at
146+
the top of `CHANGELOG.md`.
138147
- For UI/UX-affecting changes (pretty output, prompts, progress events,
139148
errors), include before/after copy-paste samples in the PR description.
140149

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ agora init my-nextjs-demo --template nextjs
5858

5959
## Docs
6060

61+
- Human docs (GitHub Pages): [https://agoraio.github.io/cli/](https://agoraio.github.io/cli/)
6162
- Release notes: [CHANGELOG.md](CHANGELOG.md)
6263
- Install options (direct installer, Windows, source): [docs/install.md](docs/install.md)
6364
- Full command reference (auto-generated): [docs/commands.md](docs/commands.md)
@@ -79,6 +80,9 @@ The command model is intentionally layered:
7980
- `config` for local CLI defaults
8081
- `telemetry` for telemetry preferences
8182
- `upgrade` / `update` for package-manager-specific upgrade guidance
83+
- `open` to open the Console, published CLI docs (human or `/md/` Markdown), or product docs in a browser
84+
- `mcp` to run the CLI as a local MCP server (`agora mcp serve`) for agent integrations
85+
- `completion` for shell completion scripts (standard Cobra completion)
8286

8387
Discover the full command tree:
8488

@@ -125,6 +129,14 @@ Reads and updates local CLI defaults such as output mode, log level, and browser
125129

126130
Reads and updates telemetry preferences. `DO_NOT_TRACK=1` disables telemetry at runtime.
127131

132+
### `open`
133+
134+
Opens curated URLs: Console (`--target console`), human CLI docs on GitHub Pages (`docs`), raw Markdown tree for agents (`docs-md`), and Agora product docs (`product-docs`). Use `--no-browser` to print the resolved URL.
135+
136+
### `mcp`
137+
138+
Runs the CLI as an MCP stdio server so MCP-capable clients can call Agora workflows as tools. Authenticate with `agora login` on the host first; OAuth is not exposed through MCP.
139+
128140
### `version`
129141

130142
Prints build metadata. Release binaries include version, commit, and build date.
@@ -177,7 +189,7 @@ agora --help --all
177189

178190
`quickstart env write` is different from `project env write`, but both keep dotenv files limited to runtime credentials.
179191

180-
- `project env write` writes only `AGORA_APP_ID` and `AGORA_APP_CERTIFICATE`
192+
- `project env write` writes only App ID and App Certificate keys for the detected or `--template`-selected layout (for example `AGORA_*` for standard Node, `NEXT_PUBLIC_*` / `NEXT_*` for Next.js, or `APP_ID` / `APP_CERTIFICATE` for Python and Go). See [docs/automation.md](docs/automation.md) for the full matrix and JSON fields.
181193
- `quickstart env write` understands the quickstart type and writes only the App ID and App Certificate variable names the cloned repo expects
182194
- existing `.env` and `.env.local` files are preserved; the CLI appends missing credentials, updates existing credential keys, and comments out duplicate or stale Agora credential aliases for the selected runtime
183195

@@ -207,13 +219,15 @@ The `.agora/project.json` file is created or updated by:
207219
- `agora init`
208220
- `agora quickstart create ... --project ...`
209221
- `agora quickstart env write ...`
222+
- `agora project env write ...` (fills missing `projectType` / `envPath` when applicable)
210223

211224
It stores durable non-secret metadata:
212225

213226
- `projectId`
214227
- `projectName`
215228
- `region`
216229
- `template`
230+
- `projectType` (framework hint used for env layout when present)
217231
- `envPath`
218232

219233
Examples:
@@ -265,7 +279,7 @@ GitHub Actions are configured for:
265279

266280
Release workflow behavior:
267281

268-
- a pushed tag like `v0.1.4` triggers the release workflow
282+
- a pushed tag matching `v*` (for example `v0.2.0`) triggers the release workflow
269283
- the workflow runs tests, builds release binaries, packages them, and publishes a GitHub release automatically
270284
- release artifacts include checksums
271285

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ title: Agora CLI Docs
1717
</svg>
1818
<span class="copy-text">Copy</span>
1919
</button>
20-
<pre><code id="install-command">curl -fsSL https://download.agora.io/cli/install.sh | sh -s -- --add-to-path</code></pre>
20+
<pre><code id="install-command">curl -fsSL https://raw.githubusercontent.com/AgoraIO/cli/main/install.sh | sh -s -- --add-to-path</code></pre>
2121
</div>
2222
</div>
2323

docs/llms.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Quick Start
66

7-
Install: curl -fsSL https://download.agora.io/cli/install.sh | sh
7+
Install: curl -fsSL https://raw.githubusercontent.com/AgoraIO/cli/main/install.sh | sh -s -- --add-to-path
88

99
Login: agora login
1010
Initialize project: agora init my-demo --template nextjs

0 commit comments

Comments
 (0)