{"id":48459183,"url":"https://github.com/activeloopai/deeplake-claude-code-plugins","last_synced_at":"2026-04-09T03:02:44.627Z","repository":{"id":349650779,"uuid":"1200802466","full_name":"activeloopai/deeplake-claude-code-plugins","owner":"activeloopai","description":"Claude Code plugins for DeepLake — memory sync, virtual filesystem hooks","archived":false,"fork":false,"pushed_at":"2026-04-06T23:23:38.000Z","size":363,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-07T01:06:10.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/activeloopai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-03T21:02:08.000Z","updated_at":"2026-04-06T23:23:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/activeloopai/deeplake-claude-code-plugins","commit_stats":null,"previous_names":["activeloopai/deeplake-claude-code-plugins"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/activeloopai/deeplake-claude-code-plugins","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activeloopai%2Fdeeplake-claude-code-plugins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activeloopai%2Fdeeplake-claude-code-plugins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activeloopai%2Fdeeplake-claude-code-plugins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activeloopai%2Fdeeplake-claude-code-plugins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/activeloopai","download_url":"https://codeload.github.com/activeloopai/deeplake-claude-code-plugins/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activeloopai%2Fdeeplake-claude-code-plugins/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31583290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-07T01:01:28.774Z","updated_at":"2026-04-09T03:02:44.622Z","avatar_url":"https://github.com/activeloopai.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deeplake Memory — Claude Code Plugin\n\nPersistent, shared memory for Claude Code backed by [Deeplake](https://deeplake.ai). Captures conversation history, tool calls, and responses across sessions and makes them searchable by any agent or user in the same workspace.\n\n## What it does\n\n- **Captures** every session's prompts, tool calls, and responses into a shared Deeplake table\n- **Intercepts** file operations targeting `~/.deeplake/memory/` and routes them through a virtual filesystem backed by Deeplake cloud SQL\n- **Provides** full-text search across all captured memory via `Grep pattern=\"keyword\" path=\"~/.deeplake/memory\"`\n- **Upgrades** gracefully: basic mode (just-bash virtual FS) works out of the box; install the Deeplake CLI for full FUSE mount support\n\n## Installation\n\n### As a Claude Code plugin\n\nFrom within Claude Code, run:\n\n```\n/plugin marketplace add activeloopai/deeplake-claude-code-plugins\n/plugin install deeplake-hivemind@deeplake-claude-code-plugins\n/reload-plugins\n/deeplake-hivemind:login\n```\n\n### Updating\n\nThe plugin auto-updates by default — it checks for new versions on each session start and installs them automatically. You'll see a notice when an update is applied; run `/reload-plugins` to activate it.\n\nTo manually update:\n\n```\n/deeplake-hivemind:update\n```\n\nTo toggle auto-updates:\n\n```\nautoupdate off   # disable (via org management CLI)\nautoupdate on    # re-enable\nautoupdate       # check current status\n```\n\n### From source (development)\n\n```bash\nnpm install\nnpm run build\nclaude --plugin-dir /path/to/deeplake-claude-code-plugins\n/deeplake-hivemind:login\n```\n\n## Authentication\n\nAfter installing the plugin, run `/deeplake-hivemind:login` to authenticate. This opens a browser for SSO login via the OAuth Device Authorization Flow (RFC 8628).\n\n1. Run `/deeplake-hivemind:login` in Claude Code\n2. Browser opens — sign in at Deeplake\n3. Select your organization\n4. Credentials saved to `~/.deeplake/credentials.json` (permissions: 0600)\n\nOn subsequent sessions, the plugin detects existing credentials and connects automatically.\n\nTo re-login or switch organizations:\n\n```\n/deeplake-hivemind:login\n```\n\nAlternatively, set environment variables directly:\n\n```bash\nexport DEEPLAKE_TOKEN=your-token\nexport DEEPLAKE_ORG_ID=your-org-id\nexport DEEPLAKE_WORKSPACE_ID=default   # optional\n```\n```\n\n## ⚠️ Data Collection Notice\n\nThis plugin captures the following data and stores it in your Deeplake workspace:\n\n| Data                  | What                               | Where                     |\n|-----------------------|------------------------------------|---------------------------|\n| User prompts          | Every message you send to Claude   | Shared Deeplake workspace |\n| Tool calls            | Tool name + full input             | Shared Deeplake workspace |\n| Tool responses        | Full tool output                   | Shared Deeplake workspace |\n| Assistant responses   | Claude's final response text       | Shared Deeplake workspace |\n| Subagent activity     | Subagent tool calls and responses  | Shared Deeplake workspace |\n\n**All users with access to your Deeplake workspace can read this data.**\n\nA DATA NOTICE is displayed at the start of every session when capture is enabled.\n\nTo opt out of capture: `export DEEPLAKE_CAPTURE=false`\n\n## Configuration\n\n| Variable                 | Default                   | Description                               |\n|--------------------------|---------------------------|-------------------------------------------|\n| `DEEPLAKE_TOKEN`         | —                         | API token (auto-set by device login)      |\n| `DEEPLAKE_ORG_ID`        | —                         | Organization ID (auto-set by device login)|\n| `DEEPLAKE_WORKSPACE_ID`  | `default`                 | Workspace name                            |\n| `DEEPLAKE_API_URL`       | `https://api.deeplake.ai` | API endpoint                              |\n| `DEEPLAKE_TABLE`         | `memory`                  | SQL table for summaries and virtual FS    |\n| `DEEPLAKE_SESSIONS_TABLE`| `sessions`                | SQL table for per-event session capture   |\n| `DEEPLAKE_MEMORY_PATH`   | `~/.deeplake/memory`      | Path that triggers interception           |\n| `DEEPLAKE_CAPTURE`       | `true`                    | Set to `false` to disable capture         |\n| `DEEPLAKE_DEBUG`         | —                         | Set to `1` for verbose hook debug logs    |\n\n### Debug mode and capture control\n\n```bash\n# Enable debug logging (writes to ~/.deeplake/hook-debug.log)\nDEEPLAKE_DEBUG=1 claude\n\n# Disable session capture\nDEEPLAKE_CAPTURE=false claude\n```\n\n## Usage\n\n### Search memory\n\nIn Claude Code, just ask:\n\n```\n\"What was Emanuele working on?\"\n\"Search deeplake memory for authentication\"\n\"List files in ~/.deeplake/memory/\"\n```\n\nClaude automatically checks both built-in memory and Deeplake memory when recalling information.\n\n### Interactive shell\n\n```bash\nnpm run shell\n# ds:/$ ls /\n# ds:/$ cat /session_abc123.jsonl\n# ds:/$ echo \"note\" \u003e /notes.txt\n```\n\n### One-shot commands\n\n```bash\nnpm run shell -- -c \"ls /\"\nnpm run shell -- -c \"cat /CLAUDE.md\"\nnpm run shell -- -c \"grep -r 'keyword' /\"\n```\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                        Claude Code                          │\n└──────────────────────────┬──────────────────────────────────┘\n                           │\n┌──────────────────────────▼──────────────────────────────────┐\n│  SessionStart                                               │\n│  Auth login (device flow) + inject context + DATA NOTICE    │\n└──────────────────────────┬──────────────────────────────────┘\n                           │\n┌──────────────────────────▼──────────────────────────────────┐\n│  UserPromptSubmit → capture.js → INSERT row into sessions   │\n└──────────────────────────┬──────────────────────────────────┘\n                           │\n┌──────────────────────────▼──────────────────────────────────┐\n│  PreToolUse — intercept commands on ~/.deeplake/memory/     │\n│                                                             │\n│  ├─ Read/Grep (fast path)       → direct SQL query          │\n│  ├─ safe (cat, ls, jq...)       → just-bash + DeeplakeFS    │\n│  ├─ unsafe + CLI installed      → real bash + FUSE mount    │\n│  ├─ unsafe + no CLI             → deny + install prompt     │\n│  └─ deeplake mount/login        → pass through              │\n└──────────────────────────┬──────────────────────────────────┘\n                           │\n┌──────────────────────────▼──────────────────────────────────┐\n│  PostToolUse (async) → capture.js → INSERT row into sessions│\n└──────────────────────────┬──────────────────────────────────┘\n                           │\n┌──────────────────────────▼──────────────────────────────────┐\n│  Stop → capture.js → INSERT row into sessions               │\n└──────────────────────────┬──────────────────────────────────┘\n                           │\n┌──────────────────────────▼───────────────────────────────────┐\n│  SubagentStop (async) → capture.js → INSERT row into sessions│\n└──────────────────────────┬───────────────────────────────────┘\n                           │\n┌──────────────────────────▼──────────────────────────────────┐\n│  SessionEnd → spawns wiki-worker.js in background           │\n│  → fetches events, runs claude -p, uploads summary          │\n│  → /summaries/*.md + /index.md                              │\n└──────────────────────────┬──────────────────────────────────┘\n                           │\n┌──────────────────────────▼──────────────────────────────────┐\n│                   Deeplake REST API                         │\n│       sessions table · memory table (summaries, index)      │\n└─────────────────────────────────────────────────────────────┘\n```\n\n### Hook events\n\nAll capture hooks use a single unified `capture.js` bundle — one INSERT per event into the sessions SQL table.\n\n| Hook                | Bundle           | Purpose                                         | Async |\n|---------------------|------------------|-------------------------------------------------|-------|\n| `SessionStart`      | `session-start`  | Auth login, inject context, DATA NOTICE         |  No   |\n| `UserPromptSubmit`  | `capture`        | Capture user message                            |  No   |\n| `PreToolUse`        | `pre-tool-use`   | Intercept and rewrite memory-targeting commands |  No   |\n| `PostToolUse`       | `capture`        | Capture tool call + response                    |  Yes  |\n| `Stop`              | `capture`        | Capture assistant response                      |  No   |\n| `SubagentStop`      | `capture`        | Capture subagent activity                       |  Yes  |\n| `SessionEnd`        | `session-end`    | Spawn wiki-worker for AI summary                |  No   |\n\n## Security\n\n- SQL values escaped with `sqlStr()`, `sqlLike()`, `sqlIdent()` (see `src/utils/sql.ts`)\n- Only 80+ allowlisted builtins run in the virtual FS; unsafe binaries pass through or are denied\n- Credentials stored with mode `0600`, config dir with mode `0700`\n- Device flow login — no tokens in environment or code\n- `DEEPLAKE_CAPTURE=false` fully disables data collection\n\n## Local development\n\n### Prerequisites\n\n- **Node.js \u003e= 22** — install via [nodejs.org](https://nodejs.org) or a version manager:\n  ```bash\n  # nvm\n  nvm install 22\n\n  # brew\n  brew install node\n  ```\n\n### Setup\n\n```bash\ngit clone https://github.com/activeloopai/deeplake-claude-code-plugins.git\ncd deeplake-claude-code-plugins\nnpm install\nnpm run build     # tsc + esbuild → bundle/\n```\n\n### Commands\n\n```bash\nnpm run build     # TypeScript compile + esbuild bundle\nnpm run bundle    # esbuild bundle only (skip tsc)\nnpm run dev       # TypeScript watch mode\nnpm test          # vitest unit tests\nnpm run shell     # interactive shell against real Deeplake\nDEEPLAKE_DEBUG=1 npm run shell  # with debug logging\n```\n\n### Test the plugin locally with Claude Code\n\n```bash\nclaude --plugin-dir .\n```\n\nAfter making changes, run `npm run build` and send a new message in Claude Code to pick up the updated hooks.\n\n## License\n\nApache License 2.0 — © Activeloop, Inc. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factiveloopai%2Fdeeplake-claude-code-plugins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factiveloopai%2Fdeeplake-claude-code-plugins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factiveloopai%2Fdeeplake-claude-code-plugins/lists"}