{"_id":"@alie.me/sdk","name":"@alie.me/sdk","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@alie.me/sdk","version":"0.1.0","description":"ALIE SDK — read + write your second brain from any Node.js / browser project. Memory layer for AI, model-neutral.","license":"Apache-2.0","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc","dev":"tsc --watch","prepublishOnly":"npm run build"},"engines":{"node":">=18"},"keywords":["alie","memory","second-brain","ai-memory","claude","mcp","synthesis","ideation","morning-brief"],"repository":{"type":"git","url":"git+https://github.com/parimoody/alie_new.git","directory":"sdk"},"publishConfig":{"access":"public"},"//note":"Originally drafted as unscoped 'alie' but npm rejected the name as too similar to other packages. Moved under @alie.me to keep parity with @alie.me/cli + @alie.me/mcp.","devDependencies":{"@types/node":"^20.19.39","typescript":"^5.9.3"},"_id":"@alie.me/sdk@0.1.0","bugs":{"url":"https://github.com/parimoody/alie_new/issues"},"homepage":"https://github.com/parimoody/alie_new#readme","_nodeVersion":"18.20.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-6tLQ0h8Z0f8zdeO8hsvBI3hkwoxnqdNRMmA7XfoR4xv4rjmZqQxJBZs9Wn0cIXt8Tf2feVIVOCzEwlcnkSod7g==","shasum":"18203a57058d5ab38c1303cb3d5ab1f3baa24081","tarball":"https://registry.npmjs.org/@alie.me/sdk/-/sdk-0.1.0.tgz","fileCount":12,"unpackedSize":33511,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHKZXJPRqdzgi66/h5t5OmsiibstzyZ4E5LWcvPzJo64AiEAhRxDW2uZqVI/RgAqW6lpwLZhqryorbj7I9btVh7Ocws="}]},"_npmUser":{"name":"parimoody","email":"adibabexo@gmail.com"},"directories":{},"maintainers":[{"name":"parimoody","email":"adibabexo@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.1.0_1777810242096_0.5396483224260245"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-03T12:10:41.997Z","0.1.0":"2026-05-03T12:10:42.248Z","modified":"2026-05-03T12:10:42.467Z"},"maintainers":[{"name":"parimoody","email":"adibabexo@gmail.com"}],"description":"ALIE SDK — read + write your second brain from any Node.js / browser project. Memory layer for AI, model-neutral.","homepage":"https://github.com/parimoody/alie_new#readme","keywords":["alie","memory","second-brain","ai-memory","claude","mcp","synthesis","ideation","morning-brief"],"repository":{"type":"git","url":"git+https://github.com/parimoody/alie_new.git","directory":"sdk"},"bugs":{"url":"https://github.com/parimoody/alie_new/issues"},"license":"Apache-2.0","readme":"# `@alie.me/sdk` — ALIE SDK\n\nThe TypeScript / JavaScript SDK for [ALIE](https://alie.me) — the model-neutral AI memory layer. Save anything from anywhere; every AI you use can read your context.\n\n```bash\nnpm install @alie.me/sdk\n```\n\nRequires Node 18+ (uses native `fetch`).\n\n---\n\n## Usage\n\n```ts\nimport { Alie } from \"@alie.me/sdk\";\n\nconst alie = new Alie({ token: process.env.ALIE_TOKEN! });\n\n// Capture\nconst saved = await alie.capture({\n  text: \"Switching to DeepSeek-chat for capture extraction — 10x cheaper, comparable quality.\",\n  userNote: \"locking in our extraction model choice\",\n});\nconsole.log(saved.thoughtId);\n\n// Recall — hybrid retrieval (semantic + BM25 + entity boost)\nconst ctx = await alie.recall({ query: \"model selection decisions\" });\nconsole.log(ctx.direct);          // top matches\nconsole.log(ctx.contradictions);  // conflicts in your past thinking\n\n// Morning brief\nconst latest = await alie.brief.latest();\nconst fresh = await alie.brief.generate({ lookbackDays: 7 });\n\n// Ideation engine\nconst profiles = await alie.ideate.listProfiles();\nconst ideas = await alie.ideate.run({\n  profileName: \"video_content\",\n  seed: \"clay\",\n  fast: false,\n});\nawait alie.ideate.rate({ outputId: ideas.outputs[0].id, rating: \"winner\" });\n```\n\n---\n\n## Auth\n\nGenerate a token at [alie.me/settings](https://alie.me/settings) — the **API tokens** card. Each token has a label so you can identify which app is using it; revoke anytime.\n\n```ts\nconst alie = new Alie({ token: \"alie_xxxxx...\" });\n```\n\nFor browser apps, never embed a long-lived token in client code. Have your backend mint per-session tokens or proxy through a secure server.\n\n---\n\n## API surface\n\n```ts\nalie.capture({ text? | url, userNote?, ... })           // POST /api/capture\nalie.recall({ query, mode? })                            // POST /api/recall\nalie.relate({ thoughtId, k? })                           // GET  /api/relate/:id\n\nalie.brief.latest()                                      // GET  /api/brief\nalie.brief.generate({ lookbackDays?, sourceFilter? })    // POST /api/brief/generate\n\nalie.ideate.listProfiles()                               // GET  /api/ideate/profiles\nalie.ideate.run({ profileName, seed, fast?, nOutputs? }) // POST /api/ideate/run-by-name\nalie.ideate.rate({ outputId, rating })                   // POST /api/ideate/outputs/:id/rate\n```\n\nEvery method returns a typed promise. Errors throw `AlieError` with `.status` (HTTP code) and `.path` (the route that failed).\n\n---\n\n## TypeScript\n\nPublic types are exported alongside the client:\n\n```ts\nimport { Alie, type RecallResult, type IdeationRunResult, AlieError } from \"@alie.me/sdk\";\n```\n\n---\n\n## Self-hosting / dev\n\nPointing the SDK at a local ALIE instance:\n\n```ts\nconst alie = new Alie({\n  token: \"alie_localdev\",\n  baseUrl: \"http://localhost:3000\",\n});\n```\n\n---\n\n## License\n\nApache 2.0. See [LICENSE](./LICENSE).\n","readmeFilename":"README.md","_rev":"1-16fc30701a1d9d4e9ec92650fbff14c1"}