byterover-cli 0.1.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 (193) hide show
  1. package/README.md +781 -0
  2. package/bin/dev.cmd +4 -0
  3. package/bin/dev.js +7 -0
  4. package/bin/run.cmd +4 -0
  5. package/bin/run.js +7 -0
  6. package/dist/commands/add.d.ts +60 -0
  7. package/dist/commands/add.js +230 -0
  8. package/dist/commands/clear.d.ts +13 -0
  9. package/dist/commands/clear.js +57 -0
  10. package/dist/commands/complete.d.ts +108 -0
  11. package/dist/commands/complete.js +340 -0
  12. package/dist/commands/gen-rules.d.ts +26 -0
  13. package/dist/commands/gen-rules.js +89 -0
  14. package/dist/commands/init.d.ts +24 -0
  15. package/dist/commands/init.js +135 -0
  16. package/dist/commands/login.d.ts +22 -0
  17. package/dist/commands/login.js +103 -0
  18. package/dist/commands/push.d.ts +33 -0
  19. package/dist/commands/push.js +150 -0
  20. package/dist/commands/retrieve.d.ts +26 -0
  21. package/dist/commands/retrieve.js +101 -0
  22. package/dist/commands/space/list.d.ts +22 -0
  23. package/dist/commands/space/list.js +105 -0
  24. package/dist/commands/space/switch.d.ts +20 -0
  25. package/dist/commands/space/switch.js +110 -0
  26. package/dist/commands/status.d.ts +22 -0
  27. package/dist/commands/status.js +116 -0
  28. package/dist/config/auth.config.d.ts +32 -0
  29. package/dist/config/auth.config.js +35 -0
  30. package/dist/config/environment.d.ts +35 -0
  31. package/dist/config/environment.js +39 -0
  32. package/dist/constants.d.ts +11 -0
  33. package/dist/constants.js +12 -0
  34. package/dist/core/domain/entities/agent.d.ts +5 -0
  35. package/dist/core/domain/entities/agent.js +23 -0
  36. package/dist/core/domain/entities/auth-token.d.ts +43 -0
  37. package/dist/core/domain/entities/auth-token.js +70 -0
  38. package/dist/core/domain/entities/br-config.d.ts +25 -0
  39. package/dist/core/domain/entities/br-config.js +58 -0
  40. package/dist/core/domain/entities/bullet.d.ts +51 -0
  41. package/dist/core/domain/entities/bullet.js +94 -0
  42. package/dist/core/domain/entities/curator-output.d.ts +14 -0
  43. package/dist/core/domain/entities/curator-output.js +23 -0
  44. package/dist/core/domain/entities/delta-batch.d.ts +30 -0
  45. package/dist/core/domain/entities/delta-batch.js +52 -0
  46. package/dist/core/domain/entities/delta-operation.d.ts +31 -0
  47. package/dist/core/domain/entities/delta-operation.js +50 -0
  48. package/dist/core/domain/entities/event.d.ts +8 -0
  49. package/dist/core/domain/entities/event.js +15 -0
  50. package/dist/core/domain/entities/executor-output.d.ts +27 -0
  51. package/dist/core/domain/entities/executor-output.js +33 -0
  52. package/dist/core/domain/entities/memory.d.ts +55 -0
  53. package/dist/core/domain/entities/memory.js +90 -0
  54. package/dist/core/domain/entities/oauth-token-data.d.ts +13 -0
  55. package/dist/core/domain/entities/oauth-token-data.js +20 -0
  56. package/dist/core/domain/entities/playbook.d.ts +97 -0
  57. package/dist/core/domain/entities/playbook.js +275 -0
  58. package/dist/core/domain/entities/presigned-url.d.ts +9 -0
  59. package/dist/core/domain/entities/presigned-url.js +18 -0
  60. package/dist/core/domain/entities/presigned-urls-response.d.ts +10 -0
  61. package/dist/core/domain/entities/presigned-urls-response.js +18 -0
  62. package/dist/core/domain/entities/reflector-output.d.ts +38 -0
  63. package/dist/core/domain/entities/reflector-output.js +44 -0
  64. package/dist/core/domain/entities/retrieve-result.d.ts +35 -0
  65. package/dist/core/domain/entities/retrieve-result.js +35 -0
  66. package/dist/core/domain/entities/space.d.ts +24 -0
  67. package/dist/core/domain/entities/space.js +52 -0
  68. package/dist/core/domain/entities/team.d.ts +42 -0
  69. package/dist/core/domain/entities/team.js +89 -0
  70. package/dist/core/domain/entities/user.d.ts +20 -0
  71. package/dist/core/domain/entities/user.js +32 -0
  72. package/dist/core/domain/errors/ace-error.d.ts +34 -0
  73. package/dist/core/domain/errors/ace-error.js +53 -0
  74. package/dist/core/domain/errors/auth-error.d.ts +10 -0
  75. package/dist/core/domain/errors/auth-error.js +20 -0
  76. package/dist/core/domain/errors/discovery-error.d.ts +21 -0
  77. package/dist/core/domain/errors/discovery-error.js +33 -0
  78. package/dist/core/domain/errors/rule-error.d.ts +6 -0
  79. package/dist/core/domain/errors/rule-error.js +12 -0
  80. package/dist/core/interfaces/i-ace-prompt-builder.d.ts +48 -0
  81. package/dist/core/interfaces/i-ace-prompt-builder.js +1 -0
  82. package/dist/core/interfaces/i-auth-service.d.ts +35 -0
  83. package/dist/core/interfaces/i-auth-service.js +1 -0
  84. package/dist/core/interfaces/i-browser-launcher.d.ts +11 -0
  85. package/dist/core/interfaces/i-browser-launcher.js +1 -0
  86. package/dist/core/interfaces/i-bullet-content-store.d.ts +36 -0
  87. package/dist/core/interfaces/i-bullet-content-store.js +1 -0
  88. package/dist/core/interfaces/i-callback-handler.d.ts +35 -0
  89. package/dist/core/interfaces/i-callback-handler.js +1 -0
  90. package/dist/core/interfaces/i-delta-store.d.ts +15 -0
  91. package/dist/core/interfaces/i-delta-store.js +1 -0
  92. package/dist/core/interfaces/i-executor-output-store.d.ts +14 -0
  93. package/dist/core/interfaces/i-executor-output-store.js +1 -0
  94. package/dist/core/interfaces/i-file-service.d.ts +34 -0
  95. package/dist/core/interfaces/i-file-service.js +1 -0
  96. package/dist/core/interfaces/i-http-client.d.ts +33 -0
  97. package/dist/core/interfaces/i-http-client.js +1 -0
  98. package/dist/core/interfaces/i-memory-retrieval-service.d.ts +40 -0
  99. package/dist/core/interfaces/i-memory-retrieval-service.js +1 -0
  100. package/dist/core/interfaces/i-memory-storage-service.d.ts +55 -0
  101. package/dist/core/interfaces/i-memory-storage-service.js +1 -0
  102. package/dist/core/interfaces/i-oidc-discovery-service.d.ts +20 -0
  103. package/dist/core/interfaces/i-oidc-discovery-service.js +1 -0
  104. package/dist/core/interfaces/i-playbook-service.d.ts +69 -0
  105. package/dist/core/interfaces/i-playbook-service.js +1 -0
  106. package/dist/core/interfaces/i-playbook-store.d.ts +38 -0
  107. package/dist/core/interfaces/i-playbook-store.js +1 -0
  108. package/dist/core/interfaces/i-project-config-store.d.ts +26 -0
  109. package/dist/core/interfaces/i-project-config-store.js +1 -0
  110. package/dist/core/interfaces/i-reflection-store.d.ts +21 -0
  111. package/dist/core/interfaces/i-reflection-store.js +1 -0
  112. package/dist/core/interfaces/i-rule-template-service.d.ts +17 -0
  113. package/dist/core/interfaces/i-rule-template-service.js +4 -0
  114. package/dist/core/interfaces/i-rule-writer-service.d.ts +13 -0
  115. package/dist/core/interfaces/i-rule-writer-service.js +1 -0
  116. package/dist/core/interfaces/i-space-service.d.ts +28 -0
  117. package/dist/core/interfaces/i-space-service.js +1 -0
  118. package/dist/core/interfaces/i-team-service.d.ts +29 -0
  119. package/dist/core/interfaces/i-team-service.js +1 -0
  120. package/dist/core/interfaces/i-template-loader.d.ts +29 -0
  121. package/dist/core/interfaces/i-template-loader.js +1 -0
  122. package/dist/core/interfaces/i-token-store.d.ts +22 -0
  123. package/dist/core/interfaces/i-token-store.js +1 -0
  124. package/dist/core/interfaces/i-tracking-service.d.ts +21 -0
  125. package/dist/core/interfaces/i-tracking-service.js +1 -0
  126. package/dist/core/interfaces/i-user-service.d.ts +14 -0
  127. package/dist/core/interfaces/i-user-service.js +1 -0
  128. package/dist/index.d.ts +1 -0
  129. package/dist/index.js +1 -0
  130. package/dist/infra/ace/ace-file-utils.d.ts +46 -0
  131. package/dist/infra/ace/ace-file-utils.js +83 -0
  132. package/dist/infra/ace/ace-prompt-templates.d.ts +13 -0
  133. package/dist/infra/ace/ace-prompt-templates.js +177 -0
  134. package/dist/infra/ace/file-bullet-content-store.d.ts +27 -0
  135. package/dist/infra/ace/file-bullet-content-store.js +89 -0
  136. package/dist/infra/ace/file-delta-store.d.ts +9 -0
  137. package/dist/infra/ace/file-delta-store.js +26 -0
  138. package/dist/infra/ace/file-executor-output-store.d.ts +9 -0
  139. package/dist/infra/ace/file-executor-output-store.js +26 -0
  140. package/dist/infra/ace/file-playbook-store.d.ts +29 -0
  141. package/dist/infra/ace/file-playbook-store.js +107 -0
  142. package/dist/infra/ace/file-reflection-store.d.ts +10 -0
  143. package/dist/infra/ace/file-reflection-store.js +55 -0
  144. package/dist/infra/auth/oauth-service.d.ts +49 -0
  145. package/dist/infra/auth/oauth-service.js +126 -0
  146. package/dist/infra/auth/oidc-discovery-service.d.ts +51 -0
  147. package/dist/infra/auth/oidc-discovery-service.js +145 -0
  148. package/dist/infra/browser/system-browser-launcher.d.ts +10 -0
  149. package/dist/infra/browser/system-browser-launcher.js +18 -0
  150. package/dist/infra/config/file-config-store.d.ts +21 -0
  151. package/dist/infra/config/file-config-store.js +57 -0
  152. package/dist/infra/file/fs-file-service.d.ts +28 -0
  153. package/dist/infra/file/fs-file-service.js +57 -0
  154. package/dist/infra/http/authenticated-http-client.d.ts +46 -0
  155. package/dist/infra/http/authenticated-http-client.js +99 -0
  156. package/dist/infra/http/callback-handler.d.ts +13 -0
  157. package/dist/infra/http/callback-handler.js +24 -0
  158. package/dist/infra/http/callback-server.d.ts +18 -0
  159. package/dist/infra/http/callback-server.js +93 -0
  160. package/dist/infra/memory/http-memory-retrieval-service.d.ts +18 -0
  161. package/dist/infra/memory/http-memory-retrieval-service.js +63 -0
  162. package/dist/infra/memory/http-memory-storage-service.d.ts +18 -0
  163. package/dist/infra/memory/http-memory-storage-service.js +67 -0
  164. package/dist/infra/memory/memory-to-playbook-mapper.d.ts +33 -0
  165. package/dist/infra/memory/memory-to-playbook-mapper.js +51 -0
  166. package/dist/infra/playbook/file-playbook-service.d.ts +43 -0
  167. package/dist/infra/playbook/file-playbook-service.js +133 -0
  168. package/dist/infra/rule/agent-rule-config.d.ts +19 -0
  169. package/dist/infra/rule/agent-rule-config.js +77 -0
  170. package/dist/infra/rule/rule-template-service.d.ts +18 -0
  171. package/dist/infra/rule/rule-template-service.js +80 -0
  172. package/dist/infra/rule/rule-writer-service.d.ts +19 -0
  173. package/dist/infra/rule/rule-writer-service.js +43 -0
  174. package/dist/infra/space/http-space-service.d.ts +20 -0
  175. package/dist/infra/space/http-space-service.js +67 -0
  176. package/dist/infra/storage/keychain-token-store.d.ts +10 -0
  177. package/dist/infra/storage/keychain-token-store.js +40 -0
  178. package/dist/infra/team/http-team-service.d.ts +21 -0
  179. package/dist/infra/team/http-team-service.js +71 -0
  180. package/dist/infra/template/fs-template-loader.d.ts +33 -0
  181. package/dist/infra/template/fs-template-loader.js +62 -0
  182. package/dist/infra/tracking/mixpanel-tracking-service.d.ts +14 -0
  183. package/dist/infra/tracking/mixpanel-tracking-service.js +44 -0
  184. package/dist/infra/user/http-user-service.d.ts +12 -0
  185. package/dist/infra/user/http-user-service.js +26 -0
  186. package/dist/templates/README.md +103 -0
  187. package/dist/templates/base.md +3 -0
  188. package/dist/templates/sections/command-reference.md +141 -0
  189. package/dist/templates/sections/workflow.md +46 -0
  190. package/dist/utils/file-helpers.d.ts +15 -0
  191. package/dist/utils/file-helpers.js +45 -0
  192. package/oclif.manifest.json +476 -0
  193. package/package.json +82 -0
