enigma-cli 1.6.9 → 1.7.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
@@ -8,12 +8,24 @@ committed.
8
8
 
9
9
  ## Install
10
10
 
11
+ One command, no global install, no prompts - deploy the skills to every supported
12
+ agent at user level:
13
+
14
+ ```bash
15
+ npx enigma-cli@latest install --all --yes
16
+ ```
17
+
18
+ Or install the command and pick interactively:
19
+
11
20
  ```bash
12
21
  npm install -g enigma-cli # provides the `enigma` command
13
- enigma # interactive: pick what to set up
22
+ enigma # interactive hub: pick what to set up
14
23
  ```
15
24
 
16
- Or run once without installing: `npx enigma-cli`.
25
+ That first install is the only one you ever need to run by hand: afterwards,
26
+ launching a tool through enigma (e.g. `enigma claude`) auto-syncs the deployed
27
+ skills and memory with the installed package version (see
28
+ [Auto-sync](#auto-sync-on-launch)).
17
29
 
18
30
  ## Commands
19
31
 
@@ -23,7 +35,8 @@ enigma install Install/update agent skills
23
35
  enigma security Set up git security hooks in the current repo
24
36
  enigma guard [--all] Run the commit guard (staged files, or all tracked)
25
37
  enigma config [k v] Show or set runtime toggles (e.g. config commit-emoji off)
26
- enigma claude [acct] Launch Claude Code using an account (active if omitted)
38
+ enigma claude [acct] Launch Claude Code using an account (active if omitted);
39
+ auto-syncs deployed skills first
27
40
  enigma account ... Manage Claude Code accounts (list/add/use/login/remove)
28
41
  enigma seal Maintenance: (re)compute skill content hashes
29
42
  enigma check Integrity gate: verify skills are well-formed and sealed
@@ -45,6 +58,29 @@ preselects them; `--all` targets every supported agent.
45
58
 
46
59
  (`--local` installs into the current project instead.)
47
60
 
61
+ ## Auto-sync on launch
62
+
63
+ After the first `enigma install`, you never need to run it again: whenever you
64
+ launch a tool through enigma (`enigma claude`, `enigma account run work`), enigma
65
+ first compares the deployed skills/memory against the installed package version
66
+ and silently refreshes anything that changed (new skills, updated versions,
67
+ removed skills, memory-file edits). On by default; opt out with:
68
+
69
+ ```bash
70
+ enigma config auto-sync off
71
+ ```
72
+
73
+ Auto-sync is deliberately conservative:
74
+
75
+ - It only touches agents/scopes that **already have** a deployment - it never
76
+ performs a first install (that stays your explicit `enigma install`).
77
+ - Skills you modified locally are **never overwritten** (same rule as
78
+ `--keep-modified`).
79
+ - The memory file (`CLAUDE.md` / `AGENTS.md`) is only rewritten when it is
80
+ byte-identical to what enigma last wrote (tracked in `~/.enigma/state.json`) -
81
+ a file you authored or edited is never touched.
82
+ - A sync failure never blocks the launch; the tool starts anyway.
83
+
48
84
  ## Git security hooks
49
85
 
50
86
  `enigma security` drops a portable, dependency-free commit guard into any repo:
@@ -110,6 +146,21 @@ The mechanism is tool-agnostic by design: only Claude Code is wired up today, bu
110
146
  the same per-account-config-dir approach extends to other agents (e.g. Codex via
111
147
  `CODEX_HOME`). Target another tool with `--tool <name>` on `account` commands.
112
148
 
149
+ ## GitHub CLI telemetry (default off)
150
+
151
+ If the GitHub CLI (`gh`) is installed, `enigma install` disables its usage
152
+ telemetry (`gh config set telemetry disabled`). This is pure privacy upside -
153
+ telemetry is usage analytics only (command, flags, OS/version, device ids) and
154
+ no gh feature depends on it - and it also avoids a known Windows bug where the
155
+ detached `gh send-telemetry` subprocess spawns `tzutil.exe` without hiding its
156
+ window, flashing a terminal on gh invocations
157
+ ([cli/cli#13354](https://github.com/cli/cli/issues/13354)). Re-enable any time:
158
+
159
+ ```bash
160
+ enigma config gh-telemetry on # restore gh's default
161
+ enigma config gh-telemetry off # disable again
162
+ ```
163
+
113
164
  ## Commit emojis
114
165
 
115
166
  By default the policy skills make commit subjects carry a leading type emoji
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Backend/API architecture: controller-service-repository layering, API and request optimization, server-side caching (Redis), and Zod boundary validation.",
6
- "cliVersion": "1.6.9",
6
+ "cliVersion": "1.7.0",
7
7
  "sha": "c442bc9e39a7710cb709ef2abb8d15ecd8aa16ed4f5c8af92b7af6877401cba4"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.1.1",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Ciphera code style conventions (formatting, naming, imports, comments, code-level anti-patterns; TypeScript-first, language-agnostic).",
6
- "cliVersion": "1.6.9",
6
+ "cliVersion": "1.7.0",
7
7
  "sha": "74f638aec13e8c93257fe1ad604c28b07e9a7c456796a4ceefcc99217d9e7039"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Pre-delivery self-review gate, prioritized review dimensions, and change-quality criteria.",
6
- "cliVersion": "1.6.9",
6
+ "cliVersion": "1.7.0",
7
7
  "sha": "3d3bbe0602d5bbb4afe37648fe3c2fa39376b1bcbac5d8c441f01fad1e866ed0"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.4.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Core engineering execution policy and harness orchestration (highest-authority rules).",
6
- "cliVersion": "1.6.9",
6
+ "cliVersion": "1.7.0",
7
7
  "sha": "c9c69c59516794311cb7b306ed4d4ad971824de3689a39c2b86c7669c73f2e8b"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.1.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Senior database architecture policy: query optimization, anti-duplication/normalization, scalability, and RGPD/GDPR encryption.",
6
- "cliVersion": "1.6.9",
6
+ "cliVersion": "1.7.0",
7
7
  "sha": "2883bcecb3202683ae6f81b073c3d6a9cec9c55029e011bdd06ba7ac3537297e"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Reproduce-isolate-fix debugging methodology with root-cause discipline and regression verification.",
6
- "cliVersion": "1.6.9",
6
+ "cliVersion": "1.7.0",
7
7
  "sha": "14b0064c8b33a0dc85e51464b05005cf5801c756b1101789a6924b9548420f6b"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Dependency and supply-chain security: lockfiles and reproducible installs, version pinning, vulnerability auditing, vetting/minimizing packages, vendoring, and SBOM/provenance.",
6
- "cliVersion": "1.6.9",
6
+ "cliVersion": "1.7.0",
7
7
  "sha": "6375d835c2aef2c9bd31ce116444dc3d796f510f9970a213aa3ac4696d7e21b9"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.1.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Frontend architecture: reusable components, abstraction thresholds, state management, and optimistic UI with rollback.",
6
- "cliVersion": "1.6.9",
6
+ "cliVersion": "1.7.0",
7
7
  "sha": "33fa1e9f667ef26203a3d6c892121efe12b0cddb706c195492fa97e080fba115"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.2.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Git & contribution policy (senior engineering standards).",
6
- "cliVersion": "1.6.9",
6
+ "cliVersion": "1.7.0",
7
7
  "sha": "ada4b7eb5bb7e013429e23703c271c0f34b0d76327c059efa148ea2794f96178"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Application and AI-agent security: secrets, authn/authz (least privilege), OWASP Top 10, transport/crypto baseline, secure logging, and agent/MCP/tool-use safety.",
6
- "cliVersion": "1.6.9",
6
+ "cliVersion": "1.7.0",
7
7
  "sha": "9971e9d9127397d0152e89d24aad3191e2935e55a8483db7fd15f5d4d7a60e7a"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Test strategy, coverage gates, deterministic tests, mocking discipline, and regression-first bug fixing.",
6
- "cliVersion": "1.6.9",
6
+ "cliVersion": "1.7.0",
7
7
  "sha": "d19fa8ec7985ed231478be504d3c80360897f555d0bc0624bea19c091f459fb0"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Strict frontend + backend schema validation, schema consistency, and safe client-facing error handling.",
6
- "cliVersion": "1.6.9",
6
+ "cliVersion": "1.7.0",
7
7
  "sha": "a33622a2f810ee4cea39824cb1a7ca34b355a917d4224025df50d77dd74f0b3a"
8
8
  }
@@ -1,6 +1,6 @@
1
1
  {
2
- "enigma-darwin-arm64": "57310bf3dab21a5c2ba6c82e49d26d946373aa921a987c6e5fb9fbbf5ee4550f",
3
- "enigma-linux-arm64": "88caa899230e94cac5d64d6aaab2c152bf45a730ed658a1121c98e187606fb0d",
4
- "enigma-linux-x64": "0712bb2983ebb63d7b3bdbef94eb123af6531683f70e58e443a51ef6a2a0c010",
5
- "enigma-win32-x64.exe": "003dbd8071d188931c83f7abe81f05ebab575a70b1844d1d36462a7ffce7f840"
2
+ "enigma-darwin-arm64": "772de23d6f9a752cdc138d8fdc009ab9d49397e489e91b18d8c655e840c5d40c",
3
+ "enigma-linux-arm64": "29a19f50fe2468c59f01c8b934f729d78fb7c9df1fed89941fab318cb0e02659",
4
+ "enigma-linux-x64": "96d2da3190504ecd78ba6a06e17d893662a93cd4eacd6946b68b5669f945f034",
5
+ "enigma-win32-x64.exe": "2ea53901a4b7a7ddb845b91122bbd248bcc82bd6fed335e712aa6e1e8f9f4af1"
6
6
  }
package/bin/download.mjs CHANGED
@@ -11,10 +11,10 @@
11
11
  * Used by bin/postinstall.mjs (at install) and bin/enigma.mjs (lazy, first run when
12
12
  * install scripts were skipped). Node builtins only.
13
13
  */
14
-
14
+ import { dirname } from "node:path";
15
15
  import { createHash } from "node:crypto";
16
16
  import { chmodSync, existsSync, mkdirSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
17
- import { dirname } from "node:path";
17
+
18
18
  import {
19
19
  ARCH,
20
20
  PLATFORM,
@@ -23,7 +23,7 @@ import {
23
23
  isWindows,
24
24
  loadChecksums,
25
25
  packageVersion,
26
- platformKeys,
26
+ platformKeys
27
27
  } from "./platform.mjs";
28
28
 
29
29
  const DEFAULT_BASE = "https://github.com/FJRG2007/enigma/releases/download";
@@ -37,7 +37,7 @@ function selectAsset() {
37
37
  if (checksums[asset]) return { asset, sha256: checksums[asset] };
38
38
  }
39
39
  return null;
40
- }
40
+ };
41
41
 
42
42
  /** Resolve the release-asset URL, allowing an env override for mirrors/tests. */
43
43
  function assetUrl(asset) {
@@ -45,13 +45,13 @@ function assetUrl(asset) {
45
45
  const url = `${base}/${asset}`;
46
46
  if (!url.startsWith("https://")) throw new Error(`Refusing non-HTTPS download URL: ${url}`);
47
47
  return url;
48
- }
48
+ };
49
49
 
50
50
  /** Returns the installed binary path if already present, else null. */
51
51
  export function installedBinary() {
52
52
  const target = binTargetPath();
53
53
  return existsSync(target) ? target : null;
54
- }
54
+ };
55
55
 
56
56
  /**
57
57
  * Download, verify and atomically install the binary. Returns its path.
@@ -59,10 +59,7 @@ export function installedBinary() {
59
59
  */
60
60
  export async function downloadBinary({ log = () => {} } = {}) {
61
61
  const choice = selectAsset();
62
- if (!choice) {
63
- const tried = platformKeys().map(assetName).join(", ") || `${PLATFORM}-${ARCH}`;
64
- throw new Error(`No prebuilt enigma binary is available for this platform (looked for: ${tried}).`);
65
- }
62
+ if (!choice) throw new Error(`No prebuilt enigma binary is available for this platform (looked for: ${platformKeys().map(assetName).join(", ") || `${PLATFORM}-${ARCH}`}).`);
66
63
 
67
64
  const url = assetUrl(choice.asset);
68
65
  log(`Downloading ${choice.asset}...`);
@@ -79,20 +76,16 @@ export async function downloadBinary({ log = () => {} } = {}) {
79
76
  }
80
77
 
81
78
  const actual = createHash("sha256").update(buffer).digest("hex");
82
- if (actual !== choice.sha256) {
83
- throw new Error(`Checksum mismatch for ${choice.asset}: expected ${choice.sha256}, got ${actual}.`);
84
- }
85
-
79
+ if (actual !== choice.sha256) throw new Error(`Checksum mismatch for ${choice.asset}: expected ${choice.sha256}, got ${actual}.`);
80
+
86
81
  const target = binTargetPath();
87
82
  mkdirSync(dirname(target), { recursive: true });
88
83
  const tmp = `${target}.download-${process.pid}`;
89
84
  writeFileSync(tmp, buffer);
90
85
  if (!isWindows) chmodSync(tmp, 0o755);
91
86
  // rename is atomic on POSIX; on Windows it fails over an existing file, so drop it first.
92
- if (existsSync(target)) {
93
- try { unlinkSync(target); } catch { /* in use; rename will surface the error */ }
94
- }
87
+ if (existsSync(target)) try { unlinkSync(target); } catch { /* in use; rename will surface the error */ }
95
88
  renameSync(tmp, target);
96
89
  log(`Installed ${choice.asset} -> ${target}`);
97
90
  return target;
98
- }
91
+ };
package/bin/enigma.mjs CHANGED
@@ -39,7 +39,7 @@ function readOutputStyle() {
39
39
  } catch { /* missing/invalid .enigma.json - ignore */ }
40
40
  }
