@hasna/configs 0.2.7 → 0.2.9

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/dist/cli/index.js CHANGED
@@ -2994,21 +2994,21 @@ var init_sync = __esm(() => {
2994
2994
  { path: "~/.claude/CLAUDE.md", name: "claude-claude-md", category: "rules", agent: "claude", format: "markdown" },
2995
2995
  { path: "~/.claude/settings.json", name: "claude-settings", category: "agent", agent: "claude", format: "json" },
2996
2996
  { path: "~/.claude/settings.local.json", name: "claude-settings-local", category: "agent", agent: "claude", format: "json" },
2997
- { path: "~/.claude/keybindings.json", name: "claude-keybindings", category: "agent", agent: "claude", format: "json" },
2997
+ { path: "~/.claude/keybindings.json", name: "claude-keybindings", category: "agent", agent: "claude", format: "json", optional: true },
2998
2998
  { path: "~/.claude/rules", name: "claude-rules", category: "rules", agent: "claude", rulesDir: "~/.claude/rules" },
2999
2999
  { path: "~/.codex/config.toml", name: "codex-config", category: "agent", agent: "codex", format: "toml" },
3000
3000
  { path: "~/.codex/AGENTS.md", name: "codex-agents-md", category: "rules", agent: "codex", format: "markdown" },
3001
3001
  { path: "~/.gemini/settings.json", name: "gemini-settings", category: "agent", agent: "gemini", format: "json" },
3002
- { path: "~/.gemini/GEMINI.md", name: "gemini-gemini-md", category: "rules", agent: "gemini", format: "markdown" },
3002
+ { path: "~/.gemini/GEMINI.md", name: "gemini-gemini-md", category: "rules", agent: "gemini", format: "markdown", optional: true },
3003
3003
  { path: "~/.claude.json", name: "claude-json", category: "mcp", agent: "claude", format: "json", description: "Claude Code global config (includes MCP server entries)" },
3004
3004
  { path: "~/.zshrc", name: "zshrc", category: "shell", agent: "zsh" },
3005
- { path: "~/.zprofile", name: "zprofile", category: "shell", agent: "zsh" },
3006
- { path: "~/.bashrc", name: "bashrc", category: "shell", agent: "zsh" },
3007
- { path: "~/.bash_profile", name: "bash-profile", category: "shell", agent: "zsh" },
3005
+ { path: "~/.zprofile", name: "zprofile", category: "shell", agent: "zsh", optional: true },
3006
+ { path: "~/.bashrc", name: "bashrc", category: "shell", agent: "zsh", optional: true },
3007
+ { path: "~/.bash_profile", name: "bash-profile", category: "shell", agent: "zsh", optional: true },
3008
3008
  { path: "~/.gitconfig", name: "gitconfig", category: "git", agent: "git", format: "ini" },
3009
- { path: "~/.gitignore_global", name: "gitignore-global", category: "git", agent: "git" },
3009
+ { path: "~/.gitignore_global", name: "gitignore-global", category: "git", agent: "git", optional: true },
3010
3010
  { path: "~/.npmrc", name: "npmrc", category: "tools", agent: "npm", format: "ini" },
3011
- { path: "~/.bunfig.toml", name: "bunfig", category: "tools", agent: "global", format: "toml" }
3011
+ { path: "~/.bunfig.toml", name: "bunfig", category: "tools", agent: "global", format: "toml", optional: true }
3012
3012
  ];
3013
3013
  PROJECT_CONFIG_FILES = [
3014
3014
  { file: "CLAUDE.md", category: "rules", agent: "claude", format: "markdown" },
@@ -3411,7 +3411,7 @@ program.command("diff [id]").description("Show diff between stored config and di
3411
3411
  process.exit(1);
3412
3412
  }
3413
3413
  });
