Skip to content

2aronS/mindmark

Repository files navigation

# mindmark

![license](https://img.shields.io/badge/license-MIT-blue)
![status](https://img.shields.io/badge/status-active-brightgreen)
![typescript](https://img.shields.io/badge/typescript-5.0+-blue)
![platform](https://img.shields.io/badge/platform-linux%20%7C%20macos%20%7C%20windows-lightgrey)
![build](https://img.shields.io/badge/build-passing-brightgreen)
![version](https://img.shields.io/badge/version-0.1.0-orange)

> 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 mindmark

or build from source:

git clone https://github.com/yourusername/mindmark.git
cd mindmark
npm install
npm run build

usage

import { 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.git

api

MindMark

main class for interacting with notes.

constructor(config?: MindMarkConfig)

creates a new instance.

interface MindMarkConfig {
  storePath?: string;
  aiProvider?: 'openai' | 'anthropic' | 'local';
  apiKey?: string;
  model?: string;
}

createNote(name: string, content: string): Promise<Note>

creates a new note with given name and content.

getNote(name: string): Promise<Note>

retrieves note by name.

updateNote(name: string, content: string): Promise<Note>

updates existing note content.

deleteNote(name: string): Promise<void>

deletes a note.

search(query: string, options?: SearchOptions): Promise<Note[]>

full-text search across all notes.

interface SearchOptions {
  limit?: number;
  tags?: string[];
  dateRange?: { start: Date; end: Date };
}

aiAssist(noteName: string, request: AIRequest): Promise<string>

sends note content to AI with a specific request.

interface AIRequest {
  prompt: string;
  model?: string;
  temperature?: number;
  maxTokens?: number;
}

export(noteName: string, options: ExportOptions): Promise<void>

exports note to various formats.

interface ExportOptions {
  format: 'html' | 'pdf' | 'docx' | 'txt';
  output: string;
  theme?: string;
}

Note

interface Note {
  id: string;
  name: string;
  content: string;
  tags: string[];
  created: Date;
  modified: Date;
  metadata: Record<string, any>;
}

features

  • 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

configuration

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 directory
  • OPENAI_API_KEY: api key for openai
  • ANTHROPIC_API_KEY: api key for anthropic

contributing

prs welcome. open an issue first for big changes.

run tests:

npm test

run linter:

npm run lint

license

MIT

About

Cross-platform Markdown note-taking with integrated AI assistance

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors