opencode-agora 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/README.md +217 -52
  2. package/dist/cli/app.d.ts +3 -0
  3. package/dist/cli/app.d.ts.map +1 -1
  4. package/dist/cli/app.js +1053 -183
  5. package/dist/cli/app.js.map +1 -1
  6. package/dist/cli/chat-renderer.d.ts +31 -0
  7. package/dist/cli/chat-renderer.d.ts.map +1 -0
  8. package/dist/cli/chat-renderer.js +275 -0
  9. package/dist/cli/chat-renderer.js.map +1 -0
  10. package/dist/cli/commands-meta.d.ts +21 -0
  11. package/dist/cli/commands-meta.d.ts.map +1 -0
  12. package/dist/cli/commands-meta.js +600 -0
  13. package/dist/cli/commands-meta.js.map +1 -0
  14. package/dist/cli/completions.d.ts +18 -0
  15. package/dist/cli/completions.d.ts.map +1 -0
  16. package/dist/cli/completions.js +190 -0
  17. package/dist/cli/completions.js.map +1 -0
  18. package/dist/cli/mcp-server.d.ts +4 -0
  19. package/dist/cli/mcp-server.d.ts.map +1 -0
  20. package/dist/cli/mcp-server.js +277 -0
  21. package/dist/cli/mcp-server.js.map +1 -0
  22. package/dist/cli/menu.d.ts +7 -0
  23. package/dist/cli/menu.d.ts.map +1 -0
  24. package/dist/cli/menu.js +164 -0
  25. package/dist/cli/menu.js.map +1 -0
  26. package/dist/cli/pages/community.d.ts +3 -0
  27. package/dist/cli/pages/community.d.ts.map +1 -0
  28. package/dist/cli/pages/community.js +276 -0
  29. package/dist/cli/pages/community.js.map +1 -0
  30. package/dist/cli/pages/helpers.d.ts +32 -0
  31. package/dist/cli/pages/helpers.d.ts.map +1 -0
  32. package/dist/cli/pages/helpers.js +67 -0
  33. package/dist/cli/pages/helpers.js.map +1 -0
  34. package/dist/cli/pages/home.d.ts +3 -0
  35. package/dist/cli/pages/home.d.ts.map +1 -0
  36. package/dist/cli/pages/home.js +148 -0
  37. package/dist/cli/pages/home.js.map +1 -0
  38. package/dist/cli/pages/marketplace.d.ts +3 -0
  39. package/dist/cli/pages/marketplace.d.ts.map +1 -0
  40. package/dist/cli/pages/marketplace.js +179 -0
  41. package/dist/cli/pages/marketplace.js.map +1 -0
  42. package/dist/cli/pages/news.d.ts +3 -0
  43. package/dist/cli/pages/news.d.ts.map +1 -0
  44. package/dist/cli/pages/news.js +561 -0
  45. package/dist/cli/pages/news.js.map +1 -0
  46. package/dist/cli/pages/settings.d.ts +3 -0
  47. package/dist/cli/pages/settings.d.ts.map +1 -0
  48. package/dist/cli/pages/settings.js +166 -0
  49. package/dist/cli/pages/settings.js.map +1 -0
  50. package/dist/cli/pages/types.d.ts +67 -0
  51. package/dist/cli/pages/types.d.ts.map +1 -0
  52. package/dist/cli/pages/types.js +2 -0
  53. package/dist/cli/pages/types.js.map +1 -0
  54. package/dist/cli/prompter.d.ts +135 -0
  55. package/dist/cli/prompter.d.ts.map +1 -0
  56. package/dist/cli/prompter.js +675 -0
  57. package/dist/cli/prompter.js.map +1 -0
  58. package/dist/cli/shell.d.ts +23 -0
  59. package/dist/cli/shell.d.ts.map +1 -0
  60. package/dist/cli/shell.js +819 -0
  61. package/dist/cli/shell.js.map +1 -0
  62. package/dist/cli/tui.d.ts +7 -0
  63. package/dist/cli/tui.d.ts.map +1 -0
  64. package/dist/cli/tui.js +373 -0
  65. package/dist/cli/tui.js.map +1 -0
  66. package/dist/cli.js +1 -1
  67. package/dist/cli.js.map +1 -1
  68. package/dist/commands.d.ts +14 -0
  69. package/dist/commands.d.ts.map +1 -0
  70. package/dist/commands.js +28 -0
  71. package/dist/commands.js.map +1 -0
  72. package/dist/community/client.d.ts +47 -0
  73. package/dist/community/client.d.ts.map +1 -0
  74. package/dist/community/client.js +245 -0
  75. package/dist/community/client.js.map +1 -0
  76. package/dist/community/types.d.ts +50 -0
  77. package/dist/community/types.d.ts.map +1 -0
  78. package/dist/community/types.js +11 -0
  79. package/dist/community/types.js.map +1 -0
  80. package/dist/config.d.ts +1 -3
  81. package/dist/config.d.ts.map +1 -1
  82. package/dist/config.js +0 -17
  83. package/dist/config.js.map +1 -1
  84. package/dist/data.d.ts +1 -1
  85. package/dist/data.d.ts.map +1 -1
  86. package/dist/data.js +667 -3
  87. package/dist/data.js.map +1 -1
  88. package/dist/format.d.ts +5 -39
  89. package/dist/format.d.ts.map +1 -1
  90. package/dist/format.js +5 -120
  91. package/dist/format.js.map +1 -1
  92. package/dist/history.d.ts +13 -0
  93. package/dist/history.d.ts.map +1 -0
  94. package/dist/history.js +37 -0
  95. package/dist/history.js.map +1 -0
  96. package/dist/index.d.ts.map +1 -1
  97. package/dist/index.js +114 -234
  98. package/dist/index.js.map +1 -1
  99. package/dist/init.d.ts.map +1 -1
  100. package/dist/init.js +4 -9
  101. package/dist/init.js.map +1 -1
  102. package/dist/live.d.ts +4 -0
  103. package/dist/live.d.ts.map +1 -1
  104. package/dist/live.js +11 -3
  105. package/dist/live.js.map +1 -1
  106. package/dist/marketplace.d.ts +9 -0
  107. package/dist/marketplace.d.ts.map +1 -1
  108. package/dist/marketplace.js +105 -15
  109. package/dist/marketplace.js.map +1 -1
  110. package/dist/news/cache.d.ts +13 -0
  111. package/dist/news/cache.d.ts.map +1 -0
  112. package/dist/news/cache.js +65 -0
  113. package/dist/news/cache.js.map +1 -0
  114. package/dist/news/score.d.ts +4 -0
  115. package/dist/news/score.d.ts.map +1 -0
  116. package/dist/news/score.js +43 -0
  117. package/dist/news/score.js.map +1 -0
  118. package/dist/news/sources/arxiv.d.ts +9 -0
  119. package/dist/news/sources/arxiv.d.ts.map +1 -0
  120. package/dist/news/sources/arxiv.js +103 -0
  121. package/dist/news/sources/arxiv.js.map +1 -0
  122. package/dist/news/sources/github-trending.d.ts +9 -0
  123. package/dist/news/sources/github-trending.d.ts.map +1 -0
  124. package/dist/news/sources/github-trending.js +93 -0
  125. package/dist/news/sources/github-trending.js.map +1 -0
  126. package/dist/news/sources/hn.d.ts +9 -0
  127. package/dist/news/sources/hn.d.ts.map +1 -0
  128. package/dist/news/sources/hn.js +53 -0
  129. package/dist/news/sources/hn.js.map +1 -0
  130. package/dist/news/sources/reddit.d.ts +9 -0
  131. package/dist/news/sources/reddit.d.ts.map +1 -0
  132. package/dist/news/sources/reddit.js +68 -0
  133. package/dist/news/sources/reddit.js.map +1 -0
  134. package/dist/news/sources/rss.d.ts +14 -0
  135. package/dist/news/sources/rss.d.ts.map +1 -0
  136. package/dist/news/sources/rss.js +102 -0
  137. package/dist/news/sources/rss.js.map +1 -0
  138. package/dist/news/types.d.ts +39 -0
  139. package/dist/news/types.d.ts.map +1 -0
  140. package/dist/news/types.js +47 -0
  141. package/dist/news/types.js.map +1 -0
  142. package/dist/preferences.d.ts +14 -0
  143. package/dist/preferences.d.ts.map +1 -0
  144. package/dist/preferences.js +31 -0
  145. package/dist/preferences.js.map +1 -0
  146. package/dist/settings.d.ts +26 -0
  147. package/dist/settings.d.ts.map +1 -0
  148. package/dist/settings.js +257 -0
  149. package/dist/settings.js.map +1 -0
  150. package/dist/transcript.d.ts +28 -0
  151. package/dist/transcript.d.ts.map +1 -0
  152. package/dist/transcript.js +79 -0
  153. package/dist/transcript.js.map +1 -0
  154. package/dist/types.d.ts +6 -1
  155. package/dist/types.d.ts.map +1 -1
  156. package/dist/ui.d.ts +157 -0
  157. package/dist/ui.d.ts.map +1 -0
  158. package/dist/ui.js +296 -0
  159. package/dist/ui.js.map +1 -0
  160. package/package.json +11 -9
  161. package/dist/api.d.ts +0 -72
  162. package/dist/api.d.ts.map +0 -1
  163. package/dist/api.js +0 -109
  164. package/dist/api.js.map +0 -1
  165. package/dist/logger.d.ts +0 -20
  166. package/dist/logger.d.ts.map +0 -1
  167. package/dist/logger.js +0 -59
  168. package/dist/logger.js.map +0 -1
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # Agora — Instant OpenCode Setup & Marketplace
1
+ # Agora — The Developer's Terminal Marketplace
2
2
 