41
41
  return style;
42
- }
42
+ };
43
43
  if (process.argv[2] === "statusline") {
44
44
  try {
45
45
  const style = readOutputStyle();
@@ -56,7 +56,7 @@ async function resolveBinary() {
56
56
  if (existing) return existing;
57
57
  // Lazy path (e.g. `npm i --ignore-scripts`): fetch + verify before first use.
58
58
  return downloadBinary({ log: (message) => process.stderr.write(`enigma: ${message}\n`) });
59
- }
59
+ };
60
60
 
61
61
  let binary;
62
62
  try {
@@ -93,4 +93,4 @@ child.on("exit", (code) => {
93
93
  // can hang up (close) the controlling terminal. A signal exit from the interactive
94
94
  // binary - e.g. quitting the TUI - is treated as a clean exit.
95
95
  process.exit(code ?? 0);
96
- });
96
+ });
package/bin/platform.mjs CHANGED
@@ -11,10 +11,10 @@
11
11
  * path. Node builtins only - no dependencies (it runs during install).
12
12
  */
13
13
 
14
- import { existsSync, readFileSync } from "node:fs";
15
- import { dirname, join } from "node:path";
16
- import { fileURLToPath } from "node:url";
17
14
  import os from "node:os";
15
+ import { fileURLToPath } from "node:url";
16
+ import { dirname, join } from "node:path";
17
+ import { existsSync, readFileSync } from "node:fs";
18
18
 
