Registry / storage / atlas-wiki

atlas-wiki

JSON →
library0.2.2jsnpmunverified

Atlas WiKi (v0.2.2) is a TypeScript-first, SQLite-first, source-backed knowledge ledger and wiki for agents, applications, and teams. It stores structured records with provenance and citations, enforces permission-aware access (ACL), and supports multiple backends: local SQLite (default, requires Node >=24 for node:sqlite), Supabase Postgres with RLS, and in-memory for testing. Unlike general wikis, it emphasizes audit trails, source evidence, and agent/LLM integration via MCP and RAG. Client-side ESM only; ships TypeScript definitions. Peer dependencies include @google/genai and @supabase/supabase-js for optional AI and Supabase features.

npm install atlas-wiki
INSTALL
IMPORT
SIG · ATLAS-WIKI
A
atlas-wiki
storagejavascriptv0.2.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AtlasWiki
import { AtlasWiki } from 'atlas-wiki'
const { AtlasWiki } = require('atlas-wiki')
ESM-only; CommonJS require will fail because package type is module and uses top-level await. Use dynamic import or update to ESM.
createSupabaseStore
import { createSupabaseStore } from 'atlas-wiki/supabase'
import { createSupabaseStore } from 'atlas-wiki'
Separate subpath export for Supabase store to avoid pulling in peer dependency when not needed. Requires @supabase/supabase-js to be installed.
SqliteStore
import { SqliteStore } from 'atlas-wiki/sqlite'
import { SqliteStore } from 'atlas-wiki'
Separate subpath; default SQLite store is also exported from 'atlas-wiki' for convenience but typed separately.

Initializes Atlas WiKi with local SQLite store, ingests a markdown file, and performs a search with actor identity.

import { AtlasWiki } from 'atlas-wiki'; import { SqliteStore } from 'atlas-wiki/sqlite'; const wiki = await AtlasWiki.open({ store: await SqliteStore.open({ path: './.atlas-wiki/data.db', actor: { id: 'user:alice@example.com', type: 'user', groups: ['authenticated'] } }) }); await wiki.ingest({ source: './handbook.md', owner: 'team:ops', visibility: 'internal' }); const results = await wiki.search('remote work', { as: 'user:alice@example.com' }); console.log(results);
Debug
Known issues
gotchaRequires Node.js >=24.0.0 due to reliance on node:sqlite.
fix
Upgrade Node.js to version 24 or later.
affects: <24
breakingESM-only package; CommonJS require() will throw ERR_REQUIRE_ESM.
fix
Use import syntax or dynamic import(). Update tsconfig.json to use ESM: "module": "nodenext".
affects: >=0.0.0
gotchaSupabase store constructor requires actor object; omitting it causes runtime error.
fix
Always provide actor: { id, type, groups } when creating SupabaseStore.
affects: >=0.0.0
deprecatedUsing service role key in browser/client code is a security risk and may be deprecated in future versions.
fix
Use anon key with RLS policies for client-side access; keep service role key server-side only.
affects: >=0.0.0
gotchaCLI commands (awiki) require global install or npx; local install binaries may not be on PATH.
fix
Install globally (npm i -g atlas-wiki) or use npx awiki.
affects: >=0.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported.
Package is ESM-only but you are using require().
fix
Change to dynamic import: const { AtlasWiki } = await import('atlas-wiki'); or convert your project to ESM.
ERR_MODULE_NOT_FOUND: Cannot find module 'atlas-wiki/supabase'
Missing @supabase/supabase-js peer dependency.
fix
Install the peer dependency: npm install @supabase/supabase-js
TypeError: store.actor is not a function
Actor object not provided or invalid shape when creating SupabaseStore.
fix
Ensure you pass { actor: { id: 'user:...', type: 'user', groups: ['authenticated'] } } to createSupabaseStore.
SyntaxError: Unexpected token 'export'
Running the script with CommonJS mode (e.g., node script.cjs with ESM exports).
fix
Use .mjs extension or set type: 'module' in package.json.
Upgrade
Version history
0.2.2latest on npm
Audit
Dependencies
@google/genaioptionalOptional peer dependency for Gemini AI provider integration
@supabase/supabase-jsoptionalOptional peer dependency for Supabase hosted backend
Agent activity
51 hits · last 30 days
node
42
OpenAI (training)
1
Resources
atlas-wiki — npm install atlas-wiki · libregistry