@@ -0,0 +1,476 @@
1
+ {
2
+ "commands": {
3
+ "add": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "Add or update a bullet in the playbook (bypasses ACE workflow for direct agent usage)",
7
+ "examples": [
8
+ "<%= config.bin %> <%= command.id %> --interactive",
9
+ "<%= config.bin %> <%= command.id %> -i",
10
+ "<%= config.bin %> <%= command.id %> --section \"Common Errors\" --content \"Authentication fails when token expires\"",
11
+ "<%= config.bin %> <%= command.id %> --section \"Common Errors\" --bullet-id \"common-00001\" --content \"Updated: Auth fails when token expires\"",
12
+ "<%= config.bin %> <%= command.id %> -s \"Best Practices\" -c \"Always validate user input before processing\""
13
+ ],
14
+ "flags": {
15
+ "bullet-id": {
16
+ "char": "b",
17
+ "description": "Bullet ID to update (if not provided, a new bullet will be created)",
18
+ "name": "bullet-id",
19
+ "required": false,
20
+ "hasDynamicHelp": false,
21
+ "multiple": false,
22
+ "type": "option"
23
+ },
24
+ "content": {
25
+ "char": "c",
26
+ "description": "Content of the bullet",
27
+ "name": "content",
28
+ "required": false,
29
+ "hasDynamicHelp": false,
30
+ "multiple": false,
31
+ "type": "option"
32
+ },
33
+ "interactive": {
34
+ "char": "i",
35
+ "description": "Run in interactive mode",
36
+ "name": "interactive",
37
+ "allowNo": false,
38
+ "type": "boolean"
39
+ },
40
+ "section": {
41
+ "char": "s",
42
+ "description": "Section name for the bullet",
43
+ "name": "section",
44
+ "required": false,
45
+ "hasDynamicHelp": false,
46
+ "multiple": false,
47
+ "type": "option"
48
+ }
49
+ },
50
+ "hasDynamicHelp": false,
51
+ "hiddenAliases": [],
52
+ "id": "add",
53
+ "pluginAlias": "byterover-cli",
54
+ "pluginName": "byterover-cli",
55
+ "pluginType": "core",
56
+ "strict": true,
57
+ "enableJsonFlag": false,
58
+ "isESM": true,
59
+ "relativePath": [
60
+ "dist",
61
+ "commands",
62
+ "add.js"
63
+ ]
64
+ },
65
+ "clear": {
66
+ "aliases": [],
67
+ "args": {
68
+ "directory": {
69
+ "description": "Project directory (defaults to current directory)",
70
+ "name": "directory",
71
+ "required": false
72
+ }
73
+ },
74
+ "description": "Clear local ACE context (playbook) managed by ByteRover CLI",
75
+ "examples": [
76
+ "<%= config.bin %> <%= command.id %>",
77
+ "<%= config.bin %> <%= command.id %> --yes",
78
+ "<%= config.bin %> <%= command.id %> /path/to/project"
79
+ ],
80
+ "flags": {
81
+ "yes": {
82
+ "char": "y",
83
+ "description": "Skip confirmation prompt",
84
+ "name": "yes",
85
+ "allowNo": false,
86
+ "type": "boolean"
87
+ }
88
+ },
89
+ "hasDynamicHelp": false,
90
+ "hiddenAliases": [],
91
+ "id": "clear",
92
+ "pluginAlias": "byterover-cli",
93
+ "pluginName": "byterover-cli",
94
+ "pluginType": "core",
95
+ "strict": true,
96
+ "enableJsonFlag": false,
97
+ "isESM": true,
98
+ "relativePath": [
99
+ "dist",
100
+ "commands",
101
+ "clear.js"
102
+ ]
103
+ },
104
+ "complete": {
105
+ "aliases": [],
106
+ "args": {
107
+ "hint": {
108
+ "description": "Short hint for naming output files (e.g., \"user-auth\", \"bug-fix\")",
109
+ "name": "hint",
110
+ "required": true
111
+ },
112
+ "reasoning": {
113
+ "description": "Detailed reasoning and approach for completing the task",
114
+ "name": "reasoning",
115
+ "required": true
116
+ },
117
+ "finalAnswer": {
118
+ "description": "The final answer/solution to the task",
119
+ "name": "finalAnswer",
120
+ "required": true
121
+ }
122
+ },
123
+ "description": "Complete ACE workflow: save executor output, generate reflection, and update playbook in one command",
124
+ "examples": [
125
+ "<%= config.bin %> <%= command.id %> \"user-auth\" \"Implemented OAuth2 flow\" \"Auth works\" --tool-usage \"Read:src/auth.ts,Edit:src/auth.ts,Bash:npm test\" --feedback \"All tests passed\"",
126
+ "<%= config.bin %> <%= command.id %> \"validation-fix\" \"Analyzed validator\" \"Fixed bug\" --tool-usage \"Grep:pattern:\\\"validate\\\",Read:src/validator.ts\" --bullet-ids \"bullet-123\" --feedback \"Tests passed\"",
127
+ "<%= config.bin %> <%= command.id %> \"auth-update\" \"Improved error handling\" \"Better errors\" --tool-usage \"Edit:src/auth.ts\" --feedback \"Tests passed\" --update-bullet \"bullet-5\""
128
+ ],
129
+ "flags": {
130
+ "bullet-ids": {
131
+ "char": "b",
132
+ "description": "Comma-separated list of playbook bullet IDs referenced",
133
+ "name": "bullet-ids",
134
+ "default": "",
135
+ "hasDynamicHelp": false,
136
+ "multiple": false,
137
+ "type": "option"
138
+ },
139
+ "feedback": {
140
+ "char": "f",
141
+ "description": "Environment feedback about task execution (e.g., \"Tests passed\", \"Build failed\")",
142
+ "name": "feedback",
143
+ "required": true,
144
+ "hasDynamicHelp": false,
145
+ "multiple": false,
146
+ "type": "option"
147
+ },
148
+ "tool-usage": {
149
+ "char": "t",
150
+ "description": "Comma-separated list of tool calls with arguments (format: \"ToolName:argument\", e.g., \"Read:src/file.ts,Bash:npm test\")",
151
+ "name": "tool-usage",
152
+ "required": true,
153
+ "hasDynamicHelp": false,
154
+ "multiple": false,
155
+ "type": "option"
156
+ },
157
+ "update-bullet": {
158
+ "char": "u",
159
+ "description": "Bullet ID to update with new knowledge (if not provided, adds new bullet)",
160
+ "name": "update-bullet",
161
+ "hasDynamicHelp": false,
162
+ "multiple": false,
163
+ "type": "option"
164
+ }
165
+ },
166
+ "hasDynamicHelp": false,
167
+ "hiddenAliases": [],
168
+ "id": "complete",
169
+ "pluginAlias": "byterover-cli",
170
+ "pluginName": "byterover-cli",
171
+ "pluginType": "core",
172
+ "strict": true,
173
+ "enableJsonFlag": false,
174
+ "isESM": true,
175
+ "relativePath": [
176
+ "dist",
177
+ "commands",
178
+ "complete.js"
179
+ ]
180
+ },
181
+ "gen-rules": {
182
+ "aliases": [],
183
+ "args": {},
184
+ "description": "Generate rule instructions for coding agents to work with ByteRover correctly",
185
+ "examples": [
186
+ "<%= config.bin %> <%= command.id %>"
187
+ ],
188
+ "flags": {},
189
+ "hasDynamicHelp": false,
190
+ "hiddenAliases": [],
191
+ "id": "gen-rules",
192
+ "pluginAlias": "byterover-cli",
193
+ "pluginName": "byterover-cli",
194
+ "pluginType": "core",
195
+ "strict": true,
196
+ "enableJsonFlag": false,
197
+ "isESM": true,
198
+ "relativePath": [
199
+ "dist",
200
+ "commands",
201
+ "gen-rules.js"
202
+ ]
203
+ },
204
+ "init": {
205
+ "aliases": [],
206
+ "args": {},
207
+ "description": "Initialize a project with ByteRover (creates .br/config.json with team/space selection and initializes ACE playbook)",
208
+ "examples": [
209
+ "<%= config.bin %> <%= command.id %>",
210
+ "# Re-initialize if config exists (will show current config and exit):\n<%= config.bin %> <%= command.id %>",
211
+ "# Full workflow: login then initialize:\n<%= config.bin %> login\n<%= config.bin %> <%= command.id %>"
212
+ ],
213
+ "flags": {},
214
+ "hasDynamicHelp": false,
215
+ "hiddenAliases": [],
216
+ "id": "init",
217
+ "pluginAlias": "byterover-cli",
218
+ "pluginName": "byterover-cli",
219
+ "pluginType": "core",
220
+ "strict": true,
221
+ "enableJsonFlag": false,
222
+ "isESM": true,
223
+ "relativePath": [
224
+ "dist",
225
+ "commands",
226
+ "init.js"
227
+ ]
228
+ },
229
+ "login": {
230
+ "aliases": [],
231
+ "args": {},
232
+ "description": "Authenticate with ByteRover using OAuth 2.0 + PKCE (opens browser for secure login, stores tokens in keychain)",
233
+ "examples": [
234
+ "<%= config.bin %> <%= command.id %>",
235
+ "# After authentication expires, re-login:\n<%= config.bin %> <%= command.id %>",
236
+ "# Check authentication status after login:\n<%= config.bin %> <%= command.id %>\n<%= config.bin %> status"
237
+ ],
238
+ "flags": {},
239
+ "hasDynamicHelp": false,
240
+ "hiddenAliases": [],
241
+ "id": "login",
242
+ "pluginAlias": "byterover-cli",
243
+ "pluginName": "byterover-cli",
244
+ "pluginType": "core",
245
+ "strict": true,
246
+ "enableJsonFlag": false,
247
+ "isESM": true,
248
+ "relativePath": [
249
+ "dist",
250
+ "commands",
251
+ "login.js"
252
+ ]
253
+ },
254
+ "push": {
255
+ "aliases": [],
256
+ "args": {},
257
+ "description": "Push playbook to ByteRover memory storage and clean up local ACE files",
258
+ "examples": [
259
+ "<%= config.bin %> <%= command.id %>",
260
+ "<%= config.bin %> <%= command.id %> --branch develop",
261
+ "<%= config.bin %> <%= command.id %> -b feature-auth"
262
+ ],
263
+ "flags": {
264
+ "branch": {
265
+ "char": "b",
266
+ "description": "ByteRover branch name (not Git branch)",
267
+ "name": "branch",
268
+ "default": "main",
269
+ "hasDynamicHelp": false,
270
+ "multiple": false,
271
+ "type": "option"
272
+ }
273
+ },
274
+ "hasDynamicHelp": false,
275
+ "hiddenAliases": [],
276
+ "id": "push",
277
+ "pluginAlias": "byterover-cli",
278
+ "pluginName": "byterover-cli",
279
+ "pluginType": "core",
280
+ "strict": true,
281
+ "enableJsonFlag": false,
282
+ "isESM": true,
283
+ "relativePath": [
284
+ "dist",
285
+ "commands",
286
+ "push.js"
287
+ ]
288
+ },
289
+ "retrieve": {
290
+ "aliases": [],
291
+ "args": {},
292
+ "description": "Retrieve memories from ByteRover Memora service and output as JSON",
293
+ "examples": [
294
+ "<%= config.bin %> <%= command.id %> --query \"authentication best practices\"",
295
+ "<%= config.bin %> <%= command.id %> -q \"error handling\" -n \"src/auth/login.ts,src/auth/oauth.ts\"",
296
+ "<%= config.bin %> <%= command.id %> -q \"database connection issues\" --compact"
297
+ ],
298
+ "flags": {
299
+ "compact": {
300
+ "description": "Output compact JSON (single line)",
301
+ "name": "compact",
302
+ "required": false,
303
+ "allowNo": false,
304
+ "type": "boolean"
305
+ },
306
+ "node-keys": {
307
+ "char": "n",
308
+ "description": "Comma-separated list of node keys (file paths) to filter results",
309
+ "name": "node-keys",
310
+ "required": false,
311
+ "hasDynamicHelp": false,
312
+ "multiple": false,
313
+ "type": "option"
314
+ },
315
+ "query": {
316
+ "char": "q",
317
+ "description": "Search query string",
318
+ "name": "query",
319
+ "required": true,
320
+ "hasDynamicHelp": false,
321
+ "multiple": false,
322
+ "type": "option"
323
+ }
324
+ },
325
+ "hasDynamicHelp": false,
326
+ "hiddenAliases": [],
327
+ "id": "retrieve",
328
+ "pluginAlias": "byterover-cli",
329
+ "pluginName": "byterover-cli",
330
+ "pluginType": "core",
331
+ "strict": true,
332
+ "enableJsonFlag": false,
333
+ "isESM": true,
334
+ "relativePath": [
335
+ "dist",
336
+ "commands",
337
+ "retrieve.js"
338
+ ]
339
+ },
340
+ "status": {
341
+ "aliases": [],
342
+ "args": {
343
+ "directory": {
344
+ "description": "Project directory (defaults to current directory)",
345
+ "name": "directory",
346
+ "required": false
347
+ }
348
+ },
349
+ "description": "Show CLI status and project information. Display local ACE context (ACE playbook) managed by ByteRover CLI",
350
+ "examples": [
351
+ "<%= config.bin %> <%= command.id %>",
352
+ "# Check status after login:\n<%= config.bin %> login\n<%= config.bin %> <%= command.id %>",
353
+ "# Verify project initialization:\n<%= config.bin %> init\n<%= config.bin %> <%= command.id %>",
354
+ "<%= config.bin %> <%= command.id %>",
355
+ "<%= config.bin %> <%= command.id %> /path/to/project",
356
+ "<%= config.bin %> <%= command.id %> --format json"
357
+ ],
358
+ "flags": {
359
+ "format": {
360
+ "char": "f",
361
+ "description": "Output format",
362
+ "name": "format",
363
+ "default": "table",
364
+ "hasDynamicHelp": false,
365
+ "multiple": false,
366
+ "options": [
367
+ "table",
368
+ "json"
369
+ ],
370
+ "type": "option"
371
+ }
372
+ },
373
+ "hasDynamicHelp": false,
374
+ "hiddenAliases": [],
375
+ "id": "status",
376
+ "pluginAlias": "byterover-cli",
377
+ "pluginName": "byterover-cli",
378
+ "pluginType": "core",
379
+ "strict": true,
380
+ "enableJsonFlag": false,
381
+ "isESM": true,
382
+ "relativePath": [
383
+ "dist",
384
+ "commands",
385
+ "status.js"
386
+ ]
387
+ },
388
+ "space:list": {
389
+ "aliases": [],
390
+ "args": {},
391
+ "description": "List all spaces for the current team (requires project initialization)",
392
+ "examples": [
393
+ "<%= config.bin %> <%= command.id %>",
394
+ "<%= config.bin %> <%= command.id %> --all",
395
+ "<%= config.bin %> <%= command.id %> --limit 10",
396
+ "<%= config.bin %> <%= command.id %> --limit 10 --offset 20",
397
+ "<%= config.bin %> <%= command.id %> --json"
398
+ ],
399
+ "flags": {
400
+ "all": {
401
+ "char": "a",
402
+ "description": "Fetch all spaces (may be slow for large teams)",
403
+ "name": "all",
404
+ "allowNo": false,
405
+ "type": "boolean"
406
+ },
407
+ "json": {
408
+ "char": "j",
409
+ "description": "Output in JSON format",
410
+ "name": "json",
411
+ "allowNo": false,
412
+ "type": "boolean"
413
+ },
414
+ "limit": {
415
+ "char": "l",
416
+ "description": "Maximum number of spaces to fetch",
417
+ "name": "limit",
418
+ "default": 50,
419
+ "hasDynamicHelp": false,
420
+ "multiple": false,
421
+ "type": "option"
422
+ },
423
+ "offset": {
424
+ "char": "o",
425
+ "description": "Number of spaces to skip",
426
+ "name": "offset",
427
+ "default": 0,
428
+ "hasDynamicHelp": false,
429
+ "multiple": false,
430
+ "type": "option"
431
+ }
432
+ },
433
+ "hasDynamicHelp": false,
434
+ "hiddenAliases": [],
435
+ "id": "space:list",
436
+ "pluginAlias": "byterover-cli",
437
+ "pluginName": "byterover-cli",
438
+ "pluginType": "core",
439
+ "strict": true,
440
+ "enableJsonFlag": false,
441
+ "isESM": true,
442
+ "relativePath": [
443
+ "dist",
444
+ "commands",
445
+ "space",
446
+ "list.js"
447
+ ]
448
+ },
449
+ "space:switch": {
450
+ "aliases": [],
451
+ "args": {},
452
+ "description": "Switch to a different team or space (updates .br/config.json)",
453
+ "examples": [
454
+ "<%= config.bin %> <%= command.id %>",
455
+ "# Shows current configuration, then prompts for new team/space selection"
456
+ ],
457
+ "flags": {},
458
+ "hasDynamicHelp": false,
459
+ "hiddenAliases": [],
460
+ "id": "space:switch",
461
+ "pluginAlias": "byterover-cli",
462
+ "pluginName": "byterover-cli",
463
+ "pluginType": "core",
464
+ "strict": true,
465
+ "enableJsonFlag": false,
466
+ "isESM": true,
467
+ "relativePath": [
468
+ "dist",
469
+ "commands",
470
+ "space",
471
+ "switch.js"
472
+ ]
473
+ }
474
+ },
475
+ "version": "0.1.0"
476
+ }
package/package.json ADDED
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "byterover-cli",
3
+ "description": "ByteRover's CLI",
4
+ "version": "0.1.0",
5
+ "author": "ByteRover",
6
+ "bin": {
7
+ "br": "./bin/run.js"
8
+ },
9
+ "bugs": "https://github.com/campfirein/byterover-cli/issues",
10
+ "dependencies": {
11
+ "@inquirer/prompts": "^7.9.0",
12
+ "@oclif/core": "^4",
13
+ "@oclif/plugin-help": "^6",
14
+ "axios": "^1.12.2",
15
+ "chalk": "^5.6.2",
16
+ "express": "^5.1.0",
17
+ "keytar": "^7.9.0",
18
+ "mixpanel": "^0.18.1",
19
+ "open": "^10.2.0"
20
+ },
21
+ "devDependencies": {
22
+ "@eslint/compat": "^1",
23
+ "@oclif/prettier-config": "^0.2.1",
24
+ "@oclif/test": "^4",
25
+ "@types/chai": "^4",
26
+ "@types/express": "^5.0.3",
27
+ "@types/mocha": "^10",
28
+ "@types/node": "^18",
29
+ "@types/sinon": "^17.0.4",
30
+ "chai": "^4",
31
+ "eslint": "^9",
32
+ "eslint-config-oclif": "^6",
33
+ "eslint-config-prettier": "^10",
34
+ "mocha": "^10",
35
+ "nock": "^14.0.10",
36
+ "oclif": "^4",
37
+ "shx": "^0.3.3",
38
+ "sinon": "^21.0.0",
39
+ "ts-node": "^10",
40
+ "typescript": "^5"
41
+ },
42
+ "engines": {
43
+ "node": ">=18.0.0"
44
+ },
45
+ "files": [
46
+ "./bin",
47
+ "./dist",
48
+ "./oclif.manifest.json"
49
+ ],
50
+ "homepage": "https://github.com/campfirein/byterover-cli",
51
+ "keywords": [
52
+ "oclif"
53
+ ],
54
+ "license": "MIT",
55
+ "main": "dist/index.js",
56
+ "type": "module",
57
+ "oclif": {
58
+ "bin": "br",
59
+ "dirname": "br",
60
+ "commands": "./dist/commands",
61
+ "plugins": [
62
+ "@oclif/plugin-help"
63
+ ],
64
+ "topicSeparator": " ",
65
+ "topics": {
66
+ "space": {
67
+ "description": "Manage ByteRover spaces"
68
+ }
69
+ }
70
+ },
71
+ "repository": "campfirein/byterover-cli",
72
+ "scripts": {
73
+ "build": "shx rm -rf dist && tsc -b && shx cp -r src/templates dist/templates",
74
+ "lint": "eslint",
75
+ "postpack": "shx rm -f oclif.manifest.json",
76
+ "posttest": "npm run lint",
77
+ "prepack": "npm run build && oclif manifest",
78
+ "test": "mocha --forbid-only \"test/**/*.test.ts\"",
79
+ "version": "git add README.md"
80
+ },
81
+ "types": "dist/index.d.ts"
82
+ }