19
19
  // npm/Node "os" identifiers (win32, not "windows"); kept stable across the toolchain.
20
20
  const PLATFORMS = { win32: "win32", darwin: "darwin", linux: "linux" };
@@ -37,7 +37,7 @@ function isMusl() {
37
37
  } catch {
38
38
  return false;
39
39
  }
40
- }
40
+ };
41
41
 
42
42
  /**
43
43
  * Ordered platform keys to try for this host, most specific first. The downloader
@@ -49,22 +49,22 @@ export function platformKeys() {
49
49
  const base = `${PLATFORM}-${ARCH}`;
50
50
  if (PLATFORM === "linux" && isMusl()) return [`${base}-musl`, base];
51
51
  return [base];
52
- }
52
+ };
53
53
 
54
54
  /** Release asset name for a platform key, e.g. "enigma-win32-x64.exe". */
55
55
  export function assetName(key) {
56
56
  return `enigma-${key}${isWindows ? ".exe" : ""}`;
57
- }
57
+ };
58
58
 
59
59
  /** On-disk path of the installed binary inside this package's bin/ directory. */
60
60
  export function binTargetPath() {
61
61
  return join(pkgRoot, "bin", isWindows ? "enigma-bin.exe" : "enigma-bin");
62
- }
62
+ };
63
63
 
