@vigent/cli 0.2.0 → 0.2.1

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 (3) hide show
  1. package/README.md +1 -1
  2. package/dist/cli.js +12 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -12,7 +12,7 @@ A vim-style, lightweight terminal app for running several coding agents at once,
12
12
  npm install -g @vigent/cli
13
13
  ```
14
14
 
15
- The package is `@vigent/cli` (npm doesn't accept the plain name `vigent`, which it finds too close to `vitest`); the command is `vigent`.
15
+ The package is `@vigent/cli` (npm doesn't accept the plain name `vigent`, which it finds too close to `vitest`); the command is `vigent`. Run `vigent` in a project, or `vigent <folder>` (`vigent .`, `vigent ~/code/app`) from anywhere.
16
16
 
17
17
  Requires Node.js 20 or newer and git. Then, inside any git repository:
18
18
 
package/dist/cli.js CHANGED
@@ -21,7 +21,7 @@ const HELP = `vigent — vim-native agent orchestrator (pi engine)
21
21
 
22
22
  usage:
23
23
  vigent --version which vigent this is (and the commit, from a clone)
24
- vigent [--demo] [--theme <name>] [--model <id>] [--engine pi|claude|codex|opencode]
24
+ vigent [folder] [--demo] [--theme <name>] [--model <id>] [--engine pi|claude|codex|opencode]
25
25
 
26
26
  engines (what runs new agents; :checkhealth shows which are signed in):
27
27
  pi built in, uses ANTHROPIC_API_KEY / OPENAI_API_KEY / ... or pi's login
@@ -229,6 +229,17 @@ async function main() {
229
229
  console.log(`created ${file}`);
230
230
  return 0;
231
231
  }
232
+ // `vigent <folder>` (like `code .` or `nvim .`) opens that folder; with none, the current one.
233
+ const VALUE_FLAGS = ["--theme", "--model", "--engine"];
234
+ const folder = argv.find((a, i) => !a.startsWith("-") && !VALUE_FLAGS.includes(argv[i - 1]));
235
+ if (folder !== undefined) {
236
+ const dir = path.resolve(folder);
237
+ if (!fs.existsSync(dir) || !fs.statSync(dir).isDirectory()) {
238
+ console.error(`vigent: '${folder}' is not a folder (usage: vigent [folder])`);
239
+ return 1;
240
+ }
241
+ process.chdir(dir);
242
+ }
232
243
  const { config, warnings } = loadConfig();
233
244
  const stale = staleBuild();
234
245
  if (stale)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vigent/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "A vim-style terminal app for running coding agents side by side, each in its own git worktree. Built on pi.",
5
5
  "keywords": [
6
6
  "vim",