@hasna/configs 0.2.8 → 0.2.10

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
@@ -2364,6 +2364,11 @@ function updateConfig(idOrSlug, input, db) {
2364
2364
  d.run(`UPDATE configs SET ${updates.join(", ")} WHERE id = ?`, params);
2365
2365
  return getConfigById(existing.id, d);
2366
2366
  }
2367
+ function deleteConfig(idOrSlug, db) {
2368
+ const d = db || getDatabase();
2369
+ const existing = getConfig(idOrSlug, d);
2370
+ d.run("DELETE FROM configs WHERE id = ?", [existing.id]);
2371
+ }
2367
2372
  function getConfigStats(db) {
2368
2373
  const d = db || getDatabase();
2369
2374
  const rows = d.query("SELECT category, COUNT(*) as count FROM configs GROUP BY category").all();
@@ -2994,21 +2999,21 @@ var init_sync = __esm(() => {
2994
2999
  { path: "~/.claude/CLAUDE.md", name: "claude-claude-md", category: "rules", agent: "claude", format: "markdown" },
2995
3000
  { path: "~/.claude/settings.json", name: "claude-settings", category: "agent", agent: "claude", format: "json" },
2996
3001
  { 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" },
3002
+ { path: "~/.claude/keybindings.json", name: "claude-keybindings", category: "agent", agent: "claude", format: "json", optional: true },
2998
3003
  { path: "~/.claude/rules", name: "claude-rules", category: "rules", agent: "claude", rulesDir: "~/.claude/rules" },
2999
3004
  { path: "~/.codex/config.toml", name: "codex-config", category: "agent", agent: "codex", format: "toml" },
3000
3005
  { path: "~/.codex/AGENTS.md", name: "codex-agents-md", category: "rules", agent: "codex", format: "markdown" },
3001
3006
  { 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" },
3007
+ { path: "~/.gemini/GEMINI.md", name: "gemini-gemini-md", category: "rules", agent: "gemini", format: "markdown", optional: true },
3003
3008
  { path: "~/.claude.json", name: "claude-json", category: "mcp", agent: "claude", format: "json", description: "Claude Code global config (includes MCP server entries)" },
3004
3009
  { 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" },
3010
+ { path: "~/.zprofile", name: "zprofile", category: "shell", agent: "zsh", optional: true },
3011
+ { path: "~/.bashrc", name: "bashrc", category: "shell", agent: "zsh", optional: true },
3012
+ { path: "~/.bash_profile", name: "bash-profile", category: "shell", agent: "zsh", optional: true },
3008
3013
  { path: "~/.gitconfig", name: "gitconfig", category: "git", agent: "git", format: "ini" },
3009
- { path: "~/.gitignore_global", name: "gitignore-global", category: "git", agent: "git" },
3014
+ { path: "~/.gitignore_global", name: "gitignore-global", category: "git", agent: "git", optional: true },
3010
3015
  { path: "~/.npmrc", name: "npmrc", category: "tools", agent: "npm", format: "ini" },
3011
- { path: "~/.bunfig.toml", name: "bunfig", category: "tools", agent: "global", format: "toml" }
3016
+ { path: "~/.bunfig.toml", name: "bunfig", category: "tools", agent: "global", format: "toml", optional: true }
3012
3017
  ];
3013
3018
  PROJECT_CONFIG_FILES = [
3014
3019
  { file: "CLAUDE.md", category: "rules", agent: "claude", format: "markdown" },
@@ -3930,12 +3935,13 @@ program.command("doctor").description("Validate configs: syntax, permissions, mi
3930
3935
  };
3931
3936
  console.log(chalk.bold(`Config Doctor
3932
3937
  `));
3938
+ const skip = (msg) => console.log(chalk.dim(" - ") + chalk.dim(msg));
3933
3939
  console.log(chalk.cyan("Known files on disk:"));
3934
3940
  for (const k of KNOWN_CONFIGS) {
3935
3941
  if (k.rulesDir) {
3936
- existsSync7(expandPath(k.rulesDir)) ? pass(`${k.rulesDir}/ exists`) : fail(`${k.rulesDir}/ not found`);
3942
+ existsSync7(expandPath(k.rulesDir)) ? pass(`${k.rulesDir}/ exists`) : k.optional ? skip(`${k.rulesDir}/ (optional)`) : fail(`${k.rulesDir}/ not found`);
3937
3943
  } else {
3938
- existsSync7(expandPath(k.path)) ? pass(k.path) : fail(`${k.path} not found`);
3944
+ existsSync7(expandPath(k.path)) ? pass(k.path) : k.optional ? skip(`${k.path} (optional)`) : fail(`${k.path} not found`);
3939
3945
  }
3940
3946
  }
3941
3947
  const allConfigs = listConfigs();
@@ -4082,15 +4088,122 @@ program.command("watch").description("Watch known config files for changes and a
4082
4088
  mtimes.set(abs, newMtime);
4083
4089
  }
4084
4090
  }
4091
+ const { readdirSync: rd } = await import("fs");
4092
+ for (const k of KNOWN_CONFIGS) {
4093
+ if (k.rulesDir) {
4094
+ const absDir = expandPath2(k.rulesDir);
4095
+ if (!existsSync7(absDir))
4096
+ continue;
4097
+ for (const f of rd(absDir).filter((f2) => f2.endsWith(".md"))) {
4098
+ const abs = join6(absDir, f);
4099
+ if (!mtimes.has(abs)) {
4100
+ mtimes.set(abs, st(abs).mtimeMs);
4101
+ changed++;
4102
+ }
4103
+ }
4104
+ } else {
4105
+ const abs = expandPath2(k.path);
4106
+ if (existsSync7(abs) && !mtimes.has(abs)) {
4107
+ mtimes.set(abs, st(abs).mtimeMs);
4108
+ changed++;
4109
+ }
4110
+ }
4111
+ }
4085
4112
  if (changed > 0) {
4086
4113
  const result = await syncKnown({});
4087
4114
  const ts = new Date().toLocaleTimeString();
4088
- console.log(`${chalk.dim(ts)} ${chalk.green("\u2713")} ${changed} file(s) changed \u2192 synced +${result.added} updated:${result.updated}`);
4115
+ console.log(`${chalk.dim(ts)} ${chalk.green("\u2713")} ${changed} file(s) changed/new \u2192 synced +${result.added} updated:${result.updated}`);
4089
4116
  }
4090
4117
  };
4091
4118
  setInterval(tick, interval);
4092
4119
  await new Promise(() => {});
4093
4120
  });
4121
+ program.command("clean").description("Remove configs from DB whose target files no longer exist on disk").option("--dry-run", "show what would be removed").action(async (opts) => {
4122
+ const configs = listConfigs({ kind: "file" });
4123
+ let removed = 0;
4124
+ for (const c of configs) {
4125
+ if (!c.target_path)
4126
+ continue;
4127
+ const abs = expandPath(c.target_path);
4128
+ if (!existsSync7(abs)) {
4129
+ if (opts.dryRun) {
4130
+ console.log(chalk.yellow(" would remove:") + ` ${c.slug} ${chalk.dim(`(${c.target_path})`)}`);
4131
+ } else {
4132
+ deleteConfig(c.id);
4133
+ console.log(chalk.red(" removed:") + ` ${c.slug} ${chalk.dim(`(${c.target_path})`)}`);
4134
+ }
4135
+ removed++;
4136
+ }
4137
+ }
4138
+ if (removed === 0)
4139
+ console.log(chalk.green("\u2713") + " All stored configs still exist on disk.");
4140
+ else
4141
+ console.log(chalk.dim(`
4142
+ ${removed} orphaned config(s) ${opts.dryRun ? "found" : "removed"}`));
4143
+ });
4144
+ 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) => {
4145
+ const packages = [
4146
+ { name: "@hasna/todos", bin: "todos", mcp: "todos-mcp" },
4147
+ { name: "@hasna/mementos", bin: "mementos", mcp: "mementos-mcp" },
4148
+ { name: "@hasna/conversations", bin: "conversations", mcp: "conversations-mcp" },
4149
+ { name: "@hasna/skills", bin: "skills", mcp: "skills-mcp" },
4150
+ { name: "@hasna/economy", bin: "economy", mcp: "economy-mcp" },
4151
+ { name: "@hasna/attachments", bin: "attachments", mcp: "attachments-mcp" },
4152
+ { name: "@hasna/sessions", bin: "sessions", mcp: "sessions-mcp" },
4153
+ { name: "@hasna/emails", bin: "emails", mcp: "emails-mcp" },
4154
+ { name: "@hasna/recordings", bin: "recordings", mcp: "recordings-mcp" },
4155
+ { name: "@hasna/testers", bin: "testers", mcp: "testers-mcp" }
4156
+ ];
4157
+ console.log(chalk.bold("@hasna/configs bootstrap") + chalk.dim(` \u2014 installing ${packages.length} ecosystem packages
4158
+ `));
4159
+ console.log(chalk.cyan("Installing CLI tools:"));
4160
+ for (const pkg2 of packages) {
4161
+ if (opts.dryRun) {
4162
+ console.log(chalk.dim(` would install: ${pkg2.name}`));
4163
+ continue;
4164
+ }
4165
+ try {
4166
+ const proc = Bun.spawn(["bun", "install", "-g", pkg2.name], { stdout: "pipe", stderr: "pipe" });
4167
+ const code = await proc.exited;
4168
+ if (code === 0)
4169
+ console.log(chalk.green(" \u2713 ") + pkg2.name);
4170
+ else
4171
+ console.log(chalk.yellow(" \u26A0 ") + pkg2.name + chalk.dim(" (may already be installed)"));
4172
+ } catch {
4173
+ console.log(chalk.yellow(" \u26A0 ") + pkg2.name + chalk.dim(" (skipped)"));
4174
+ }
4175
+ }
4176
+ if (!opts.skipMcp) {
4177
+ console.log(chalk.cyan(`
4178
+ Registering MCP servers in Claude Code:`));
4179
+ for (const pkg2 of packages) {
4180
+ if (opts.dryRun) {
4181
+ console.log(chalk.dim(` would register: ${pkg2.mcp}`));
4182
+ continue;
4183
+ }
4184
+ try {
4185
+ const proc = Bun.spawn(["claude", "mcp", "add", "--transport", "stdio", "--scope", "user", pkg2.bin, "--", pkg2.mcp], { stdout: "pipe", stderr: "pipe" });
4186
+ const code = await proc.exited;
4187
+ if (code === 0)
4188
+ console.log(chalk.green(" \u2713 ") + pkg2.bin);
4189
+ else
4190
+ console.log(chalk.dim(" = ") + pkg2.bin + chalk.dim(" (already registered)"));
4191
+ } catch {
4192
+ console.log(chalk.yellow(" \u26A0 ") + pkg2.bin + chalk.dim(" (skipped)"));
4193
+ }
4194
+ }
4195
+ }
4196
+ console.log(chalk.cyan(`
4197
+ Initializing configs:`));
4198
+ if (!opts.dryRun) {
4199
+ const result = await syncKnown({});
4200
+ console.log(chalk.green(" \u2713 ") + `Synced ${result.added + result.updated + result.unchanged} known configs`);
4201
+ } else {
4202
+ console.log(chalk.dim(" would run: configs init"));
4203
+ }
4204
+ console.log(chalk.bold(`
4205
+ \u2713 Bootstrap complete.`) + chalk.dim(" Restart Claude Code for MCP servers to activate."));
4206
+ });
4094
4207
  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) => {
4095
4208
  const result = await syncKnown({ dryRun: opts.dryRun, agent: opts.agent });
4096
4209
  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,CAAC,EAAE,YAAY,CAAC;IACtB,IAAI,CA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AE,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.8",
3
+ "version": "0.2.10",
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",