64
64
  /** This package's declared version (release tag is `v<version>`). */
65
65
  export function packageVersion() {
66
66
  return JSON.parse(readFileSync(join(pkgRoot, "package.json"), "utf8")).version;
67
- }
67
+ };
68
68
 
69
69
  /** Parsed bin/checksums.json (asset name -> sha256 hex), or {} if absent. */
70
70
  export function loadChecksums() {
@@ -75,4 +75,4 @@ export function loadChecksums() {
75
75
  } catch {
76
76
  return {};
77
77
  }
78
- }
78
+ };
@@ -19,6 +19,13 @@ async function main() {
19
19
 
20
20
  try {
21
21
  await downloadBinary({ log: (message) => process.stdout.write(`enigma: ${message}\n`) });
22
+ // Next-step hint: the binary is ready, but skills only deploy when the user
23
+ // asks (explicit consent for writes to agent config dirs). After that first
24
+ // install, launching a tool via enigma keeps the deployment auto-synced.
25
+ process.stdout.write(
26
+ "enigma: ready. Next step: run `enigma` to set up your agents " +
27
+ "(non-interactive: `enigma install --all --yes`).\n",
28
+ );
22
29
  } catch (error) {
23
30
  process.stdout.write(
24
31
  `enigma: could not download the binary now (${error.message}). ` +
@@ -28,4 +35,4 @@ async function main() {
28
35
  }
29
36
  }
30
37
 
31
- await main();
38
+ await main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enigma-cli",
3
- "version": "1.6.9",
3
+ "version": "1.7.0",
4
4
  "description": "Everything you need to work with a coding agent: install shared policy skills for Claude Code, OpenAI Codex and opencode, and set up portable git security hooks.",
5
5
  "type": "module",
6
6
  "bin": {