clawdi 0.1.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/LICENSE ADDED
@@ -0,0 +1,4 @@
1
+ © 2026 Goodwill Labs Inc. All rights reserved.
2
+
3
+ Use is subject to the Terms of Service available at:
4
+ https://www.clawdi.ai/terms
package/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # clawdi
2
+
3
+ iCloud for AI Agents. One CLI to share sessions, skills, memory, and vault secrets across Claude Code, Codex, OpenClaw, and Hermes — with an MCP server on the other end of the pipe.
4
+
5
+ ## Requirements
6
+
7
+ - **Node ≥ 18**
8
+ - At least one supported agent installed on the machine (detected automatically)
9
+ - Bun is only required if you ingest Hermes sessions (`clawdi push --agent hermes`) — `bun:sqlite` is loaded on demand.
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm i -g clawdi
15
+ # or: bun add -g clawdi
16
+ ```
17
+
18
+ ## Commands
19
+
20
+ | Command | What it does |
21
+ | --- | --- |
22
+ | `clawdi auth login` / `logout` | Authenticate with the Clawdi Cloud backend |
23
+ | `clawdi status [--json]` | Show auth + per-module activity |
24
+ | `clawdi config list/get/set/unset` | Manage `~/.clawdi/config.json` |
25
+ | `clawdi setup [--agent <type>] [-y]` | Detect installed agents, register this machine, install built-in skill, wire up MCP |
26
+ | `clawdi teardown [--agent <type> --all --keep-skill --keep-mcp -y]` | Reverse setup: remove env file, bundled skill, and MCP entry |
27
+ | `clawdi push [--modules --since --project --all --agent --dry-run]` | Upload sessions / skills to the cloud |
28
+ | `clawdi pull [--modules --agent --dry-run]` | Download cloud skills to registered agents |
29
+ | `clawdi skill list [--json]` | List uploaded skills |
30
+ | `clawdi skill add <path> [-y]` | Upload a skill directory or single `.md` file (prompted preview) |
31
+ | `clawdi skill install <repo> [-a --agent] [-l --list] [-y]` | Install a GitHub skill into cloud and one or more agents |
32
+ | `clawdi skill rm <key>` | Remove a cloud skill |
33
+ | `clawdi skill init [name]` | Scaffold a new `SKILL.md` template |
34
+ | `clawdi memory list [--json --limit --category]` | List memories |
35
+ | `clawdi memory search <query> [--json --limit --category]` | Search memories by text |
36
+ | `clawdi memory add <content>` / `rm <id>` | Add or delete a memory |
37
+ | `clawdi vault set <key>` / `list [--json]` / `import <file>` | Manage secrets |
38
+ | `clawdi run -- <cmd>` | Run a command with vault secrets injected into env |
39
+ | `clawdi doctor [--json]` | Diagnose auth, agent paths, vault, MCP connectivity |
40
+ | `clawdi update [--json]` | Check for a newer CLI version |
41
+ | `clawdi mcp` | Start MCP server (stdio transport, for agents) |
42
+
43
+ Run any command with `--help` to see its flags and real examples.
44
+
45
+ ## Environment variables
46
+
47
+ | Variable | Purpose |
48
+ | --- | --- |
49
+ | `CLAWDI_API_URL` | Override the backend endpoint (defaults to `http://localhost:8000`) |
50
+ | `CLAWDI_DEBUG` | Print stack traces on errors |
51
+ | `CLAWDI_NO_UPDATE_CHECK` | Suppress the non-blocking update check |
52
+ | `CLAUDE_CONFIG_DIR` | Custom home for the Claude Code adapter (instead of `~/.claude`) |
53
+ | `CODEX_HOME` | Custom home for the Codex adapter (instead of `~/.codex`) |
54
+ | `HERMES_HOME` | Custom home for the Hermes adapter (instead of `~/.hermes`) |
55
+ | `OPENCLAW_STATE_DIR` | Custom OpenClaw state directory |
56
+ | `OPENCLAW_AGENT_ID` | Target a specific OpenClaw agent (default `main`) |
57
+ | `CI`, `GITHUB_ACTIONS`, `GITLAB_CI`, `CIRCLECI`, `TRAVIS`, `BUILDKITE`, `JENKINS_URL`, `TEAMCITY_VERSION` | Detected as CI; interactive prompts are disabled |
58
+
59
+ ## Local state
60
+
61
+ Everything clawdi writes lives under `~/.clawdi/`:
62
+
63
+ ```
64
+ ~/.clawdi/
65
+ ├── config.json user config (apiUrl)
66
+ ├── auth.json API key (mode 0600)
67
+ ├── state.json per-module last-activity timestamps
68
+ ├── environments/ one file per registered agent
69
+ └── update.json cached npm registry lookup
70
+ ```
71
+
72
+ Corrupted `state.json` is tolerated with a warning, not a crash.
73
+
74
+ ## Troubleshooting
75
+
76
+ ```bash
77
+ clawdi doctor # a single-shot diagnostic
78
+ ```
79
+
80
+ It verifies auth, API reachability, each known agent's install path, vault resolution, and MCP connector config — with actionable hints on every failing check.
package/bin/clawdi.mjs ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ // Thin wrapper that forwards to the bundled CLI. On Node 22+ enable the
3
+ // compile cache for faster startup; elsewhere this is a no-op.
4
+ import module from "node:module";
5
+
6
+ if (module.enableCompileCache && !process.env.NODE_DISABLE_COMPILE_CACHE) {
7
+ try {
8
+ module.enableCompileCache();
9
+ } catch {
10
+ // Ignore — cache is an optimization, not a requirement.
11
+ }
12
+ }
13
+
14
+ await import("../dist/index.js");