Registry / productivity / draftmora

draftmora

JSON →
library0.1.2jsnpmunverified

Draftmora is a local-first AI agent board that helps you capture messy ideas and turn them into structured tasks. It runs entirely on your machine, stores board data in SQLite, and provides an agent chat that can propose task changes before applying them. Current stable version is 0.1.2, released as an early-stage npm package. It requires Node.js >=22.14.0 and is built with TypeScript, Fastify, React, Vite, and shadcn/Radix UI. Key differentiators include local-first storage (no cloud dependency), OpenAI account auth as an alternative to API keys, and durable local memory files (USER.md, MEMORY.md). The tool offers task status, priority, tags, and execution history tracking.

npm install draftmora
INSTALL
IMPORT
SIG · DRAFTMORA
D
draftmora
productivityjavascriptv0.1.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.

Draftmora
import { Draftmora } from 'draftmora'
const Draftmora = require('draftmora')
Draftmora is ESM-only. CommonJS requires bundler support or dynamic import.
startServer
import { startServer } from 'draftmora/server'
import { startServer } from 'draftmora'
startServer is exported from a separate server subpath, not the main entry.
Board
import { Board } from 'draftmora/board'
import { Board } from 'draftmora'
Board class is exported from 'draftmora/board'. Type exports may require 'import type'.
Agent
import { Agent } from 'draftmora/agent'
import { Agent } from 'draftmora'
Agent is exported from 'draftmora/agent'. It is a class and also exported as a type.

Shows how to programmatically start the Draftmora server with optional OpenAI API key.

import { startServer } from 'draftmora/server'; const apiKey = process.env.OPENAI_API_KEY ?? ''; async function main() { const server = await startServer({ port: 4141, boardPath: './data/board.db', openAi: apiKey ? { apiKey } : undefined, }); console.log('Draftmora API running on', server.url); } main().catch(console.error);
Debug
Known issues
breakingMinimum Node.js version is 22.14.0. Node.js 22.13 and earlier will not work.
fix
Upgrade Node.js to >=22.14.0 (Node.js 24 recommended).
affects: <22.14.0
gotchaThe default API port is 4141 and the default web dev port is 5173. Setting the legacy PORT environment variable only affects the API port if API_PORT is not set.
fix
Use API_PORT and WEB_PORT explicitly instead of relying on the legacy PORT variable.
affects: >=0.1.0
gotchaOpenAI account auth requires an eligible OpenAI account/subscription. If not available, you must provide OPENAI_API_KEY or configure a key in Settings.
fix
Ensure OPENAI_API_KEY is set in the environment or configure via the app Settings if account auth is not available.
affects: >=0.1.0
deprecatedThe PORT environment variable is deprecated in favor of API_PORT and WEB_PORT.
fix
Replace PORT with API_PORT for the API server and WEB_PORT for the web dev server.
affects: >=0.1.2
Errors
Common errors & fixes
Error: Cannot find module 'draftmora'
Using CommonJS require() instead of ESM import.
fix
Change require('draftmora') to import ... from 'draftmora' or use dynamic import() in a CommonJS context.
TypeError: draftmora_1.startServer is not a function
Importing startServer from the main entry 'draftmora' instead of 'draftmora/server'.
fix
Use import { startServer } from 'draftmora/server'.
Error: SQLITE_ERROR: no such table: tasks
The database path does not contain an initialized Draftmora board.
fix
Ensure the board database exists (e.g., by running 'npx draftmora' once) or call startServer with the correct boardPath.
Error: OpenAI API key is required
OpenAI API key not provided and account auth is not configured.
fix
Set OPENAI_API_KEY environment variable or configure account auth in the app Settings.
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies
better-sqlite3requiredSQLite database driver for local board storage
fastifyrequiredWeb framework for the API server
openaioptionalOpenAI SDK for AI agent chat and task execution
Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
draftmora — npm install draftmora · libregistry