3
3
  <p align="center">
4
- <strong>One command from zero to a perfectly configured OpenCode environment.</strong>
4
+ <strong>A standalone terminal hub for discovering, installing, and (soon) trading agent tooling.</strong>
5
5
  </p>
6
6
 
7
7
  <p align="center">
8
- Project scanner, MCP marketplace, workflow manager, and community hub all in one CLI.
8
+ Project scanner, MCP marketplace, and workflow manager — a standalone CLI, with a thin OpenCode plugin as one of its surfaces.
9
9
  </p>
10
10
 
11
11
  <p align="center">
@@ -23,12 +23,39 @@ _A terminal recording is in the works — see ROADMAP.md._
23
23
 
24
24
  ## What is Agora?
25
25
 
26
- Agora is a **zero-config OpenCode setup tool** and terminal marketplace. Run `npx opencode-agora init` in any project and it automatically scans your stack, generates the perfect `opencode.json`, installs MCP servers, and registers the plugin.
26
+ Agora is a **standalone terminal marketplace** for the agentic-coding ecosystem MCP servers, workflows, and tutorials, browsable and installable from your shell with no login and no backend. Run `npx opencode-agora init` in any project and it scans your stack, generates the right `opencode.json`, and installs matched MCP servers.
27
27
 
28
- It also bundles **36+ MCP servers**, **10 production workflows**, **6 tutorials**, and a full community discussion system — all usable offline.
28
+ It bundles **61 MCP servers**, **12 production workflows**, **12 tutorials**, and **6 prompts**, all usable offline.
29
+
30
+ **Where it's headed:** Agora is evolving into an **open, self-regulating marketplace** where third-party developers publish and sell advanced skills, tools, and kits — with Agora providing the square and the rules (discovery, trust, delivery), not the goods. See [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md) for the direction and [`ROADMAP.md`](./ROADMAP.md) for the plan.
31
+
32
+ ### Surfaces
33
+
34
+ Agora is one core marketplace engine behind three surfaces:
35
+
36
+ - **`agora` CLI** — the primary, standalone experience. Browse, install, manage from any terminal.
37
+ - **OpenCode plugin** — a thin bridge that surfaces the catalog *inside* OpenCode and installs into the current project. ([details](#opencode-plugin-commands))
38
+ - **`hub/`** — an optional local web console for browsing.
29
39
 
30
40
  ## Features
31
41
 
42
+ ### Interactive shell — `agora` in a TTY
43
+ Run `agora` with no arguments in an interactive terminal and you drop into
44
+ the agora shell: a persistent REPL with mixed bash/chat dispatch.
45
+
46
+ - Type a shell command (`ls`, `git status`, `npm test`) and it runs.
47
+ - Type a question or sentence and it routes to `opencode` for a free
48
+ inference chat — markdown formatting, live duration counter, ionic
49
+ mascot while thinking.
50
+ - `!cmd` forces bash, `?msg` forces chat, `/help` lists meta commands
51
+ (`/menu` `/terminal` `/transcript` `/clear` `/verbose` `/quiet` `/medium` `/last`
52
+ `/again` `/quit`).
53
+ - Tab completion, auto-complete on `/`, ctrl-r reverse history search, ghost-text suggestions.
54
+ - Per-cwd transcripts under `~/.config/agora/transcripts/` so each
55
+ project keeps its own session and chat thread isolated.
56
+ - `/terminal` spawns a bash subshell from anywhere.
57
+ - Orange-accented home screen with model name, `/terminal`, and page shortcuts.
58
+
32
59
  ### `agora init` — One-Command Setup
33
60
  - Scans your project for `package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`, `Gemfile`, `Dockerfile`, and more
34
61
  - Detects frameworks (React, Next.js, Django, Rails, Spring, Vue)
@@ -42,10 +69,11 @@ It also bundles **36+ MCP servers**, **10 production workflows**, **6 tutorials*
42
69
  - No manual copy-pasting — one command and the workflow is live
43
70
 
44
71
  ### Rich Offline Marketplace
45
- - **36+ MCP servers** across 12 categories (filesystem, databases, cloud, browser automation, monitoring, etc.)
72
+ - **61 MCP servers** across 12 categories (filesystem, databases, cloud, browser automation, monitoring, etc.) — every `npmPackage` is verified against the live npm registry
46
73
  - All official `@modelcontextprotocol/*` servers plus top community servers
47
74
  - Fully functional offline — no backend required
48
75
  - Search, browse, trending — all work with bundled data
76
+ - Sort by stars/installs/name with `--sort`, render tables with `--table`, paginate with `--page` / `--per-page`
49
77
 
50
78
  ### Config-Aware Installs
51
79
  - `agora install mcp-github --write` installs the npm package **and** writes to config
@@ -53,21 +81,46 @@ It also bundles **36+ MCP servers**, **10 production workflows**, **6 tutorials*
53
81
  - Merge MCP servers into existing config
54
82
  - Inspect config health with `agora config doctor`
55
83
 
56
- ### Community
57
- - Discussion threads on tools and patterns
58
- - Trending prompts and workflows
59
- - Browse and create discussions from the terminal
84
+ ### `agora mcp` — Marketplace as an MCP Server
85
+ - Exposes all marketplace tools (search, browse, trending, install) as standard MCP tools
86
+ - Add to `opencode.json` for conversational queries: "find a postgres MCP server"
87
+ - Also usable from any MCP client — Claude Desktop, Cursor, etc.
88
+ - Register with `agora init --mcp` to auto-add to your OpenCode config
89
+
90
+ ### `agora chat` — Free AI + TUI
91
+ - **TUI mode** (`agora chat`): Launches the full `opencode` TUI with your chosen model.
92
+ Zero per-message latency, conversation history, editing, and `/agora` commands.
93
+ - **One-shot mode** (`agora chat "question"`): Single query via `opencode run`,
94
+ streams the response, persists session for `--continue`.
95
+ - **Plugin tool** (`/agora chat "question"`): Chat from inside OpenCode using the
96
+ `agora_chat` plugin tool — no separate API key needed.
97
+
98
+ ### Community (CLI + backend)
99
+ - Profiles, reviews, discussions, and publishing live in the `agora` CLI
100
+ - These need a connected backend — the bundled offline build does not ship community data
101
+ - The OpenCode plugin deliberately ships only the offline-capable marketplace tools
60
102
 
61
103
  ### OpenCode Plugin
62
- - Search, browse, install-preview, review, profile, discussion, and tutorial tools from inside OpenCode
63
- - Uses the same marketplace core as the CLI
104
+ - Search, browse, trending, install-preview, and tutorial tools from inside OpenCode
105
+ - Uses the same marketplace core as the CLI — fully offline, no login required
64
106
 
65
107
  ### Local Hub
66
108
  - Optional browser console for browsing the marketplace
67
109
  - Runs locally with `bun run hub:dev`
68
110
 
69
111
  ### Learn
70
- - 6 interactive tutorials on MCP, OpenCode agents, security auditing, and more
112
+ - 12 interactive tutorials on MCP, auth, catalog-contrib, backend deploy, and more
113
+
114
+ ### Phase 1.5: "Destination" — substantially shipped
115
+
116
+ The three pillars are now built into the CLI. See [`ROADMAP.md`](./ROADMAP.md) for remaining items (backend deploy, demo recording):
117
+
118
+ - **`agora news`** — curated tech news feed (HN, Reddit, GitHub Trending, arXiv, RSS) with scoring, caching, category tabs (All/Mcp/Tools/Skills/Llms/Repos/Market/Search), detail view, and AI-powered article summarization via `opencode run`. TUI reader with scrollable preview.
119
+ - **`agora community` / `agora thread` / `agora post` / `agora reply` / `agora vote` / `agora flag`** — Reddit-style community hub with boards, threaded replies, votes, and flag-don't-delete moderation. CLI commands exist; needs a deployed backend.
120
+ - **`agora similar <id>` / `agora compare <id1> <id2>`** — discovery polish: Jaccard similarity and side-by-side comparison tables. Both shipped.
121
+ - **`agora preferences` / `agora history`** — local persistence for settings, search history, and chat history (no account required).
122
+ - **Full-screen TUI** — 5 pages (Home, Marketplace, Community, News, Settings) with alt-screen frame, key dispatch, scrollbar, status toasts, help panel, and `agora tui` entrypoint.
123
+ - **`/menu` command builder** — interactive wizard that walks through positional args, flags, and value flags, then opens a pre-filled readline prompt for editing.
71
124
 
72
125
  ## Quick Start
73
126
 
@@ -124,9 +177,14 @@ agora use wf-security-audit
124
177
  # Search and browse
125
178
  agora search filesystem
126
179
  agora search database --category mcp
180
+ agora search mcp --sort stars # sort by stars
181
+ agora search mcp --sort name --order asc # alphabetical
182
+ agora search mcp --table # box-drawn table
183
+ agora search mcp --per-page 5 --page 2 # paginated
127
184
  AGORA_API_URL=https://agora.example.com agora search github --api
128
185
  agora browse mcp-postgres
129
186
  agora trending
187
+ agora trending --table
130
188
 
131
189
  # Install MCP servers
132
190
  agora install mcp-github # preview only
@@ -145,6 +203,36 @@ agora workflows
145
203
  agora workflows security
146
204
  ```
147
205
 
206
+ ### News
207
+
208
+ ```bash
209
+ agora news # ranked feed, top stories
210
+ agora news --source hn # filter by source
211
+ agora news --limit 30
212
+ agora news --json # JSON output
213
+ ```
214
+
215
+ In the TUI (agora tui → News page): category tabs, detail view, AI summarization, scrollable preview.
216
+
217
+ ### Discovery
218
+
219
+ ```bash
220
+ agora similar mcp-postgres # Jaccard-similar items
221
+ agora compare mcp-postgres mcp-supabase # side-by-side comparison table
222
+ ```
223
+
224
+ ### Preferences & History
225
+
226
+ ```bash
227
+ agora preferences # view local preferences
228
+ agora preferences theme light # set theme (dark|light|auto)
229
+ agora preferences verbosity quiet # set verbosity
230
+ agora preferences username "Jane" # set local display name
231
+ agora history # view recent searches & chats
232
+ agora history --limit 10
233
+ agora history --clear # erase all history
234
+ ```
235
+
148
236
  ### Community & Auth
149
237
 
150
238
  ```bash
@@ -159,6 +247,38 @@ agora reviews mcp-github --api
159
247
  agora profile alice
160
248
  ```
161
249
 
250
+ ### MCP Server & AI Chat
251
+
252
+ ```bash
253
+ # Run the MCP server (add to opencode.json MCP config)
254
+ agora mcp
255
+
256
+ # Auto-register the MCP server in your OpenCode config
257
+ agora init --mcp
258
+
259
+ # Free AI chat — TUI mode (persistent REPL, zero per-message latency)
260
+ agora chat
261
+
262
+ # Free AI chat — one-shot mode (scriptable)
263
+ agora chat "what MCP servers are available for postgres?"
264
+ agora chat -m deepseek-v4-flash-free "find me a web search MCP server"
265
+
266
+ # Continue the last conversation
267
+ agora chat --continue "follow up question"
268
+ ```
269
+
270
+ Add to `opencode.json`:
271
+ ```json
272
+ {
273
+ "mcp": {
274
+ "agora": {
275
+ "type": "local",
276
+ "command": ["agora", "mcp"]
277
+ }
278
+ }
279
+ }
280
+ ```
281
+
162
282
  ### Diagnostics
163
283
 
164
284
  ```bash
@@ -170,24 +290,29 @@ agora config doctor --json
170
290
 
171
291
  Saved items and optional auth credentials are stored in `~/.config/agora/state.json` by default. Use `AGORA_HOME=/path/to/agora` or `--data-dir /path/to/agora` to override.
172
292
 
173
- The CLI uses bundled offline marketplace data (36+ MCP servers, 10 workflows) by default. Add `--api`, `--live`, `AGORA_USE_API=true`, or `AGORA_API_URL` to use the live backend. Falls back to offline data if the API is unavailable.
293
+ The CLI uses bundled offline marketplace data (60+ MCP servers, 12 workflows) by default. Add `--api`, `--live`, `AGORA_USE_API=true`, or `AGORA_API_URL` to use the live backend. Falls back to offline data if the API is unavailable.
174
294
 
175
295
  ### OpenCode Plugin Commands
176
296
 
177
- Once registered (via `agora init` or manually), use inside OpenCode:
297
+ The plugin itself registers **tools** (`agora_search`, `agora_browse`, `agora_install`, ) that the OpenCode assistant calls — OpenCode plugins cannot register slash commands directly.
298
+
299
+ To get a typed `/agora` slash command, `agora init` also writes `.opencode/command/agora.md` into your project. That command forwards whatever you type to the matching tool, so these all work inside OpenCode:
178
300
 
179
301
  | Command | Description |
180
302
  |---|---|
181
303
  | `/agora search <query> [category]` | Search marketplace |
182
- | `/agora browse_category <category>` | Browse by category |
183
- | `/agora browse <id>` | View package details |
304
+ | `/agora browse <id>` | View package or workflow details |
305
+ | `/agora browse_category <category>` | Browse a category |
184
306
  | `/agora trending [type]` | See trending |
185
- | `/agora install <id> [--write]` | Install to config |
186
- | `/agora review [action] [...]` | Reviews/ratings |
187
- | `/agora discussions [action] [...]` | Community |
188
- | `/agora profile [action] [--username]` | User profiles |
189
- | `/agora tutorial [id] [step]` | Interactive tutorials |
190
- | `/agora info` | Help |
307
+ | `/agora install <id>` | Install steps / config for a package |
308
+ | `/agora tutorial <id> [step]` | Interactive tutorials |
309
+ | `/agora chat <message>` | Free AI chat via opencode run |
310
+ | `/agora info` | Plugin help |
311
+ | `/agora mcp` | Run MCP server (CLI only) |
312
+
313
+ Community features — profiles, reviews, discussions, publishing — are **CLI-only** (`agora profile`, `agora reviews`, `agora discuss`, `agora publish`) and need a connected backend. The plugin deliberately ships only the offline-capable marketplace tools.
314
+
315
+ If you didn't run `agora init`, copy `.opencode/command/agora.md` from this repo into your project's (or `~/.config/opencode/command/agora.md` for a global command). Without the command file the `agora_*` tools still work — just ask the assistant in chat.
191
316
 
192
317
  **Categories:** mcp, prompt, workflow, skill `|` **Data sources:** offline (default), `--api`
193
318
 
@@ -235,9 +360,9 @@ agora/
235
360
  ├── src/ # CLI, plugin, and shared marketplace core
236
361
  ├── backend/ # Cloudflare Workers API
237
362
  ├── hub/ # Optional local web Hub
238
- ├── test/ # Tests
363
+ ├── test/ # Tests (~500, 20 files)
239
364
  ├── dist/ # Built output
240
- └── README.md
365
+ └── docs/ # Architecture, roadmap, design docs
241
366
  ```
242
367
 
243
368
  ## Architecture
@@ -245,48 +370,88 @@ agora/
245
370
  ```
246
371
  agora/
247
372
  ├── src/
248
- │ ├── cli.ts # CLI entrypoint
249
- │ ├── cli/app.ts # CLI command parser and handlers
250
- │ ├── init.ts # Project scanner + init plan generator
251
- │ ├── live.ts # Live API source with offline fallback
252
- │ ├── marketplace.ts # Shared search, browse, trending, install-plan core
253
- │ ├── config-files.ts # OpenCode config detection, doctor, and write helpers
254
- │ ├── state.ts # Local Agora saved-item state
255
- │ ├── index.ts # OpenCode plugin
256
- │ ├── api.ts # API client with fallback
257
- │ ├── format.ts # Output formatting
258
- │ ├── config.ts # MCP config generation
259
- │ ├── data.ts # 36+ MCP servers, 10 workflows, 6 tutorials
260
- └── types.ts # TypeScript types
373
+ │ ├── cli.ts # CLI entrypoint
374
+ │ ├── cli/app.ts # CLI command parser (~30+ handlers)
375
+ │ ├── cli/shell.ts # Interactive shell (agora in TTY)
376
+ │ ├── cli/prompter.ts # Raw-mode line editor with auto-complete
377
+ │ ├── cli/completions.ts # Completion providers (slash, path, marketplace ids)
378
+ │ ├── cli/tui.ts # Full-screen TUI frame renderer + key dispatch
379
+ │ ├── cli/mcp-server.ts # MCP server (agora mcp)
380
+ │ ├── cli/menu.ts # Interactive command builder wizard
381
+ │ ├── cli/commands-meta.ts # Command metadata for help + menu
382
+ │ ├── cli/chat-renderer.ts # Chat response formatting
383
+ │ ├── cli/pages/ # TUI page implementations (5 pages)
384
+ ├── types.ts # Page / KeyEvent / PageAction / PageContext contract
385
+ │ ├── helpers.ts # Shared TUI helpers (frame, scrollbar, sep, etc.)
386
+ │ │ ├── home.ts # Home dashboard
387
+ │ │ ├── marketplace.ts# Package list + drill-in
388
+ │ │ ├── community.ts # Community boards → threads
389
+ │ │ ├── news.ts # Ranked news feed + TUI reader + AI summarization
390
+ │ │ └── settings.ts # Settings form
391
+ │ ├── news/ # News feed core
392
+ │ │ ├── types.ts # NewsItem, ScoredNewsItem, NewsConfig
393
+ │ │ ├── score.ts # scoreItem, rankItems
394
+ │ │ ├── cache.ts # readCache, writeCache, isStale, readNewsMeta
395
+ │ │ └── sources/ # Source adapters (hn, reddit, github-trending, arxiv)
396
+ │ ├── community/ # Community hub core
397
+ │ │ ├── types.ts # Thread, Reply, Vote, Flag, Board
398
+ │ │ └── client.ts # Community API source helpers
399
+ │ ├── init.ts # Project scanner + init plan generator
400
+ │ ├── live.ts # Live API source with offline fallback
401
+ │ ├── marketplace.ts # Shared search, sort, browse, trending, install-plan core
402
+ │ ├── config-files.ts # OpenCode config detection, doctor, and write helpers
403
+ │ ├── settings.ts # Settings persistence (toml)
404
+ │ ├── preferences.ts # Local preferences (theme, verbosity, username, etc.)
405
+ │ ├── history.ts # Search + chat history (JSONL append log)
406
+ │ ├── transcript.ts # Per-cwd chat transcripts
407
+ │ ├── state.ts # Local Agora saved-item state + auth
408
+ │ ├── index.ts # OpenCode plugin
409
+ │ ├── ui.ts # Terminal styling: styler, gradient banner, header frame
410
+ │ ├── format.ts # Count formatting helpers
411
+ │ ├── config.ts # MCP config generation
412
+ │ ├── data.ts # 60+ MCP servers, 12 workflows, 12 tutorials, 7 prompts
413
+ │ ├── commands.ts # OpenCode /agora slash command installer
414
+ │ └── types.ts # Shared TypeScript types
261
415
 
262
- ├── backend/ # Cloudflare Workers API
263
- │ ├── src/index.ts # Hono server + routes
264
- │ ├── schema.sql # D1 database schema
265
- │ └── services/ # npm + GitHub API clients
416
+ ├── backend/ # Cloudflare Workers API
417
+ │ ├── src/index.ts # Hono server + routes
418
+ │ ├── schema.sql # D1 database schema (including community tables)
419
+ │ └── services/ # npm + GitHub API clients
420
+
421
+ ├── hub/ # Local Hub app
266
422
 
267
- ├── hub/ # Local Hub app
423
+ ├── test/ # ~500 tests across 20 files
424
+ │ ├── cli.test.ts # CLI integration tests
425
+ │ ├── news.test.ts # News scoring, cache, sources
426
+ │ ├── history.test.ts # History persistence tests
427
+ │ ├── preferences.test.ts # Preferences persistence tests
428
+ │ └── ...
268
429
 
269
- ├── test/ # Unit and CLI tests
270
- └── dist/ # Built output
430
+ └── docs/ # Architecture, roadmap, design docs
271
431
  ```
272
432
 
273
433
  ## Project Status
274
434
 
275
435
  | Component | Status | Notes |
276
436
  |-----------|--------|-------|
277
- | `agora init` | **New** | Project scanning, config generation, auto-install, plugin registration |
278
- | `agora use` | **New** | Apply workflows as OpenCode skills in one command |
279
- | `agora install --write` | **Improved** | Now auto-installs npm packages |
280
- | CLI | Ready | 20 commands: `init`, `use`, `search`, `browse`, `trending`, `workflows`, `tutorials`, `tutorial`, `discussions`, `discuss`, `install`, `save`, `saved`, `remove`, `auth`, `publish`, `review`, `reviews`, `profile`, `config doctor` |
281
- | Offline data | **Expanded** | 36 MCP servers, 10 workflows, 7 discussions, 6 tutorials |
437
+ | Interactive shell (`agora`) | Ready | Persistent REPL with bash/chat dispatch, auto-complete, per-cwd transcripts |
438
+ | `agora init` | Ready | Project scanning, config generation, auto-install, plugin registration |
439
+ | `agora use` | Ready | Apply workflows as OpenCode skills in one command |
440
+ | `agora install --write` | Ready | Auto-installs npm packages and writes config |
441
+ | `agora mcp` | Ready | Marketplace exposed as a Model Context Protocol server |
442
+ | `agora chat` | Ready | TUI + one-shot inference via `opencode run` |
443
+ | CLI | Ready | 25 commands: `init`, `use`, `mcp`, `chat`, `menu`, `search`, `browse`, `trending`, `workflows`, `tutorials`, `tutorial`, `discussions`, `discuss`, `install`, `save`, `saved`, `remove`, `login`, `logout`, `whoami`, `auth`, `publish`, `review`, `reviews`, `profile`, `config doctor` |
444
+ | Offline data | Ready | 61 MCP servers, 12 workflows, 12 tutorials, 6 prompts (npm-validated) |
282
445
  | Live API mode | Ready | Opt-in via `--api`, `AGORA_API_URL`; falls back offline |
283
446
  | Shared core | Ready | CLI and plugin share marketplace logic |
284
447
  | Local state | Ready | Saved items and auth tokens under `~/.config/agora` |
285
448
  | Plugin (offline) | Ready | Works with bundled data |
286
- | Backend | 🚧 Not deployed — self-host required (see backend/) | Cloudflare Workers + D1 ready for deployment |
449
+ | Backend | 🚧 Not deployed — self-host required (see backend/) | Cloudflare Workers + D1 ready for deployment; auth rework blocks public deploy |
287
450
  | Local Hub | Ready | Static web app served by Bun |
288
451
  | CI | Ready | Typecheck + tests on push/PR |
289
- | Publish CI | **New** | Auto-publish to npm on release |
452
+ | Publish CI | Ready | Auto-publish to npm on release |
453
+ | News feed (`agora news`) | 🚧 Phase 1.5 — designed, not built | HN + Reddit + GitHub trending + arXiv, TUI reader |
454
+ | Community hub (`agora community`) | 🚧 Phase 1.5 — designed, not built | Boards, threads, votes, flag-don't-delete, LLM participants |
290
455
 
291
456
  ## Testing
292
457
 
package/dist/cli/app.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { type MarketplaceItem } from '../marketplace.js';
2
2
  import { type FetchLike } from '../live.js';
3
+ export declare const AGORA_VERSION: string;
3
4
  type OutputStream = {
4
5
  write(chunk: string): unknown;
5
6
  };
@@ -17,6 +18,8 @@ export interface ParsedArgs {
17
18
  }
18
19
  export declare function runCli(argv: string[], io: CliIo): Promise<number>;
19
20
  export declare function parseArgs(argv: string[]): ParsedArgs;
21
+ export declare const FREE_MODELS: string[];
22
+ export declare function commandManual(name: string): string;
20
23
  export declare function listKnownItems(): MarketplaceItem[];
21
24
  export {};
22
25
  //# sourceMappingURL=app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/cli/app.ts"],"names":[],"mappings":"AAUA,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAeL,KAAK,SAAS,EAGf,MAAM,YAAY,CAAC;AAqBpB,KAAK,YAAY,GAAG;IAClB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAC;AAEF,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,YAAY,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;CACzC;AAaD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAmEvE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAsDpD;AAwwCD,wBAAgB,cAAc,IAAI,eAAe,EAAE,CAElD"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/cli/app.ts"],"names":[],"mappings":"AAeA,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAa3B,OAAO,EAeL,KAAK,SAAS,EAGf,MAAM,YAAY,CAAC;AA8BpB,eAAO,MAAM,aAAa,QAAc,CAAC;AAOzC,KAAK,YAAY,GAAG;IAClB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAC;AAEF,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,YAAY,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;CACzC;AA+BD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAuIvE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAsDpD;AAgwBD,eAAO,MAAM,WAAW,UAA2E,CAAC;AAikCpG,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIlD;AAgVD,wBAAgB,cAAc,IAAI,eAAe,EAAE,CAElD"}