3414
- program.command("sync").description("Sync known AI coding configs from disk into DB (claude, codex, gemini, zsh, git, npm)").option("-a, --agent <agent>", "only sync configs for this agent (claude|codex|gemini|zsh|git|npm)").option("-c, --category <cat>", "only sync configs in this category").option("-p, --project [dir]", "sync project-scoped configs (CLAUDE.md, .mcp.json, etc.) from a project dir").option("--to-disk", "apply DB configs back to disk instead").option("--dry-run", "preview without writing").option("--list", "show which files would be synced without doing anything").action(async (opts) => {
3414
+ program.command("sync").description("Sync known AI coding configs from disk into DB (claude, codex, gemini, zsh, git, npm)").option("-a, --agent <agent>", "only sync configs for this agent (claude|codex|gemini|zsh|git|npm)").option("-c, --category <cat>", "only sync configs in this category").option("-p, --project [dir]", "sync project-scoped configs (CLAUDE.md, .mcp.json, etc.) from a project dir").option("--all", "with --project: scan all subdirs for projects to sync").option("--to-disk", "apply DB configs back to disk instead").option("--dry-run", "preview without writing").option("--list", "show which files would be synced without doing anything").action(async (opts) => {
3415
3415
  if (opts.list) {
3416
3416
  const targets = KNOWN_CONFIGS.filter((k) => {
3417
3417
  if (opts.agent && k.agent !== opts.agent)
@@ -3428,6 +3428,30 @@ program.command("sync").description("Sync known AI coding configs from disk into
3428
3428
  }
3429
3429
  if (opts.project) {
3430
3430
  const dir = typeof opts.project === "string" ? opts.project : process.cwd();
3431
+ if (opts.all) {
3432
+ const { readdirSync: readdirSync3, statSync: st } = await import("fs");
3433
+ const absDir = expandPath(dir);
3434
+ const entries = readdirSync3(absDir, { withFileTypes: true });
3435
+ let totalAdded = 0, totalUpdated = 0, totalUnchanged = 0, projects = 0;
3436
+ for (const entry of entries) {
3437
+ if (!entry.isDirectory())
3438
+ continue;
3439
+ const projDir = join6(absDir, entry.name);
3440
+ const hasClaude = existsSync7(join6(projDir, "CLAUDE.md")) || existsSync7(join6(projDir, ".mcp.json")) || existsSync7(join6(projDir, ".claude"));
3441
+ if (!hasClaude)
3442
+ continue;
3443
+ const result2 = await syncProject({ projectDir: projDir, dryRun: opts.dryRun });
3444
+ if (result2.added + result2.updated > 0) {
3445
+ console.log(` ${chalk.green("\u2713")} ${entry.name}: +${result2.added} updated:${result2.updated}`);
3446
+ }
3447
+ totalAdded += result2.added;
3448
+ totalUpdated += result2.updated;
3449
+ totalUnchanged += result2.unchanged;
3450
+ projects++;
3451
+ }
3452
+ console.log(chalk.green("\u2713") + ` Synced ${projects} projects: +${totalAdded} updated:${totalUpdated} unchanged:${totalUnchanged}`);
3453
+ return;
3454
+ }
3431
3455
  const result = await syncProject({ projectDir: dir, dryRun: opts.dryRun });
3432
3456
  console.log(chalk.green("\u2713") + ` Project sync: +${result.added} updated:${result.updated} unchanged:${result.unchanged} skipped:${result.skipped.length}`);
3433
3457
  return;
@@ -3906,12 +3930,13 @@ program.command("doctor").description("Validate configs: syntax, permissions, mi
3906
3930
  };
3907
3931
  console.log(chalk.bold(`Config Doctor
3908
3932
  `));
3933
+ const skip = (msg) => console.log(chalk.dim(" - ") + chalk.dim(msg));
3909
3934
  console.log(chalk.cyan("Known files on disk:"));
3910
3935
  for (const k of KNOWN_CONFIGS) {
3911
3936
  if (k.rulesDir) {
3912
- existsSync7(expandPath(k.rulesDir)) ? pass(`${k.rulesDir}/ exists`) : fail(`${k.rulesDir}/ not found`);
3937
+ existsSync7(expandPath(k.rulesDir)) ? pass(`${k.rulesDir}/ exists`) : k.optional ? skip(`${k.rulesDir}/ (optional)`) : fail(`${k.rulesDir}/ not found`);
3913
3938
  } else {
3914
- existsSync7(expandPath(k.path)) ? pass(k.path) : fail(`${k.path} not found`);
3939
+ existsSync7(expandPath(k.path)) ? pass(k.path) : k.optional ? skip(`${k.path} (optional)`) : fail(`${k.path} not found`);
3915
3940
  }
3916
3941
  }
3917
3942
  const allConfigs = listConfigs();
@@ -4067,6 +4092,69 @@ program.command("watch").description("Watch known config files for changes and a
4067
4092
  setInterval(tick, interval);
4068
4093
  await new Promise(() => {});
4069
4094
  });
4095
+ program.command("bootstrap").description("Install the full @hasna ecosystem: CLI tools + MCP servers + configs").option("--dry-run", "show what would be installed without doing it").option("--skip-mcp", "skip MCP server registration").action(async (opts) => {
4096
+ const packages = [
4097
+ { name: "@hasna/todos", bin: "todos", mcp: "todos-mcp" },
4098
+ { name: "@hasna/mementos", bin: "mementos", mcp: "mementos-mcp" },
4099
+ { name: "@hasna/conversations", bin: "conversations", mcp: "conversations-mcp" },
4100
+ { name: "@hasna/skills", bin: "skills", mcp: "skills-mcp" },
4101
+ { name: "@hasna/economy", bin: "economy", mcp: "economy-mcp" },
4102
+ { name: "@hasna/attachments", bin: "attachments", mcp: "attachments-mcp" },
4103
+ { name: "@hasna/sessions", bin: "sessions", mcp: "sessions-mcp" },
4104
+ { name: "@hasna/emails", bin: "emails", mcp: "emails-mcp" },
4105
+ { name: "@hasna/recordings", bin: "recordings", mcp: "recordings-mcp" },
4106
+ { name: "@hasna/testers", bin: "testers", mcp: "testers-mcp" }
4107
+ ];
4108
+ console.log(chalk.bold("@hasna/configs bootstrap") + chalk.dim(` \u2014 installing ${packages.length} ecosystem packages
4109
+ `));
4110
+ console.log(chalk.cyan("Installing CLI tools:"));
4111
+ for (const pkg2 of packages) {
4112
+ if (opts.dryRun) {
4113
+ console.log(chalk.dim(` would install: ${pkg2.name}`));
4114
+ continue;
4115
+ }
4116
+ try {
4117
+ const proc = Bun.spawn(["bun", "install", "-g", pkg2.name], { stdout: "pipe", stderr: "pipe" });
4118
+ const code = await proc.exited;
4119
+ if (code === 0)
4120
+ console.log(chalk.green(" \u2713 ") + pkg2.name);
4121
+ else
4122
+ console.log(chalk.yellow(" \u26A0 ") + pkg2.name + chalk.dim(" (may already be installed)"));
4123
+ } catch {
4124
+ console.log(chalk.yellow(" \u26A0 ") + pkg2.name + chalk.dim(" (skipped)"));
4125
+ }
4126
+ }
4127
+ if (!opts.skipMcp) {
4128
+ console.log(chalk.cyan(`
4129
+ Registering MCP servers in Claude Code:`));
4130
+ for (const pkg2 of packages) {
4131
+ if (opts.dryRun) {
4132
+ console.log(chalk.dim(` would register: ${pkg2.mcp}`));
4133
+ continue;
4134
+ }
4135
+ try {
4136
+ const proc = Bun.spawn(["claude", "mcp", "add", "--transport", "stdio", "--scope", "user", pkg2.bin, "--", pkg2.mcp], { stdout: "pipe", stderr: "pipe" });
4137
+ const code = await proc.exited;
4138
+ if (code === 0)
4139
+ console.log(chalk.green(" \u2713 ") + pkg2.bin);
4140
+ else
4141
+ console.log(chalk.dim(" = ") + pkg2.bin + chalk.dim(" (already registered)"));
4142
+ } catch {
4143
+ console.log(chalk.yellow(" \u26A0 ") + pkg2.bin + chalk.dim(" (skipped)"));
4144
+ }
4145
+ }
4146
+ }
4147
+ console.log(chalk.cyan(`
4148
+ Initializing configs:`));
4149
+ if (!opts.dryRun) {
4150
+ const result = await syncKnown({});
4151
+ console.log(chalk.green(" \u2713 ") + `Synced ${result.added + result.updated + result.unchanged} known configs`);
4152
+ } else {
4153
+ console.log(chalk.dim(" would run: configs init"));
4154
+ }
4155
+ console.log(chalk.bold(`
4156
+ \u2713 Bootstrap complete.`) + chalk.dim(" Restart Claude Code for MCP servers to activate."));
4157
+ });
4070
4158
  program.command("pull").description("Alias for sync (read from disk into DB)").option("-a, --agent <agent>", "only sync this agent").option("--dry-run", "preview without writing").action(async (opts) => {
4071
4159
  const result = await syncKnown({ dryRun: opts.dryRun, agent: opts.agent });
4072
4160
  console.log(chalk.green("\u2713") + ` Pulled: +${result.added} updated:${result.updated} unchanged:${result.unchanged}`);
package/dist/index.js CHANGED
@@ -785,21 +785,21 @@ var KNOWN_CONFIGS = [
785
785
  { path: "~/.claude/CLAUDE.md", name: "claude-claude-md", category: "rules", agent: "claude", format: "markdown" },
786
786
  { path: "~/.claude/settings.json", name: "claude-settings", category: "agent", agent: "claude", format: "json" },
787
787
  { path: "~/.claude/settings.local.json", name: "claude-settings-local", category: "agent", agent: "claude", format: "json" },
788
- { path: "~/.claude/keybindings.json", name: "claude-keybindings", category: "agent", agent: "claude", format: "json" },
788
+ { path: "~/.claude/keybindings.json", name: "claude-keybindings", category: "agent", agent: "claude", format: "json", optional: true },
789
789
  { path: "~/.claude/rules", name: "claude-rules", category: "rules", agent: "claude", rulesDir: "~/.claude/rules" },
790
790
  { path: "~/.codex/config.toml", name: "codex-config", category: "agent", agent: "codex", format: "toml" },
791
791
  { path: "~/.codex/AGENTS.md", name: "codex-agents-md", category: "rules", agent: "codex", format: "markdown" },
792
792
  { path: "~/.gemini/settings.json", name: "gemini-settings", category: "agent", agent: "gemini", format: "json" },
793
- { path: "~/.gemini/GEMINI.md", name: "gemini-gemini-md", category: "rules", agent: "gemini", format: "markdown" },
793
+ { path: "~/.gemini/GEMINI.md", name: "gemini-gemini-md", category: "rules", agent: "gemini", format: "markdown", optional: true },
794
794
  { path: "~/.claude.json", name: "claude-json", category: "mcp", agent: "claude", format: "json", description: "Claude Code global config (includes MCP server entries)" },
795
795
  { path: "~/.zshrc", name: "zshrc", category: "shell", agent: "zsh" },
796
- { path: "~/.zprofile", name: "zprofile", category: "shell", agent: "zsh" },
797
- { path: "~/.bashrc", name: "bashrc", category: "shell", agent: "zsh" },
798
- { path: "~/.bash_profile", name: "bash-profile", category: "shell", agent: "zsh" },
796
+ { path: "~/.zprofile", name: "zprofile", category: "shell", agent: "zsh", optional: true },
797
+ { path: "~/.bashrc", name: "bashrc", category: "shell", agent: "zsh", optional: true },
798
+ { path: "~/.bash_profile", name: "bash-profile", category: "shell", agent: "zsh", optional: true },
799
799
  { path: "~/.gitconfig", name: "gitconfig", category: "git", agent: "git", format: "ini" },
800
- { path: "~/.gitignore_global", name: "gitignore-global", category: "git", agent: "git" },
800
+ { path: "~/.gitignore_global", name: "gitignore-global", category: "git", agent: "git", optional: true },
801
801
  { path: "~/.npmrc", name: "npmrc", category: "tools", agent: "npm", format: "ini" },
802
- { path: "~/.bunfig.toml", name: "bunfig", category: "tools", agent: "global", format: "toml" }
802
+ { path: "~/.bunfig.toml", name: "bunfig", category: "tools", agent: "global", format: "toml", optional: true }
803
803
  ];
804
804
  async function syncKnown(opts = {}) {
805
805
  const d = opts.db || getDatabase();
@@ -8,6 +8,7 @@ export interface KnownConfig {
8
8
  format?: ConfigFormat;
9
9
  kind?: "file" | "reference";
10
10
  description?: string;
11
+ optional?: boolean;
11
12
  rulesDir?: string;
12
13
  }
13
14
  export declare const KNOWN_CONFIGS: KnownConfig[];
@@ -1 +1 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/lib/sync.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAShD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,CA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WAAW,gBAAgB;IAC/B,EAAE,CAAC,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,wBAAsB,SAAS,CAAC,IAAI,GAAE,gBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,CA4EhF;AAGD,MAAM,WAAW,iBAAiB;IAChC,EAAE,CAAC,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,wBAAsB,UAAU,CAAC,IAAI,GAAE,iBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,CAgBlF;AAGD,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAqBjD;AAGD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAU/D;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CASzD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAQ3D;AAGD,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
package/dist/mcp/index.js CHANGED
@@ -924,21 +924,21 @@ var init_sync = __esm(() => {
924
924
  { path: "~/.claude/CLAUDE.md", name: "claude-claude-md", category: "rules", agent: "claude", format: "markdown" },
925
925
  { path: "~/.claude/settings.json", name: "claude-settings", category: "agent", agent: "claude", format: "json" },
926
926
  { path: "~/.claude/settings.local.json", name: "claude-settings-local", category: "agent", agent: "claude", format: "json" },
927
- { path: "~/.claude/keybindings.json", name: "claude-keybindings", category: "agent", agent: "claude", format: "json" },
927
+ { path: "~/.claude/keybindings.json", name: "claude-keybindings", category: "agent", agent: "claude", format: "json", optional: true },
928
928
  { path: "~/.claude/rules", name: "claude-rules", category: "rules", agent: "claude", rulesDir: "~/.claude/rules" },
929
929
  { path: "~/.codex/config.toml", name: "codex-config", category: "agent", agent: "codex", format: "toml" },
930
930
  { path: "~/.codex/AGENTS.md", name: "codex-agents-md", category: "rules", agent: "codex", format: "markdown" },
931
931
  { path: "~/.gemini/settings.json", name: "gemini-settings", category: "agent", agent: "gemini", format: "json" },
932
- { path: "~/.gemini/GEMINI.md", name: "gemini-gemini-md", category: "rules", agent: "gemini", format: "markdown" },
932
+ { path: "~/.gemini/GEMINI.md", name: "gemini-gemini-md", category: "rules", agent: "gemini", format: "markdown", optional: true },
933
933
  { path: "~/.claude.json", name: "claude-json", category: "mcp", agent: "claude", format: "json", description: "Claude Code global config (includes MCP server entries)" },
934
934
  { path: "~/.zshrc", name: "zshrc", category: "shell", agent: "zsh" },
935
- { path: "~/.zprofile", name: "zprofile", category: "shell", agent: "zsh" },
936
- { path: "~/.bashrc", name: "bashrc", category: "shell", agent: "zsh" },
937
- { path: "~/.bash_profile", name: "bash-profile", category: "shell", agent: "zsh" },
935
+ { path: "~/.zprofile", name: "zprofile", category: "shell", agent: "zsh", optional: true },
936
+ { path: "~/.bashrc", name: "bashrc", category: "shell", agent: "zsh", optional: true },
937
+ { path: "~/.bash_profile", name: "bash-profile", category: "shell", agent: "zsh", optional: true },
938
938
  { path: "~/.gitconfig", name: "gitconfig", category: "git", agent: "git", format: "ini" },
939
- { path: "~/.gitignore_global", name: "gitignore-global", category: "git", agent: "git" },
939
+ { path: "~/.gitignore_global", name: "gitignore-global", category: "git", agent: "git", optional: true },
940
940
  { path: "~/.npmrc", name: "npmrc", category: "tools", agent: "npm", format: "ini" },
941
- { path: "~/.bunfig.toml", name: "bunfig", category: "tools", agent: "global", format: "toml" }
941
+ { path: "~/.bunfig.toml", name: "bunfig", category: "tools", agent: "global", format: "toml", optional: true }
942
942
  ];
943
943
  PROJECT_CONFIG_FILES = [
944
944
  { file: "CLAUDE.md", category: "rules", agent: "claude", format: "markdown" },
@@ -2345,21 +2345,21 @@ var KNOWN_CONFIGS = [
2345
2345
  { path: "~/.claude/CLAUDE.md", name: "claude-claude-md", category: "rules", agent: "claude", format: "markdown" },
2346
2346
  { path: "~/.claude/settings.json", name: "claude-settings", category: "agent", agent: "claude", format: "json" },
2347
2347
  { path: "~/.claude/settings.local.json", name: "claude-settings-local", category: "agent", agent: "claude", format: "json" },
2348
- { path: "~/.claude/keybindings.json", name: "claude-keybindings", category: "agent", agent: "claude", format: "json" },
2348
+ { path: "~/.claude/keybindings.json", name: "claude-keybindings", category: "agent", agent: "claude", format: "json", optional: true },
2349
2349
  { path: "~/.claude/rules", name: "claude-rules", category: "rules", agent: "claude", rulesDir: "~/.claude/rules" },
2350
2350
  { path: "~/.codex/config.toml", name: "codex-config", category: "agent", agent: "codex", format: "toml" },
2351
2351
  { path: "~/.codex/AGENTS.md", name: "codex-agents-md", category: "rules", agent: "codex", format: "markdown" },
2352
2352
  { path: "~/.gemini/settings.json", name: "gemini-settings", category: "agent", agent: "gemini", format: "json" },
2353
- { path: "~/.gemini/GEMINI.md", name: "gemini-gemini-md", category: "rules", agent: "gemini", format: "markdown" },
2353
+ { path: "~/.gemini/GEMINI.md", name: "gemini-gemini-md", category: "rules", agent: "gemini", format: "markdown", optional: true },
2354
2354
  { path: "~/.claude.json", name: "claude-json", category: "mcp", agent: "claude", format: "json", description: "Claude Code global config (includes MCP server entries)" },
2355
2355
  { path: "~/.zshrc", name: "zshrc", category: "shell", agent: "zsh" },
2356
- { path: "~/.zprofile", name: "zprofile", category: "shell", agent: "zsh" },
2357
- { path: "~/.bashrc", name: "bashrc", category: "shell", agent: "zsh" },
2358
- { path: "~/.bash_profile", name: "bash-profile", category: "shell", agent: "zsh" },
2356
+ { path: "~/.zprofile", name: "zprofile", category: "shell", agent: "zsh", optional: true },
2357
+ { path: "~/.bashrc", name: "bashrc", category: "shell", agent: "zsh", optional: true },
2358
+ { path: "~/.bash_profile", name: "bash-profile", category: "shell", agent: "zsh", optional: true },
2359
2359
  { path: "~/.gitconfig", name: "gitconfig", category: "git", agent: "git", format: "ini" },
2360
- { path: "~/.gitignore_global", name: "gitignore-global", category: "git", agent: "git" },
2360
+ { path: "~/.gitignore_global", name: "gitignore-global", category: "git", agent: "git", optional: true },
2361
2361
  { path: "~/.npmrc", name: "npmrc", category: "tools", agent: "npm", format: "ini" },
2362
- { path: "~/.bunfig.toml", name: "bunfig", category: "tools", agent: "global", format: "toml" }
2362
+ { path: "~/.bunfig.toml", name: "bunfig", category: "tools", agent: "global", format: "toml", optional: true }
2363
2363
  ];
2364
2364
  async function syncKnown(opts = {}) {
2365
2365
  const d = opts.db || getDatabase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/configs",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "AI coding agent configuration manager — store, version, apply, and share all your AI coding configs. CLI + MCP + REST API + Dashboard.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",