byterover-cli 0.1.1 → 0.2.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 (44) hide show
  1. package/README.md +37 -27
  2. package/bin/dev.cmd +1 -1
  3. package/bin/dev.js +1 -1
  4. package/bin/run.cmd +1 -1
  5. package/bin/run.js +1 -1
  6. package/dist/commands/add.js +1 -1
  7. package/dist/commands/init.js +13 -8
  8. package/dist/commands/push.d.ts +5 -5
  9. package/dist/commands/push.js +11 -11
  10. package/dist/commands/retrieve.d.ts +2 -2
  11. package/dist/commands/retrieve.js +3 -3
  12. package/dist/commands/space/list.js +10 -5
  13. package/dist/commands/space/switch.js +8 -7
  14. package/dist/commands/status.js +5 -5
  15. package/dist/config/environment.d.ts +3 -2
  16. package/dist/config/environment.js +5 -3
  17. package/dist/constants.d.ts +8 -1
  18. package/dist/constants.js +8 -1
  19. package/dist/core/domain/entities/{br-config.d.ts → brv-config.d.ts} +5 -5
  20. package/dist/core/domain/entities/{br-config.js → brv-config.js} +5 -5
  21. package/dist/core/interfaces/i-playbook-service.d.ts +1 -1
  22. package/dist/core/interfaces/i-project-config-store.d.ts +10 -10
  23. package/dist/hooks/init/welcome.d.ts +3 -0
  24. package/dist/hooks/init/welcome.js +31 -0
  25. package/dist/infra/ace/ace-file-utils.js +2 -2
  26. package/dist/infra/ace/file-bullet-content-store.d.ts +4 -4
  27. package/dist/infra/ace/file-bullet-content-store.js +7 -7
  28. package/dist/infra/ace/file-delta-store.d.ts +1 -1
  29. package/dist/infra/ace/file-delta-store.js +1 -1
  30. package/dist/infra/ace/file-executor-output-store.d.ts +1 -1
  31. package/dist/infra/ace/file-executor-output-store.js +1 -1
  32. package/dist/infra/ace/file-playbook-store.d.ts +3 -3
  33. package/dist/infra/ace/file-playbook-store.js +6 -6
  34. package/dist/infra/ace/file-reflection-store.d.ts +1 -1
  35. package/dist/infra/ace/file-reflection-store.js +1 -1
  36. package/dist/infra/config/file-config-store.d.ts +6 -8
  37. package/dist/infra/config/file-config-store.js +10 -11
  38. package/dist/infra/playbook/file-playbook-service.d.ts +0 -1
  39. package/dist/infra/playbook/file-playbook-service.js +7 -8
  40. package/dist/templates/README.md +5 -5
  41. package/dist/templates/sections/command-reference.md +23 -23
  42. package/dist/templates/sections/workflow.md +3 -4
  43. package/oclif.manifest.json +3 -3
  44. package/package.json +7 -4
