scai 0.1.63 → 0.1.64
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.
- package/README.md +28 -0
- package/dist/index.js +5 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -269,6 +269,34 @@ These features are experimental and subject to change:
|
|
|
269
269
|
|
|
270
270
|
<br>
|
|
271
271
|
|
|
272
|
+
## Commands
|
|
273
|
+
|
|
274
|
+
### `index`
|
|
275
|
+
The `index` command is used to manage and perform operations on the indexed files and repositories.
|
|
276
|
+
|
|
277
|
+
#### `scai index start`
|
|
278
|
+
|
|
279
|
+
Index supported files in the configured index directory.
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
scai index set <dir>
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Set and activate the index directory.
|
|
286
|
+
```bash
|
|
287
|
+
scai index list
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
List all indexed repositories.
|
|
291
|
+
```bash
|
|
292
|
+
scai index switch
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
Switch active repository (by key or indexDir). Run without input for an interactive list of repositories.
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
272
300
|
> **Note:** Indexing very large repositories (millions of lines) may take **hours or days**. Please be patient, and only index huge codebases if you are ok with some extra processing taking place on your computer.
|
|
273
301
|
|
|
274
302
|
The `scai index` command **automatically** starts a background daemon that continuously:
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ import { reviewPullRequestCmd } from "./commands/ReviewCmd.js";
|
|
|
24
24
|
import { promptForToken } from "./github/token.js";
|
|
25
25
|
import { validateGitHubTokenAgainstRepo } from "./github/githubAuthCheck.js";
|
|
26
26
|
import { checkGit } from "./commands/GitCmd.js";
|
|
27
|
-
import {
|
|
27
|
+
import { runInteractiveSwitch } from "./commands/SwitchCmd.js";
|
|
28
28
|
import { execSync } from "child_process";
|
|
29
29
|
import { fileURLToPath } from "url";
|
|
30
30
|
import { dirname, resolve } from "path";
|
|
@@ -166,15 +166,10 @@ index
|
|
|
166
166
|
Config.printAllRepos(); // 👈 simple and clean
|
|
167
167
|
});
|
|
168
168
|
index
|
|
169
|
-
.command('switch
|
|
170
|
-
.description('Switch active repository (by
|
|
171
|
-
.action((
|
|
172
|
-
|
|
173
|
-
runSwitchCommand(input);
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
runInteractiveSwitch();
|
|
177
|
-
}
|
|
169
|
+
.command('switch')
|
|
170
|
+
.description('Switch active repository (by interactive list only)')
|
|
171
|
+
.action(() => {
|
|
172
|
+
runInteractiveSwitch();
|
|
178
173
|
});
|
|
179
174
|
// This will help resolve the current directory in an ES Module
|
|
180
175
|
cmd
|