This guide covers setting up the development environment and using the CLI for data operations.
- Node.js: v20 or higher
- pnpm: v10 or higher
- Browser: Chrome, Edge, or any browser supporting OPFS (Origin Private File System).
- Clone the repository.
- Install dependencies:
pnpm install
Start the Vite development server:
pnpm run devOpen http://localhost:5173 in your browser.
The CLI interacts with the database in a Node.js environment. By default, it uses a shared database file at ~/.local/share/do-knowledge-studio/data.db (Linux/macOS) or the corresponding user data path on Windows.
To see CLI-created data in the browser app:
- Open the app in a modern browser (Chrome, Edge).
- Go to AI Harness and click the Settings (gear) icon.
- Click Connect Local Database.
- Select the database directory (usually
~/.local/share/do-knowledge-studio/). - Reload the page when prompted.
The browser will now synchronize its internal storage (OPFS) with the data.db file in that directory.
You can specify a custom database path using the --db-path global flag:
pnpm run cli -- --db-path ./my-data.db entity-listpnpm run cli -- initPopulate your database from a directory of markdown files. The first line of each file (H1) is treated as the entity name.
pnpm run cli -- sync ./path/to/markdown/filesExport your knowledge base to various formats.
Markdown:
pnpm run cli -- export --format md --output ./export/markdownJSON:
pnpm run cli -- export --format json --output ./export/jsonStatic Site:
pnpm run cli -- export --format site --output ./export/site# Create an entity
pnpm run cli -- entity-create "Artificial Intelligence" --type concept --description "The simulation of human intelligence by machines."
# List entities
pnpm run cli -- entity-list
# Create a claim for an entity
pnpm run cli -- claim-create "Artificial Intelligence" "AI can solve complex problems" --confidence 0.95Copy .env.example to .env (if applicable) to configure environment-specific settings.
Note: Currently, the core app is local-first and does not require external API keys for basic functionality.