zui-agent-manager 0.1.2 → 0.1.3

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 +4 -1
  2. package/dist/index.js +20 -10
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -76,7 +76,7 @@ zui ls # List sessions with indices
76
76
  ### How It Works
77
77
 
78
78
  1. ZUI launches inside a tmux session (`zui-manager`)
79
- 2. It discovers git repos in your cwd and home directory
79
+ 2. It discovers git repos in your cwd, home directory, and any `scan_dirs`
80
80
  3. Claude sessions run on the default tmux server
81
81
  4. When you press Enter on a session, it splits the pane to show the live session
82
82
  5. Tab switches focus between ZUI and the session pane
@@ -89,6 +89,9 @@ ZUI works with zero config. For explicit control, create `~/.config/zui/config.t
89
89
  # Custom tmux socket path (empty = default tmux server)
90
90
  socket = ""
91
91
 
92
+ # Additional directories to scan for git repos (beyond ~)
93
+ scan_dirs = ["~/desktop", "~/work"]
94
+
92
95
  # Explicit project roots
93
96
  [[projects]]
94
97
  path = "~/myproject"
package/dist/index.js CHANGED
@@ -215,7 +215,7 @@ function discoverProjects(config) {
215
215
  if (config.projects.length > 0) {
216
216
  return discoverFromConfig(config);
217
217
  }
218
- return discoverAuto();
218
+ return discoverAuto(config.scanDirs);
219
219
  }
220
220
  function discoverFromConfig(config) {
221
221
  const projects = [];
@@ -251,23 +251,25 @@ function discoverFromConfig(config) {
251
251
  }
252
252
  return projects;
253
253
  }
254
- function discoverAuto() {
254
+ function discoverAuto(scanDirs = []) {
255
255
  const projects = [];
256
256
  const seenPaths = /* @__PURE__ */ new Set();
257
257
  const cwd = process.cwd();
258
258
  if (isGitDir(cwd)) {
259
259
  addRepoAndWorktrees(cwd, projects, seenPaths);
260
260
  }
261
- const home = homedir();
262
- try {
263
- for (const entry of readdirSync(home).sort()) {
264
- const full = join(home, entry);
265
- if (seenPaths.has(full)) continue;
266
- if (!entry.startsWith(".") && existsSync2(join(full, ".git"))) {
267
- addRepoAndWorktrees(full, projects, seenPaths);
261
+ const dirs = [homedir(), ...scanDirs];
262
+ for (const dir of dirs) {
263
+ try {
264
+ for (const entry of readdirSync(dir).sort()) {
265
+ const full = join(dir, entry);
266
+ if (seenPaths.has(full)) continue;
267
+ if (!entry.startsWith(".") && existsSync2(join(full, ".git"))) {
268
+ addRepoAndWorktrees(full, projects, seenPaths);
269
+ }
268
270
  }
271
+ } catch {
269
272
  }
270
- } catch {
271
273
  }
272
274
  return projects;
273
275
  }
@@ -386,6 +388,7 @@ function defaultConfig() {
386
388
  return {
387
389
  socket: "",
388
390
  projects: [],
391
+ scanDirs: [],
389
392
  defaultArgs: [],
390
393
  yoloArgs: ["--dangerously-skip-permissions"],
391
394
  hookPostWorktreeCreate: "",
@@ -437,6 +440,13 @@ function parseConfigFile(path) {
437
440
  cfg.hookPostWorktreeCreate = hooks.post_worktree_create;
438
441
  }
439
442
  }
443
+ if (Array.isArray(data.scan_dirs)) {
444
+ for (const d of data.scan_dirs) {
445
+ if (typeof d === "string") {
446
+ cfg.scanDirs.push(d.replace(/^~/, homedir2()));
447
+ }
448
+ }
449
+ }
440
450
  const projects = data.projects;
441
451
  if (Array.isArray(projects)) {
442
452
  for (const proj of projects) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zui-agent-manager",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "TUI for managing AI coding agents (Claude Code) in tmux sessions",
5
5
  "type": "module",
6
6
  "bin": {