# mindmark






> Cross-platform Markdown note-taking with integrated AI assistance
## table of contents
- [install](#install)
- [usage](#usage)
- [api](#api)
- [features](#features)
- [configuration](#configuration)
- [contributing](#contributing)
- [license](#license)
## install
```bash
npm install -g mindmarkor build from source:
git clone https://github.com/yourusername/mindmark.git
cd mindmark
npm install
npm run buildimport { MindMark } from 'mindmark';
// initialize with optional config
const mm = new MindMark({
storePath: './notes',
aiProvider: 'openai',
apiKey: process.env.OPENAI_API_KEY
});
// create a note
await mm.createNote('project-ideas', '# Project Ideas\n\nInitial brainstorm...');
// ask AI to expand or edit
const enhanced = await mm.aiAssist('project-ideas', {
prompt: 'expand the second bullet point',
model: 'gpt-4'
});
// search notes
const results = await mm.search('typescript patterns');
// export to different formats
await mm.export('project-ideas', { format: 'html', output: './dist' });cli usage:
# create new note
mindmark new "meeting-notes"
# open editor
mindmark edit "meeting-notes"
# ai commands
mindmark ai summarize "meeting-notes"
mindmark ai ask "meeting-notes" "what are the action items?"
# search
mindmark search "typescript"
# sync notes
mindmark sync --remote git@github.com:user/notes.gitmain class for interacting with notes.
creates a new instance.
interface MindMarkConfig {
storePath?: string;
aiProvider?: 'openai' | 'anthropic' | 'local';
apiKey?: string;
model?: string;
}creates a new note with given name and content.
retrieves note by name.
updates existing note content.
deletes a note.
full-text search across all notes.
interface SearchOptions {
limit?: number;
tags?: string[];
dateRange?: { start: Date; end: Date };
}sends note content to AI with a specific request.
interface AIRequest {
prompt: string;
model?: string;
temperature?: number;
maxTokens?: number;
}exports note to various formats.
interface ExportOptions {
format: 'html' | 'pdf' | 'docx' | 'txt';
output: string;
theme?: string;
}interface Note {
id: string;
name: string;
content: string;
tags: string[];
created: Date;
modified: Date;
metadata: Record<string, any>;
}- local-first storage: all notes stored locally as plain markdown files
- ai integration: openai, anthropic, or local models for summaries, rewrites, and questions
- full-text search: fast search with tag and date filtering
- git sync: optional git integration for version control and remote backup
- cross-platform: runs on linux, macos, and windows
- export: convert notes to html, pdf, docx, or plain text
- extensible: plugin system for custom ai providers and export formats
create ~/.mindmark/config.json:
{
"storePath": "~/documents/notes",
"aiProvider": "openai",
"defaultModel": "gpt-4",
"editor": "vim",
"theme": "dracula",
"sync": {
"enabled": true,
"remote": "git@github.com:user/notes.git",
"autoCommit": true
}
}environment variables:
MINDMARK_STORE_PATH: override default notes directoryOPENAI_API_KEY: api key for openaiANTHROPIC_API_KEY: api key for anthropic
prs welcome. open an issue first for big changes.
run tests:
npm testrun linter:
npm run lintMIT