@empirical-gauzza/cli 1.0.23 → 1.0.24

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
@@ -1,63 +1,63 @@
1
- # @empirical-gauzza/cli
2
-
3
- Command-line installer and local MCP wiring helper for [Empirical](https://empirical.gauzza.com) — portable memory infrastructure for AI agents, assistants, and coding tools.
4
-
5
- Full documentation: **[empirical.gauzza.com/docs/cli-details](https://empirical.gauzza.com/docs/cli-details)**
6
-
7
- ## Install
8
-
9
- ```bash
10
- npm install -g @empirical-gauzza/cli
11
- ```
12
-
13
- ## Quick start
14
-
15
- ```bash
16
- empirical install # interactive setup for Claude Code, Codex, or Copilot CLI
17
- empirical auth login # browser-based OAuth login
18
- empirical doctor # verify token, API connectivity, and workspace status
19
- ```
20
-
21
- Full walkthrough: [empirical.gauzza.com/docs/install](https://empirical.gauzza.com/docs/install)
22
-
23
- ## What it does
24
-
25
- - Installs and configures the Empirical MCP plugin for supported coding agents (Claude Code, Codex CLI, Copilot CLI)
26
- - Manages OAuth login, including headless/CI bootstrap and Docker token flows
27
- - Reads, writes, and maintains memories from the command line
28
- - Manages Skills Kits — create, sync, and push authored Skills across machines
29
- - Manages workspaces, invites, and registered devices
30
- - Exposes agent-readable docs and a connectivity `doctor` check
31
-
32
- ## Commands
33
-
34
- | Command | Docs |
35
- | --- | --- |
36
- | `empirical install` | [/docs/install](https://empirical.gauzza.com/docs/install#connect) |
37
- | `empirical plugin install / check` | [/docs/cli-plugins](https://empirical.gauzza.com/docs/cli-plugins) |
38
- | `empirical auth login / logout` | [/docs/cli-auth](https://empirical.gauzza.com/docs/cli-auth) |
39
- | `empirical oauth bootstrap / refresh` | [/docs/cli-oauth](https://empirical.gauzza.com/docs/cli-oauth) |
40
- | `empirical policy show / set` | [/docs/cli-policy](https://empirical.gauzza.com/docs/cli-policy) |
41
- | `empirical memory query / record / update / delete / export ...` | [/docs/cli-memory](https://empirical.gauzza.com/docs/cli-memory) |
42
- | `empirical workspace list / create / invite ...` | [/docs/cli-workspaces](https://empirical.gauzza.com/docs/cli-workspaces) |
43
- | `empirical kit create / sync / use ...` | [/docs/cli-kit](https://empirical.gauzza.com/docs/cli-kit) |
44
- | `empirical skill push / history / rollback` | [/docs/cli-skill](https://empirical.gauzza.com/docs/cli-skill) |
45
- | `empirical device list / show` | [/docs/cli-devices](https://empirical.gauzza.com/docs/cli-devices) |
46
- | `empirical doc [topic]` | [/docs/cli-doc-command](https://empirical.gauzza.com/docs/cli-doc-command) |
47
- | `empirical doctor` | [/docs/cli-doctor](https://empirical.gauzza.com/docs/cli-doctor) |
48
-
49
- Run `empirical --help` at any time for the full, current command list, or `empirical doc` for agent-readable topic docs.
50
-
51
- ## Security model
52
-
53
- API keys and OAuth tokens are stored locally and are never printed in full after initial issuance. See [empirical.gauzza.com/docs/security-model](https://empirical.gauzza.com/docs/security-model) for details on credential handling and headless/CI usage.
54
-
55
- ## Links
56
-
57
- - [Documentation](https://empirical.gauzza.com/docs/install)
58
- - [Homepage](https://empirical.gauzza.com)
59
- - [Support](https://empirical.gauzza.com/support/)
60
-
61
- ## License
62
-
63
- MIT
1
+ # @empirical-gauzza/cli
2
+
3
+ Command-line installer and local MCP wiring helper for [Empirical](https://empirical.gauzza.com) — portable memory infrastructure for AI agents, assistants, and coding tools.
4
+
5
+ Full documentation: **[empirical.gauzza.com/docs/cli-details](https://empirical.gauzza.com/docs/cli-details)**
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @empirical-gauzza/cli
11
+ ```
12
+
13
+ ## Quick start
14
+
15
+ ```bash
16
+ empirical install # interactive setup for Claude Code, Codex, or Copilot CLI
17
+ empirical auth login # browser-based OAuth login
18
+ empirical doctor # verify token, API connectivity, and workspace status
19
+ ```
20
+
21
+ Full walkthrough: [empirical.gauzza.com/docs/install](https://empirical.gauzza.com/docs/install)
22
+
23
+ ## What it does
24
+
25
+ - Installs and configures the Empirical MCP plugin for supported coding agents (Claude Code, Codex CLI, Copilot CLI)
26
+ - Manages OAuth login, including headless/CI bootstrap and Docker token flows
27
+ - Reads, writes, and maintains memories from the command line
28
+ - Manages Skills Kits — create, sync, and push authored Skills across machines
29
+ - Manages workspaces, invites, and registered devices
30
+ - Exposes agent-readable docs and a connectivity `doctor` check
31
+
32
+ ## Commands
33
+
34
+ | Command | Docs |
35
+ | --- | --- |
36
+ | `empirical install` | [/docs/install](https://empirical.gauzza.com/docs/install#connect) |
37
+ | `empirical plugin install / check` | [/docs/cli-plugins](https://empirical.gauzza.com/docs/cli-plugins) |
38
+ | `empirical auth login / logout` | [/docs/cli-auth](https://empirical.gauzza.com/docs/cli-auth) |
39
+ | `empirical oauth bootstrap / refresh` | [/docs/cli-oauth](https://empirical.gauzza.com/docs/cli-oauth) |
40
+ | `empirical policy show / set` | [/docs/cli-policy](https://empirical.gauzza.com/docs/cli-policy) |
41
+ | `empirical memory query / record / update / delete / export ...` | [/docs/cli-memory](https://empirical.gauzza.com/docs/cli-memory) |
42
+ | `empirical workspace list / create / invite ...` | [/docs/cli-workspaces](https://empirical.gauzza.com/docs/cli-workspaces) |
43
+ | `empirical kit create / sync / use ...` | [/docs/cli-kit](https://empirical.gauzza.com/docs/cli-kit) |
44
+ | `empirical skill push / history / rollback` | [/docs/cli-skill](https://empirical.gauzza.com/docs/cli-skill) |
45
+ | `empirical device list / show` | [/docs/cli-devices](https://empirical.gauzza.com/docs/cli-devices) |
46
+ | `empirical doc [topic]` | [/docs/cli-doc-command](https://empirical.gauzza.com/docs/cli-doc-command) |
47
+ | `empirical doctor` | [/docs/cli-doctor](https://empirical.gauzza.com/docs/cli-doctor) |
48
+
49
+ Run `empirical --help` at any time for the full, current command list, or `empirical doc` for agent-readable topic docs.
50
+
51
+ ## Security model
52
+
53
+ API keys and OAuth tokens are stored locally and are never printed in full after initial issuance. See [empirical.gauzza.com/docs/security-model](https://empirical.gauzza.com/docs/security-model) for details on credential handling and headless/CI usage.
54
+
55
+ ## Links
56
+
57
+ - [Documentation](https://empirical.gauzza.com/docs/install)
58
+ - [Homepage](https://empirical.gauzza.com)
59
+ - [Support](https://empirical.gauzza.com/support/)
60
+
61
+ ## License
62
+
63
+ MIT
package/bin/empirical.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  'use strict';
4
4
 
package/lib/doc.js CHANGED
@@ -11,7 +11,7 @@ function runDoc(args) {
11
11
  user: 'Get current user identity (MCP: get_user; CLI: doctor --output json)',
12
12
  workspace: 'List, view, and switch workspaces',
13
13
  doctor: 'Check token, connectivity, and workspace health',
14
- agents: 'Supported agents, integration modes, and native plugin setup',
14
+ agents: 'Supported agents, integration modes, and native plugin setup',
15
15
  auth: 'Token types, bootstrap, refresh, resolution order',
16
16
  install: 'Install Empirical for Codex / Copilot / Claude Code',
17
17
  kit: 'Create, source, activate, and sync Skills Kits',
package/lib/env.js CHANGED
@@ -1,49 +1,49 @@
1
- 'use strict';
2
-
3
- const { ask } = require('./ui');
4
-
5
- function getEnv(name, fallback = '') {
6
- return String(process.env[name] ?? fallback).trim();
7
- }
8
-
9
- function requireEnv(name) {
10
- const value = getEnv(name);
11
- if (!value) {
12
- throw new Error(`Missing required env var: ${name}`);
13
- }
14
- return value;
15
- }
16
-
17
- async function resolveRequiredValueFromEnvOrPrompt(envName, promptLabel) {
18
- const value = getEnv(envName);
19
- if (value) return value;
20
-
21
- if (!process.stdin.isTTY) {
22
- throw new Error(`Missing required env var: ${envName}`);
23
- }
24
-
25
- const answer = (await ask(`${promptLabel}: `)).trim();
26
- if (!answer) {
27
- throw new Error(`${promptLabel} is required`);
28
- }
29
-
30
- return answer;
31
- }
32
-
33
- function parseFlag(args, flagName) {
34
- return args.includes(flagName);
35
- }
36
-
37
- function parseOption(args, optionName, fallback = '') {
38
- const index = args.indexOf(optionName);
39
- if (index === -1) return fallback;
40
- return String(args[index + 1] || '').trim() || fallback;
41
- }
42
-
43
- module.exports = {
44
- getEnv,
45
- requireEnv,
46
- resolveRequiredValueFromEnvOrPrompt,
47
- parseFlag,
48
- parseOption
49
- };
1
+ 'use strict';
2
+
3
+ const { ask } = require('./ui');
4
+
5
+ function getEnv(name, fallback = '') {
6
+ return String(process.env[name] ?? fallback).trim();
7
+ }
8
+
9
+ function requireEnv(name) {
10
+ const value = getEnv(name);
11
+ if (!value) {
12
+ throw new Error(`Missing required env var: ${name}`);
13
+ }
14
+ return value;
15
+ }
16
+
17
+ async function resolveRequiredValueFromEnvOrPrompt(envName, promptLabel) {
18
+ const value = getEnv(envName);
19
+ if (value) return value;
20
+
21
+ if (!process.stdin.isTTY) {
22
+ throw new Error(`Missing required env var: ${envName}`);
23
+ }
24
+
25
+ const answer = (await ask(`${promptLabel}: `)).trim();
26
+ if (!answer) {
27
+ throw new Error(`${promptLabel} is required`);
28
+ }
29
+
30
+ return answer;
31
+ }
32
+
33
+ function parseFlag(args, flagName) {
34
+ return args.includes(flagName);
35
+ }
36
+
37
+ function parseOption(args, optionName, fallback = '') {
38
+ const index = args.indexOf(optionName);
39
+ if (index === -1) return fallback;
40
+ return String(args[index + 1] || '').trim() || fallback;
41
+ }
42
+
43
+ module.exports = {
44
+ getEnv,
45
+ requireEnv,
46
+ resolveRequiredValueFromEnvOrPrompt,
47
+ parseFlag,
48
+ parseOption
49
+ };
@@ -1,47 +1,47 @@
1
- 'use strict';
2
-
3
- const fs = require('fs');
4
- const os = require('os');
5
- const path = require('path');
6
- const { commandExists } = require('../fsUtils');
7
- const { installCodex } = require('./codex');
8
- const { installCopilot } = require('./copilot');
9
- const { installClaude } = require('./claude');
10
-
11
- function detectInstallTargets() {
12
- const home = os.homedir();
13
- const targets = [];
14
-
15
- const codexDetected = commandExists('codex') || fs.existsSync(path.join(home, '.codex'));
16
- if (codexDetected) {
17
- targets.push({
18
- id: 'codex',
19
- label: 'Codex CLI',
20
- install: installCodex
21
- });
22
- }
23
-
24
- const copilotDetected = commandExists('copilot') || fs.existsSync(path.join(home, '.copilot'));
25
- if (copilotDetected) {
26
- targets.push({
27
- id: 'copilot',
28
- label: 'GitHub Copilot CLI',
29
- install: installCopilot
30
- });
31
- }
32
-
33
- const claudeDetected = commandExists('claude') || fs.existsSync(path.join(home, '.claude'));
34
- if (claudeDetected) {
35
- targets.push({
36
- id: 'claude',
37
- label: 'Claude CLI',
38
- install: installClaude
39
- });
40
- }
41
-
42
- return targets;
43
- }
44
-
45
- module.exports = {
46
- detectInstallTargets
47
- };
1
+ 'use strict';
2
+
3
+ const fs = require('fs');
4
+ const os = require('os');
5
+ const path = require('path');
6
+ const { commandExists } = require('../fsUtils');
7
+ const { installCodex } = require('./codex');
8
+ const { installCopilot } = require('./copilot');
9
+ const { installClaude } = require('./claude');
10
+
11
+ function detectInstallTargets() {
12
+ const home = os.homedir();
13
+ const targets = [];
14
+
15
+ const codexDetected = commandExists('codex') || fs.existsSync(path.join(home, '.codex'));
16
+ if (codexDetected) {
17
+ targets.push({
18
+ id: 'codex',
19
+ label: 'Codex CLI',
20
+ install: installCodex
21
+ });
22
+ }
23
+
24
+ const copilotDetected = commandExists('copilot') || fs.existsSync(path.join(home, '.copilot'));
25
+ if (copilotDetected) {
26
+ targets.push({
27
+ id: 'copilot',
28
+ label: 'GitHub Copilot CLI',
29
+ install: installCopilot
30
+ });
31
+ }
32
+
33
+ const claudeDetected = commandExists('claude') || fs.existsSync(path.join(home, '.claude'));
34
+ if (claudeDetected) {
35
+ targets.push({
36
+ id: 'claude',
37
+ label: 'Claude CLI',
38
+ install: installClaude
39
+ });
40
+ }
41
+
42
+ return targets;
43
+ }
44
+
45
+ module.exports = {
46
+ detectInstallTargets
47
+ };
@@ -477,7 +477,7 @@ function main() {
477
477
  appendLog('stop hook fired (pid=' + process.pid + ', platform=' + process.platform + ')');
478
478
 
479
479
  console.log(JSON.stringify({
480
- systemMessage: '[Empirical reminder] Before finishing: if this turn included a completed decision, a corrected mistake, or meaningful work worth remembering, record it now via the empirical-memory skill or \`empirical memory record\` - do not wait to be asked.'
480
+ systemMessage: '[Empirical reminder] Before finishing: if this turn included a completed decision, a corrected mistake, or meaningful work worth remembering, record it now, one memory per finding (a fix, a root cause, a decision, a lesson), via the empirical-memory, empirical-work-history, or empirical-scar-tissue skill or \`empirical memory record\`. Local notes are not recorded. Do not wait to be asked.'
481
481
  }));
482
482
  process.exit(0);
483
483
  }
@@ -545,7 +545,7 @@ function main() {
545
545
 
546
546
  console.log(JSON.stringify({
547
547
  decision: 'block',
548
- reason: '[Empirical reminder] Before finishing: if this turn included a completed decision, a corrected mistake, or meaningful work worth remembering, record it now via the empirical-memory skill or \`empirical memory record\` - do not wait to be asked.'
548
+ reason: '[Empirical reminder] Before finishing: if this turn included a completed decision, a corrected mistake, or meaningful work worth remembering, record it now, one memory per finding (a fix, a root cause, a decision, a lesson), via the empirical-memory, empirical-work-history, or empirical-scar-tissue skill or \`empirical memory record\`. Local notes are not recorded. Do not wait to be asked.'
549
549
  }));
550
550
  process.exit(0);
551
551
  }
@@ -618,7 +618,7 @@ function main() {
618
618
  process.stdout.write(JSON.stringify({
619
619
  hookSpecificOutput: {
620
620
  hookEventName: 'Stop',
621
- additionalContext: '[Empirical] Record memory-worthy work now via empirical-memory skill.'
621
+ additionalContext: '[Empirical] Record memory-worthy work now: one memory per finding (a fix, a root cause, a decision, a lesson) via the empirical-memory, empirical-work-history, or empirical-scar-tissue skill. Local notes are not recorded.'
622
622
  }
623
623
  }) + '\\n');
624
624
  process.exit(0);