@alessandroraffa/tangyr 0.10.1 → 0.11.0

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 CHANGED
@@ -107,13 +107,24 @@ claudeCodeGlobalPaths:
107
107
  - ~/.claude-work
108
108
  ```
109
109
 
110
- **Via CLI flag** (repeatable, overrides the config field):
110
+ **Via environment variable** (`TANGYR_CLAUDE_CONFIG_DIRS`):
111
+
112
+ A colon-separated list of Claude Code global root directories. Entries support `~/` expansion. This layer is designed for machine-specific configuration that must not be committed to a shared kit config.
113
+
114
+ ```sh
115
+ export TANGYR_CLAUDE_CONFIG_DIRS="~/.claude:~/.claude-work"
116
+ tangyr sync
117
+ ```
118
+
119
+ Auto-sync use case: if a kit-change hook or automation runs `tangyr sync`, exporting `TANGYR_CLAUDE_CONFIG_DIRS` in the shell environment keeps multiple Claude configs in sync automatically — without putting machine-specific paths in a shared `tangyr.config.yaml`.
120
+
121
+ **Via CLI flag** (repeatable):
111
122
 
112
123
  ```sh
113
124
  tangyr sync --claude-config-dir ~/.claude --claude-config-dir ~/.claude-work
114
125
  ```
115
126
 
116
- Precedence: `--claude-config-dir` flag > `claudeCodeGlobalPaths` in config > default `~/.claude`.
127
+ Precedence: `--claude-config-dir` flag > `TANGYR_CLAUDE_CONFIG_DIRS` env > `claudeCodeGlobalPaths` in config > default `~/.claude`.
117
128
 
118
129
  Per-root artifacts (instructions, agents, skills, commands, rules, output-styles, hooks settings) are written under each root. Shared artifacts (`~/.claude.json` for MCP, `~/.agents/hooks` for hooks) are resolved from the platform default and written once regardless of how many roots are configured.
119
130
 
package/dist/index.js CHANGED
@@ -15644,8 +15644,12 @@ function resolveClineProfile(scope, projectRoot, mappings) {
15644
15644
  };
15645
15645
  }
15646
15646
  var DEFAULT_CLAUDE_ROOT_RAW = "~/.claude";
15647
+ function parseEnvDirs(raw) {
15648
+ return raw.split(":").map((s) => s.trim()).filter((s) => s.length > 0);
15649
+ }
15647
15650
  function resolveClaudeGlobalRoots(input) {
15648
- const rawRoots = (input.flag?.length ?? 0) > 0 ? input.flag : (input.config?.length ?? 0) > 0 ? input.config : [DEFAULT_CLAUDE_ROOT_RAW];
15651
+ const envEntries = input.env !== void 0 ? parseEnvDirs(input.env) : void 0;
15652
+ const rawRoots = (input.flag?.length ?? 0) > 0 ? input.flag : envEntries !== void 0 && envEntries.length > 0 ? envEntries : (input.config?.length ?? 0) > 0 ? input.config : [DEFAULT_CLAUDE_ROOT_RAW];
15649
15653
  const seen = /* @__PURE__ */ new Set();
15650
15654
  const roots = [];
15651
15655
  for (const raw of rawRoots) {
@@ -26497,6 +26501,7 @@ function installForTool(tool, config, kitInfo, manifest, options, mappings, logg
26497
26501
  );
26498
26502
  const claudeRoots = scope === "global" && mappings ? resolveClaudeGlobalRoots({
26499
26503
  flag: options.claudeConfigDir,
26504
+ env: process.env.TANGYR_CLAUDE_CONFIG_DIRS,
26500
26505
  config: config.claudeCodeGlobalPaths
26501
26506
  }) : void 0;
26502
26507
  let count = 0;
@@ -28869,6 +28874,7 @@ function runSyncCommand(options, logger) {
28869
28874
  const allMappings = mappings ?? (targets.includes("claude-code") ? loadMappings(sourceRoot, config, configDir) : void 0);
28870
28875
  const claudeRoots = targets.includes("claude-code") && syncOptions.scope === "global" && allMappings ? resolveClaudeGlobalRoots({
28871
28876
  flag: options.claudeConfigDir,
28877
+ env: process.env.TANGYR_CLAUDE_CONFIG_DIRS,
28872
28878
  config: config.claudeCodeGlobalPaths
28873
28879
  }) : void 0;
28874
28880
  for (const target of targets) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alessandroraffa/tangyr",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "description": "CLI for the Tangyr discipline — install and manage operating kits for AI coding tools",
5
5
  "license": "MIT",
6
6
  "type": "module",