{"_id":"@aimasteracc/mycelium-sdk","name":"@aimasteracc/mycelium-sdk","dist-tags":{"latest":"0.3.0"},"versions":{"0.3.0":{"name":"@aimasteracc/mycelium-sdk","version":"0.3.0","description":"Thin, typed Node/TypeScript SDK for the Mycelium code-intelligence engine. Wraps the prebuilt mycelium CLI — no Rust/Cargo toolchain required.","keywords":["code-intelligence","code-graph","mcp","ai","sdk","static-analysis","tree-sitter","mycelium"],"homepage":"https://github.com/aimasteracc/mycelium","repository":{"type":"git","url":"git+https://github.com/aimasteracc/mycelium.git","directory":"npm/sdk"},"license":"MIT","main":"index.js","types":"index.d.ts","engines":{"node":">=16"},"scripts":{"test":"node --test"},"optionalDependencies":{"@aimasteracc/mycelium-darwin-arm64":"0.3.0","@aimasteracc/mycelium-darwin-x64":"0.3.0","@aimasteracc/mycelium-linux-x64-gnu":"0.3.0","@aimasteracc/mycelium-linux-arm64-gnu":"0.3.0","@aimasteracc/mycelium-win32-x64":"0.3.0"},"_id":"@aimasteracc/mycelium-sdk@0.3.0","gitHead":"eddb7f88e25085b41078b3e63a19032f93d8b2b9","bugs":{"url":"https://github.com/aimasteracc/mycelium/issues"},"_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-zOWBiR9QSmK1NMVwKYPm8MJ8NZkvhzDnzWtNeMGHa1gh8dOzscB3AktoJJp8plEJARAJTb1HS7ZRLcTNe+WBYg==","shasum":"b483cf1ba65d459af839664468528b2d41a14a79","tarball":"https://registry.npmjs.org/@aimasteracc/mycelium-sdk/-/mycelium-sdk-0.3.0.tgz","fileCount":7,"unpackedSize":17849,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aimasteracc%2fmycelium-sdk@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIH/DCuzpx0QhtHUUI2wrzBf9tJXrc9UTD4kKeWF97/TRAiEAkB4W1ULQbY9V4+Z1wdSoE1D9B1xuNbuev/AESkiI0VE="}]},"_npmUser":{"name":"aimasteracc","email":"aimasteracc@gmail.com"},"directories":{},"maintainers":[{"name":"aimasteracc","email":"aimasteracc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mycelium-sdk_0.3.0_1780663344827_0.8044579362886104"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-05T12:42:24.664Z","0.3.0":"2026-06-05T12:42:24.976Z","modified":"2026-06-05T12:42:25.355Z"},"maintainers":[{"name":"aimasteracc","email":"aimasteracc@gmail.com"}],"description":"Thin, typed Node/TypeScript SDK for the Mycelium code-intelligence engine. Wraps the prebuilt mycelium CLI — no Rust/Cargo toolchain required.","homepage":"https://github.com/aimasteracc/mycelium","keywords":["code-intelligence","code-graph","mcp","ai","sdk","static-analysis","tree-sitter","mycelium"],"repository":{"type":"git","url":"git+https://github.com/aimasteracc/mycelium.git","directory":"npm/sdk"},"bugs":{"url":"https://github.com/aimasteracc/mycelium/issues"},"license":"MIT","readme":"# @aimasteracc/mycelium-sdk\n\nThin, typed **Node / TypeScript SDK** for [Mycelium](https://github.com/aimasteracc/mycelium) —\nthe reactive, AI-native code-intelligence graph. Embed code intelligence in any\nJS/TS app **without a Rust toolchain**.\n\nThe SDK is a thin wrapper over the prebuilt `mycelium` CLI ([RFC-0110](https://github.com/aimasteracc/mycelium/blob/develop/rfcs/0110-npm-bun-cli-distribution.md)):\nit locates the binary, spawns it with `--format json`, and returns parsed\nobjects. Because it wraps the CLI, it inherits the CLI ↔ MCP byte-identical\nparity guaranteed by the Charter's Three-Surface Rule — see\n[RFC-0111](https://github.com/aimasteracc/mycelium/blob/develop/rfcs/0111-node-py-bindings-thin-cli-wrapper.md).\n\n## Install\n\n```bash\nnpm install @aimasteracc/mycelium-sdk\n# or: bun add @aimasteracc/mycelium-sdk\n```\n\nThe matching prebuilt binary is pulled in automatically via per-platform\n`optionalDependencies`. No `cargo` required.\n\n## Quickstart\n\n```js\nconst { Mycelium } = require(\"@aimasteracc/mycelium-sdk\");\n\nconst m = new Mycelium({ root: \".\" });\n\nawait m.index();                       // build/refresh the index\nconst hits = await m.query(\"#login\");  // Hyphae selector → parsed JSON\nconst info = await m.getSymbolInfo(\"src/lib.rs>App>render\");\nconst ctx  = await m.context(\"trace ServeHTTP to HandlerFunc\", { maxNodes: 30 });\n```\n\nTypeScript types ship in the box (`index.d.ts`) — no build step:\n\n```ts\nimport { Mycelium, MyceliumError } from \"@aimasteracc/mycelium-sdk\";\n```\n\n## API\n\n| Method | CLI twin |\n|---|---|\n| `version()` | `mycelium version` |\n| `index(path?)` | `mycelium index` |\n| `query(expr)` | `mycelium query --format json` |\n| `searchSymbol(q, { limit? })` | `mycelium search-symbol --format json` |\n| `getSymbolInfo(path)` | `mycelium get-symbol-info --format json` |\n| `getCallers(path, { edgeKind?, includeVirtual?, budget? })` | `mycelium get-callers --format json` |\n| `getCallees(path, { edgeKind?, budget? })` | `mycelium get-callees --format json` |\n| `context(task, { maxNodes?, maxCodeBlocks?, budget? })` | `mycelium context --format json` |\n| `serverStatus()` | `mycelium server-status --format json` |\n| `run(args)` | any subcommand — raw argv escape hatch |\n\nEvery command the CLI exposes is reachable via `run([\"<subcommand>\", …, \"--format\", \"json\"])`,\neven before it has a typed convenience method.\n\n## Binary resolution\n\nThe binary is located in this order:\n\n1. `MYCELIUM_BIN` environment variable (explicit override),\n2. the matching `@aimasteracc/mycelium-<platform>` package,\n3. `mycelium` on your `PATH`.\n\nPass `{ bin: \"/path/to/mycelium\" }` to the constructor to pin one directly.\n\n## Errors\n\nFailures throw a `MyceliumError` carrying `{ code, signal, stderr, stdout, args }`.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-dcb237661e041b482e09be3d021976a8"}