package/README.md CHANGED
@@ -6,6 +6,14 @@ Command-line interface for ByteRover, enabling seamless team/space management, a
6
6
  [![Downloads/week](https://img.shields.io/npm/dw/byterover-cli.svg)](https://npmjs.org/package/byterover-cli)
7
7
  [![Node](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org)
8
8
 
9
+ ## Important
10
+
11
+ Starting with version **0.2.0**, the ByteRover CLI command has been renamed from `br` to `brv` to avoid conflicts with [broot](https://github.com/Canop/broot), another popular CLI tool that also uses the `br` command.
12
+
13
+ This is a **breaking change** that requires action from existing users.
14
+
15
+ Please check the migration guide [here](https://docs.byterover.dev/beta/migration-br-brv).
16
+
9
17
  ## Table of Contents
10
18
 
11
19
  * [Installation](#installation)
@@ -40,17 +48,19 @@ npm install -g byterover-cli
40
48
  ### Verify installation
41
49
 
42
50
  ```bash
43
- br --version
51
+ brv --version
44
52
  ```
45
53
 
46
54
  ## Quick Start
47
55
 
56
+ Visit [**ByteRover's Beta Docs**](https://docs.byterover.dev/beta) for more information.
57
+
48
58
  Get started with ByteRover CLI in three simple steps:
49
59
 
50
60
  ### 1. Authenticate
51
61
 
52
62
  ```bash
53
- br login
63
+ brv login
54
64
  ```
55
65
 
56
66
  This opens your browser to complete OAuth authentication. Your credentials are securely stored in the system keychain.
@@ -58,8 +68,8 @@ This opens your browser to complete OAuth authentication. Your credentials are s
58
68
  ### 2. Initialize a project
59
69
 
60
70
  ```bash
61
- cd your-project-directory
62
- br init
71
+ cd to/your/project
72
+ brv init
63
73
  ```
64
74
 
65
75
  Select a space from your available spaces and configure your project.
@@ -100,14 +110,14 @@ If you're using a coding agent like Claude Code:
100
110
 
101
111
  ```bash
102
112
  # Complete ACE workflow in a single command
103
- br complete "auth-feature" \
113
+ brv complete "auth-feature" \
104
114
  "Implemented JWT authentication with secure token handling" \
105
115
  "Successfully added OAuth2 authentication" \
106
116
  --tool-usage "Read:src/auth.ts,Edit:src/auth.ts,Bash:npm test" \
107
117
  --feedback "All tests passed, auth works correctly"
108
118
  ```
109
119
 
110
- For comprehensive ACE instructions for coding agents, check the corresponding coding agents' instruction files after `br init` or `br gen-rules`.
120
+ For comprehensive ACE instructions for coding agents, check the corresponding coding agents' instruction files after `brv init` or `brv gen-rules`.
111
121
 
112
122
  ## Essential Commands
113
123
 
@@ -115,46 +125,46 @@ For comprehensive ACE instructions for coding agents, check the corresponding co
115
125
 
116
126
  ```bash
117
127
  # Log in to ByteRover
118
- br login
128
+ brv login
119
129
 
120
130
  # Check your authentication and project status
121
- br status
131
+ brv status
122
132
  ```
123
133
 
124
134
  ### Project Setup
125
135
 
126
136
  ```bash
127
137
  # Initialize project with ByteRover
128
- br init
138
+ brv init
129
139
 
130
140
  # List available spaces
131
- br space list
141
+ brv space list
132
142
 
133
143
  # Switch to a different space or team
134
- br space switch
144
+ brv space switch
135
145
  ```
136
146
 
137
147
  ### Memory Operations
138
148
 
139
149
  ```bash
140
150
  # Retrieve memories from ByteRover (outputs to stdout for agent context)
141
- br retrieve --query "authentication best practices"
142
- br retrieve -q "error handling" -n "src/auth/login.ts,src/auth/oauth.ts"
151
+ brv retrieve --query "authentication best practices"
152
+ brv retrieve -q "error handling" -n "src/auth/login.ts,src/auth/oauth.ts"
143
153
 
144
154
  # Push your playbook to ByteRover's memory storage
145
- br push
155
+ brv push
146
156
  ```
147
157
 
148
158
  ### For Coding Agents
149
159
 
150
160
  ```bash
151
161
  # Complete ACE workflow (recommended for agents)
152
- br complete <hint> <reasoning> <answer> \
162
+ brv complete <hint> <reasoning> <answer> \
153
163
  --tool-usage <tools> \
154
164
  --feedback <feedback>
155
165
 
156
166
  # Generate agent rules (sets up ACE workflow for your coding agent)
157
- br gen-rules
167
+ brv gen-rules
158
168
  ```
159
169
 
160
170
  ## Authentication
@@ -163,7 +173,7 @@ ByteRover CLI uses **OAuth 2.0 with PKCE** (Proof Key for Code Exchange) for sec
163
173
 
164
174
  ### How it works
165
175
 
166
- 1. Run `br login` to start authentication
176
+ 1. Run `brv login` to start authentication
167
177
  2. Your browser opens to the ByteRover authorization page
168
178
  3. After successful login, tokens are securely stored in your system keychain
169
179
  4. All subsequent commands automatically use your stored credentials
@@ -179,7 +189,7 @@ ByteRover CLI uses **OAuth 2.0 with PKCE** (Proof Key for Code Exchange) for sec
179
189
 
180
190
  ### Project Configuration
181
191
 
182
- When you run `br init`, a configuration file is created at `.br/config.json` in your project directory containing:
192
+ When you run `brv init`, a configuration file is created at `.brv/config.json` in your project directory containing:
183
193
 
184
194
  - **Space ID**: The ByteRover workspace/space associated with this project
185
195
  - **User information**: Your user ID and email
@@ -187,17 +197,17 @@ When you run `br init`, a configuration file is created at `.br/config.json` in
187
197
 
188
198
  ### ACE File Structure
189
199
 
190
- ACE stores all outputs in `.br/ace/`:
200
+ ACE stores all outputs in `.brv/ace/`:
191
201
 
192
202
  ```
193
- .br/ace/
203
+ .brv/ace/
194
204
  ├── playbook.json # Your living knowledge base
195
205
  ├── executor-outputs/ # Coding task outputs
196
206
  ├── reflections/ # Task analysis and feedback
197
207
  └── deltas/ # Playbook updates
198
208
  ```
199
209
 
200
- **Note**: When you run `br push`, the playbook is uploaded to ByteRover's memory storage, and local ACE files are automatically cleaned up to keep your workspace organized.
210
+ **Note**: When you run `brv push`, the playbook is uploaded to ByteRover's memory storage, and local ACE files are automatically cleaned up to keep your workspace organized.
201
211
 
202
212
  ## Getting Help
203
213
 
@@ -205,20 +215,20 @@ ACE stores all outputs in `.br/ace/`:
205
215
 
206
216
  ```bash
207
217
  # Get general help
208
- br help
218
+ brv --help
209
219
 
210
220
  # Get help for a specific command
211
- br help login
212
- br help init
213
- br help push
221
+ brv login --help
222
+ brv init --help
223
+ brv push --help
214
224
  ```
215
225
 
216
226
  ### Support
217
227
 
218
228
  If you encounter issues or have questions:
219
229
 
220
- 1. Check the command help: `br help [command]`
221
- 2. Review your status: `br status`
230
+ 1. Check the command help: `brv [command] --help`
231
+ 2. Review your status: `brv status`
222
232
  3. Contact ByteRover support
223
233
 
224
234
  ---
package/bin/dev.cmd CHANGED
@@ -1,4 +1,4 @@
1
1
  @echo off
2
2
 
3
- set BR_ENV=development
3
+ set BRV_ENV=development
4
4
  node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\dev" %*
package/bin/dev.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env -S node --loader ts-node/esm --disable-warning=ExperimentalWarning
2
2
 
3
- process.env.BR_ENV = 'development'
3
+ process.env.BRV_ENV = 'development'
4
4
 
5
5
  import {execute} from '@oclif/core'
6
6
 
package/bin/run.cmd CHANGED
@@ -1,4 +1,4 @@
1
1
  @echo off
2
2
 
3
- set BR_ENV=production
3
+ set BRV_ENV=production
4
4
  node "%~dp0\run" %*
package/bin/run.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- process.env.BR_ENV = 'production'
3
+ process.env.BRV_ENV = 'production'
4
4
 
5
5
  import {execute} from '@oclif/core'
6
6
 
@@ -62,7 +62,7 @@ export default class Add extends Command {
62
62
  this.log(` Section: ${section}`);
63
63
  const contentDisplay = content.length > 200 ? `${content.slice(0, 200)}...` : content;
64
64
  this.log(` Content: ${contentDisplay}`);
65
- this.log('\nTip: Use `br status` to view and update bullets later');
65
+ this.log('\nTip: Use `brv status` to view and update bullets later');
66
66
  const confirmed = await confirm({
67
67
  default: true,
68
68
  message: 'Add this bullet?',
@@ -1,7 +1,8 @@
1
1
  import { select } from '@inquirer/prompts';
2
2
  import { Command, ux } from '@oclif/core';
3
3
  import { getCurrentConfig } from '../config/environment.js';
4
- import { BrConfig } from '../core/domain/entities/br-config.js';
4
+ import { BRV_DIR, PROJECT_CONFIG_FILE } from '../constants.js';
5
+ import { BrvConfig } from '../core/domain/entities/brv-config.js';
5
6
  import { ProjectConfigStore } from '../infra/config/file-config-store.js';
6
7
  import { FilePlaybookService } from '../infra/playbook/file-playbook-service.js';
7
8
  import { HttpSpaceService } from '../infra/space/http-space-service.js';
@@ -9,7 +10,7 @@ import { KeychainTokenStore } from '../infra/storage/keychain-token-store.js';
9
10
  import { HttpTeamService } from '../infra/team/http-team-service.js';
10
11
  import { MixpanelTrackingService } from '../infra/tracking/mixpanel-tracking-service.js';
11
12
  export default class Init extends Command {
12
- static description = 'Initialize a project with ByteRover (creates .br/config.json with team/space selection and initializes ACE playbook)';
13
+ static description = `Initialize a project with ByteRover (creates ${BRV_DIR}/${PROJECT_CONFIG_FILE} with team/space selection and initializes ACE playbook)`;
13
14
  static examples = [
14
15
  '<%= config.bin %> <%= command.id %>',
15
16
  '# Re-initialize if config exists (will show current config and exit):\n<%= config.bin %> <%= command.id %>',
@@ -75,10 +76,10 @@ export default class Init extends Command {
75
76
  // 2. Load and validate authentication token
76
77
  const token = await tokenStore.load();
77
78
  if (token === undefined) {
78
- this.error('Not authenticated. Please run "br login" first.');
79
+ this.error('Not authenticated. Please run "brv login" first.');
79
80
  }
80
81
  if (!token.isValid()) {
81
- this.error('Authentication token expired. Please run "br login" again.');
82
+ this.error('Authentication token expired. Please run "brv login" again.');
82
83
  }
83
84
  // 3. Fetch all teams with spinner
84
85
  ux.action.start('Fetching all teams');
@@ -86,7 +87,9 @@ export default class Init extends Command {
86
87
  ux.action.stop();
87
88
  const { teams } = teamResult;
88
89
  if (teams.length === 0) {
89
- this.error('No teams found. Please create a team in the ByteRover dashboard first.');
90
+ this.log('No teams found.');
91
+ this.log(`Please visit ${getCurrentConfig().webAppUrl} to create your first team.`);
92
+ return;
90
93
  }
91
94
  // 4. Prompt for team selection
92
95
  this.log();
@@ -99,13 +102,15 @@ export default class Init extends Command {
99
102
  ux.action.stop();
100
103
  const { spaces } = spaceResult;
101
104
  if (spaces.length === 0) {
102
- this.error(`No spaces found in team "${selectedTeam.getDisplayName()}". Please create a space in the ByteRover dashboard first.`);
105
+ this.log(`No spaces found in team "${selectedTeam.getDisplayName()}"`);
106
+ this.log(`Please visit ${getCurrentConfig().webAppUrl} to create your first space for ${selectedTeam.getDisplayName()}.`);
107
+ return;
103
108
  }
104
109
  // 6. Prompt for space selection
105
110
  this.log();
106
111
  const selectedSpace = await this.promptForSpaceSelection(spaces);
107
112
  // 7. Create and save configuration
108
- const config = BrConfig.fromSpace(selectedSpace);
113
+ const config = BrvConfig.fromSpace(selectedSpace);
109
114
  await projectConfigStore.write(config);
110
115
  // 8. Initialize ACE playbook
111
116
  this.log('\nInitializing ACE context...');
@@ -126,7 +131,7 @@ export default class Init extends Command {
126
131
  // 10. Display success
127
132
  this.log(`\n✓ Project initialized successfully!`);
128
133
  this.log(`✓ Connected to space: ${selectedSpace.getDisplayName()}`);
129
- this.log(`✓ Configuration saved to: .br/config.json`);
134
+ this.log(`✓ Configuration saved to: ${BRV_DIR}/${PROJECT_CONFIG_FILE}`);
130
135
  }
131
136
  catch (error) {
132
137
  this.error(error instanceof Error ? error.message : 'Initialization failed');
@@ -1,6 +1,6 @@
1
1
  import { Command } from '@oclif/core';
2
2
  import type { AuthToken } from '../core/domain/entities/auth-token.js';
3
- import type { BrConfig } from '../core/domain/entities/br-config.js';
3
+ import type { BrvConfig } from '../core/domain/entities/brv-config.js';
4
4
  import type { PresignedUrl } from '../core/domain/entities/presigned-url.js';
5
5
  import type { PresignedUrlsResponse } from '../core/domain/entities/presigned-urls-response.js';
6
6
  import type { IMemoryStorageService } from '../core/interfaces/i-memory-storage-service.js';
@@ -15,10 +15,10 @@ export default class Push extends Command {
15
15
  branch: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
16
16
  yes: import("@oclif/core/interfaces").BooleanFlag<boolean>;
17
17
  };
18
- protected checkProjectInit(projectConfigStore: IProjectConfigStore): Promise<BrConfig>;
18
+ protected checkProjectInit(projectConfigStore: IProjectConfigStore): Promise<BrvConfig>;
19
19
  protected cleanUpLocalFiles(playbookStore: IPlaybookStore): Promise<void>;
20
- protected confirmPush(projectConfig: BrConfig, branch: string, fileCount: number): Promise<boolean>;
21
- protected confirmUpload(memoryService: IMemoryStorageService, token: AuthToken, projectConfig: BrConfig, requestId: string): Promise<void>;
20
+ protected confirmPush(projectConfig: BrvConfig, branch: string, fileCount: number): Promise<boolean>;
21
+ protected confirmUpload(memoryService: IMemoryStorageService, token: AuthToken, projectConfig: BrvConfig, requestId: string): Promise<void>;
22
22
  protected createServices(): {
23
23
  memoryService: IMemoryStorageService;
24
24
  playbookStore: IPlaybookStore;
@@ -26,7 +26,7 @@ export default class Push extends Command {
26
26
  tokenStore: ITokenStore;
27
27
  trackingService: ITrackingService;
28
28
  };
29
- protected getPresignedUrls(memoryService: IMemoryStorageService, token: AuthToken, projectConfig: BrConfig): Promise<PresignedUrlsResponse>;
29
+ protected getPresignedUrls(memoryService: IMemoryStorageService, token: AuthToken, projectConfig: BrvConfig): Promise<PresignedUrlsResponse>;
30
30
  protected loadPlaybookContent(playbookStore: IPlaybookStore): Promise<string>;
31
31
  run(): Promise<void>;
32
32
  protected uploadFiles(memoryService: IMemoryStorageService, presignedUrls: ReadonlyArray<PresignedUrl>, playbookContent: string): Promise<void>;
@@ -2,7 +2,7 @@ import { confirm } from '@inquirer/prompts';
2
2
  import { Command, Flags, ux } from '@oclif/core';
3
3
  import { join } from 'node:path';
4
4
  import { getCurrentConfig } from '../config/environment.js';
5
- import { ACE_DIR, BR_DIR, DEFAULT_BRANCH, DELTAS_DIR, EXECUTOR_OUTPUTS_DIR, REFLECTIONS_DIR } from '../constants.js';
5
+ import { ACE_DIR, BRV_DIR, BULLETS_DIR, DEFAULT_BRANCH, DELTAS_DIR, EXECUTOR_OUTPUTS_DIR, PLAYBOOK_FILE, REFLECTIONS_DIR, } from '../constants.js';
6
6
  import { FilePlaybookStore } from '../infra/ace/file-playbook-store.js';
7
7
  import { ProjectConfigStore } from '../infra/config/file-config-store.js';
8
8
  import { HttpMemoryStorageService } from '../infra/memory/http-memory-storage-service.js';
@@ -32,7 +32,7 @@ export default class Push extends Command {
32
32
  async checkProjectInit(projectConfigStore) {
33
33
  const projectConfig = await projectConfigStore.read();
34
34
  if (projectConfig === undefined) {
35
- this.error('Project not initialized. Run "br init" first.');
35
+ this.error('Project not initialized. Run "brv init" first.');
36
36
  }
37
37
  return projectConfig;
38
38
  }
@@ -44,7 +44,7 @@ export default class Push extends Command {
44
44
  ux.action.stop('✓');
45
45
  // Clean executor outputs
46
46
  const baseDir = process.cwd();
47
- const aceDir = join(baseDir, BR_DIR, ACE_DIR);
47
+ const aceDir = join(baseDir, BRV_DIR, ACE_DIR);
48
48
  const executorOutputsDir = join(aceDir, EXECUTOR_OUTPUTS_DIR);
49
49
  const reflectionsDir = join(aceDir, REFLECTIONS_DIR);
50
50
  const deltasDir = join(aceDir, DELTAS_DIR);
@@ -67,10 +67,10 @@ export default class Push extends Command {
67
67
  this.log(` Files to upload: ${fileCount}`);
68
68
  this.log('\nAfter successful push, these local files will be cleaned up:');
69
69
  this.log(' - Playbook content');
70
- this.log(' - Bullet files (.br/ace/bullets/)');
71
- this.log(' - Executor outputs (.br/ace/executor-outputs/)');
72
- this.log(' - Reflections (.br/ace/reflections/)');
73
- this.log(' - Deltas (.br/ace/deltas/)');
70
+ this.log(` - Bullet files (${BRV_DIR}/${ACE_DIR}/${BULLETS_DIR}/)`);
71
+ this.log(` - Executor outputs (${BRV_DIR}/${ACE_DIR}/${EXECUTOR_OUTPUTS_DIR}/)`);
72
+ this.log(` - Reflections (${BRV_DIR}/${ACE_DIR}/${REFLECTIONS_DIR}/)`);
73
+ this.log(` - Deltas (${BRV_DIR}/${ACE_DIR}/${DELTAS_DIR}/)`);
74
74
  return confirm({
75
75
  default: false,
76
76
  message: 'Push to ByteRover and clean up local files?',
@@ -107,7 +107,7 @@ export default class Push extends Command {
107
107
  const response = await memoryService.getPresignedUrls({
108
108
  accessToken: token.accessToken,
109
109
  branch: flags.branch,
110
- fileNames: ['playbook.json'],
110
+ fileNames: [`${PLAYBOOK_FILE}`],
111
111
  sessionKey: token.sessionKey,
112
112
  spaceId: projectConfig.spaceId,
113
113
  teamId: projectConfig.teamId,
@@ -164,17 +164,17 @@ export default class Push extends Command {
164
164
  async validateAuth(tokenStore) {
165
165
  const token = await tokenStore.load();
166
166
  if (token === undefined) {
167
- this.error('Not authenticated. Run "br login" first.');
167
+ this.error('Not authenticated. Run "brv login" first.');
168
168
  }
169
169
  if (!token.isValid()) {
170
- this.error('Authentication token expired. Run "br login" again.');
170
+ this.error('Authentication token expired. Run "brv login" again.');
171
171
  }
172
172
  return token;
173
173
  }
174
174
  async verifyPlaybookExists(playbookStore) {
175
175
  const playbookExists = await playbookStore.exists();
176
176
  if (!playbookExists) {
177
- this.error('Playbook not found. Run "br init" to create one.');
177
+ this.error('Playbook not found. Run "brv init" to create one.');
178
178
  }
179
179
  }
180
180
  }
@@ -1,6 +1,6 @@
1
1
  import { Command } from '@oclif/core';
2
2
  import type { AuthToken } from '../core/domain/entities/auth-token.js';
3
- import type { BrConfig } from '../core/domain/entities/br-config.js';
3
+ import type { BrvConfig } from '../core/domain/entities/brv-config.js';
4
4
  import type { IMemoryRetrievalService } from '../core/interfaces/i-memory-retrieval-service.js';
5
5
  import type { IProjectConfigStore } from '../core/interfaces/i-project-config-store.js';
6
6
  import type { ITokenStore } from '../core/interfaces/i-token-store.js';
@@ -13,7 +13,7 @@ export default class Retrieve extends Command {
13
13
  'node-keys': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
14
  query: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
15
15
  };
16
- protected checkProjectInt(projectConfigStore: IProjectConfigStore): Promise<BrConfig>;
16
+ protected checkProjectInt(projectConfigStore: IProjectConfigStore): Promise<BrvConfig>;
17
17
  protected createServices(): {
18
18
  memoryService: IMemoryRetrievalService;
19
19
  projectConfigStore: IProjectConfigStore;
@@ -31,7 +31,7 @@ export default class Retrieve extends Command {
31
31
  async checkProjectInt(projectConfigStore) {
32
32
  const isInitialized = await projectConfigStore.exists();
33
33
  if (!isInitialized) {
34
- this.error('Project is not initialized. Please run "br init" first.');
34
+ this.error('Project is not initialized. Please run "brv init" first.');
35
35
  }
36
36
  const config = await projectConfigStore.read();
37
37
  if (!config) {
@@ -82,10 +82,10 @@ export default class Retrieve extends Command {
82
82
  async validateAuth(tokenStore) {
83
83
  const token = await tokenStore.load();
84
84
  if (token === undefined) {
85
- this.error('Not authenticated. Please run "br auth login" first.');
85
+ this.error('Not authenticated. Please run "brv login" first.');
86
86
  }
87
87
  if (!token.isValid()) {
88
- this.error('Authentication token expired. Please run "br auth login" again.');
88
+ this.error('Authentication token expired. Please run "brv login" again.');
89
89
  }
90
90
  return token;
91
91
  }
@@ -51,13 +51,18 @@ export default class SpaceList extends Command {
51
51
  // Check project initialization
52
52
  const projectConfig = await projectConfigStore.read();
53
53
  if (projectConfig === undefined) {
54
- this.error('Project not initialized. Run "br init" first.');
54
+ this.error('Project not initialized. Run "brv init" first.');
55
55
  }
56
56
  const token = await this.validateAuth(tokenStore);
57
57
  // Fetch spaces for the team from project config
58
58
  ux.action.start(`Fetching spaces for ${projectConfig.teamName}`);
59
- const result = await spaceService.getSpaces(token.accessToken, token.sessionKey, projectConfig.teamId, flags.all ? { fetchAll: true } : { limit: flags.limit, offset: flags.offset });
60
- ux.action.stop();
59
+ let result;
60
+ try {
61
+ result = await spaceService.getSpaces(token.accessToken, token.sessionKey, projectConfig.teamId, flags.all ? { fetchAll: true } : { limit: flags.limit, offset: flags.offset });
62
+ }
63
+ finally {
64
+ ux.action.stop();
65
+ }
61
66
  // Handle empty results
62
67
  if (result.spaces.length === 0) {
63
68
  this.log(`No spaces found in team "${projectConfig.teamName}".`);
@@ -95,10 +100,10 @@ export default class SpaceList extends Command {
95
100
  async validateAuth(tokenStore) {
96
101
  const token = await tokenStore.load();
97
102
  if (token === undefined) {
98
- this.error('Not authenticated. Please run "br login" first.');
103
+ this.error('Not authenticated. Please run "brv login" first.');
99
104
  }
100
105
  if (!token.isValid()) {
101
- this.error('Authentication token expired. Please run "br login" again.');
106
+ this.error('Authentication token expired. Please run "brv login" again.');
102
107
  }
103
108
  return token;
104
109
  }
@@ -1,13 +1,14 @@
1
1
  import { select } from '@inquirer/prompts';
2
2
  import { Command, ux } from '@oclif/core';
3
3
  import { getCurrentConfig } from '../../config/environment.js';
4
- import { BrConfig } from '../../core/domain/entities/br-config.js';
4
+ import { BRV_DIR, PROJECT_CONFIG_FILE } from '../../constants.js';
5
+ import { BrvConfig } from '../../core/domain/entities/brv-config.js';
5
6
  import { ProjectConfigStore } from '../../infra/config/file-config-store.js';
6
7
  import { HttpSpaceService } from '../../infra/space/http-space-service.js';
7
8
  import { KeychainTokenStore } from '../../infra/storage/keychain-token-store.js';
8
9
  import { HttpTeamService } from '../../infra/team/http-team-service.js';
9
10
  export default class SpaceSwitch extends Command {
10
- static description = 'Switch to a different team or space (updates .br/config.json)';
11
+ static description = `Switch to a different team or space (updates ${BRV_DIR}/${PROJECT_CONFIG_FILE})`;
11
12
  static examples = [
12
13
  '<%= config.bin %> <%= command.id %>',
13
14
  '# Shows current configuration, then prompts for new team/space selection',
@@ -59,7 +60,7 @@ export default class SpaceSwitch extends Command {
59
60
  // Check project initialization (MUST exist for switch)
60
61
  const currentConfig = await projectConfigStore.read();
61
62
  if (currentConfig === undefined) {
62
- this.error('Project not initialized. Run "br init" first.');
63
+ this.error('Project not initialized. Run "brv init" first.');
63
64
  }
64
65
  // Show current configuration
65
66
  this.log('Current configuration:');
@@ -69,10 +70,10 @@ export default class SpaceSwitch extends Command {
69
70
  // Validate authentication
70
71
  const token = await tokenStore.load();
71
72
  if (token === undefined) {
72
- this.error('Not authenticated. Please run "br login" first.');
73
+ this.error('Not authenticated. Please run "brv login" first.');
73
74
  }
74
75
  if (!token.isValid()) {
75
- this.error('Authentication token expired. Please run "br login" again.');
76
+ this.error('Authentication token expired. Please run "brv login" again.');
76
77
  }
77
78
  // Fetch all teams
78
79
  ux.action.start('Fetching all teams');
@@ -97,11 +98,11 @@ export default class SpaceSwitch extends Command {
97
98
  this.log();
98
99
  const selectedSpace = await this.promptForSpaceSelection(spaceResult.spaces);
99
100
  // Update configuration
100
- const newConfig = BrConfig.fromSpace(selectedSpace);
101
+ const newConfig = BrvConfig.fromSpace(selectedSpace);
101
102
  await projectConfigStore.write(newConfig);
102
103
  // Display success
103
104
  this.log(`\n✓ Successfully switched to space: ${selectedSpace.getDisplayName()}`);
104
- this.log(`✓ Configuration updated in: .br/config.json`);
105
+ this.log(`✓ Configuration updated in: ${BRV_DIR}/${PROJECT_CONFIG_FILE}`);
105
106
  }
106
107
  catch (error) {
107
108
  this.error(error instanceof Error ? error.message : 'Switch failed');
@@ -1,6 +1,6 @@
1
1
  import { Args, Command, Flags } from '@oclif/core';
2
2
  import chalk from 'chalk';
3
- import { ACE_DIR, BR_DIR, BULLETS_DIR } from '../constants.js';
3
+ import { ACE_DIR, BRV_DIR, BULLETS_DIR } from '../constants.js';
4
4
  import { FilePlaybookStore } from '../infra/ace/file-playbook-store.js';
5
5
  import { ProjectConfigStore } from '../infra/config/file-config-store.js';
6
6
  import { KeychainTokenStore } from '../infra/storage/keychain-token-store.js';
@@ -80,7 +80,7 @@ export default class Status extends Command {
80
80
  try {
81
81
  const playbook = await playbookStore.load(args.directory);
82
82
  if (!playbook) {
83
- this.error('Playbook not found. Run `br init` to initialize.');
83
+ this.error('Playbook not found. Run `brv init` to initialize.');
84
84
  }
85
85
  // Display based on format
86
86
  if (flags.format === 'json') {
@@ -90,7 +90,7 @@ export default class Status extends Command {
90
90
  const bullets = playbook.getBullets();
91
91
  const sections = playbook.getSections();
92
92
  if (bullets.length === 0) {
93
- this.log('Playbook is empty. Use "br add" commands to add knowledge.');
93
+ this.log('Playbook is empty. Use "brv add" commands to add knowledge.');
94
94
  return;
95
95
  }
96
96
  this.log(`\nMemory not pushed to cloud:`);
@@ -101,12 +101,12 @@ export default class Status extends Command {
101
101
  this.log(`# ${section}`);
102
102
  const sectionBullets = playbook.getBulletsInSection(section);
103
103
  for (const bullet of sectionBullets) {
104
- const relativePath = `${BR_DIR}/${ACE_DIR}/${BULLETS_DIR}/${bullet.id}.md`;
104
+ const relativePath = `${BRV_DIR}/${ACE_DIR}/${BULLETS_DIR}/${bullet.id}.md`;
105
105
  // Display like git status: red path
106
106
  this.log(` ${chalk.red(relativePath)}`);
107
107
  }
108
108
  }
109
- this.log(`\nUse "br push" to push playbook to ByteRover memory storage.`);
109
+ this.log(`\nUse "brv push" to push playbook to ByteRover memory storage.`);
110
110
  }
111
111
  catch (error) {
112
112
  this.error(error instanceof Error ? error.message : 'Failed to load playbook statistics');
@@ -4,8 +4,8 @@
4
4
  type Environment = 'development' | 'production';
5
5
  /**
6
6
  * Current environment - set at runtime by the launcher scripts.
7
- * - `./bin/dev.js` sets BR_ENV=development
8
- * - `./bin/run.js` sets BR_ENV=production
7
+ * - `./bin/dev.js` sets BRV_ENV=development
8
+ * - `./bin/run.js` sets BRV_ENV=production
9
9
  */
10
10
  export declare const ENVIRONMENT: Environment;
11
11
  /**
@@ -21,6 +21,7 @@ type EnvironmentConfig = {
21
21
  mixpanelToken: string;
22
22
  scopes: string[];
23
23
  tokenUrl: string;
24
+ webAppUrl: string;
24
25
  };
25
26
  /**
26
27
  * Configuration for each environment.
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Current environment - set at runtime by the launcher scripts.
3
- * - `./bin/dev.js` sets BR_ENV=development
4
- * - `./bin/run.js` sets BR_ENV=production
3
+ * - `./bin/dev.js` sets BRV_ENV=development
4
+ * - `./bin/run.js` sets BRV_ENV=production
5
5
  */
6
- export const ENVIRONMENT = process.env.BR_ENV ?? 'development';
6
+ export const ENVIRONMENT = process.env.BRV_ENV ?? 'development';
7
7
  /**
8
8
  * Configuration for each environment.
9
9
  * These values are bundled at build time.
@@ -19,6 +19,7 @@ export const ENV_CONFIG = {
19
19
  mixpanelToken: '258e1a2b3d44cc634ef28964771b1da0',
20
20
  scopes: ['read', 'write', 'debug'],
21
21
  tokenUrl: 'https://dev-beta-iam.byterover.dev/api/v1/oidc/token',
22
+ webAppUrl: 'https://dev-beta-app.byterover.dev/',
22
23
  },
23
24
  production: {
24
25
  apiBaseUrl: 'https://beta-iam.byterover.dev/api/v1',
@@ -30,6 +31,7 @@ export const ENV_CONFIG = {
30
31
  mixpanelToken: '4d1198b346d2d6ac75f2e77905cc65ac',
31
32
  scopes: ['read', 'write'],
32
33
  tokenUrl: 'https://beta-iam.byterover.dev/api/v1/oidc/token',
34
+ webAppUrl: 'https://beta-app.byterover.dev',
33
35
  },
34
36
  };
35
37
  /**
@@ -1,11 +1,18 @@
1
- export declare const BR_DIR = ".br";
1
+ export declare const BRV_DIR = ".brv";
2
+ export declare const PROJECT_CONFIG_FILE = "config.json";
2
3
  export declare const ACE_DIR = "ace";
3
4
  export declare const EXECUTOR_OUTPUTS_DIR = "executor-outputs";
4
5
  export declare const REFLECTIONS_DIR = "reflections";
5
6
  export declare const DELTAS_DIR = "deltas";
6
7
  export declare const BULLETS_DIR = "bullets";
8
+ export declare const PLAYBOOK_FILE = "playbook.json";
7
9
  /**
8
10
  * Default ByteRover branch name for memory storage.
9
11
  * This is ByteRover's internal branching mechanism, not Git branches.
10
12
  */
11
13
  export declare const DEFAULT_BRANCH = "main";
14
+ /**
15
+ * ByteRover documentation URL.
16
+ * Used in CLI help output to direct users to online documentation.
17
+ */
18
+ export declare const DOCS_URL = "https://docs.byterover.dev/beta";