Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mkaz/jotit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jotit - simple note taking

A command-line tool to quickly take notes, uses AI for search, and summaries.

Overview

One of the problems with taking notes is always having to think about the file you're creating, where you're going to file it, what to name, the folder structure, etc. All this gets in the way of taking quick notes.

So I thought can AI help eliminate this friction?

Goals

  • Quick Note Capture: Add notes instantly from the command line
  • Semantic Search: Find notes using natural language, not just keywords
  • AI-Powered Tagging: Automatically generate relevant tags for your notes
  • AI Summarization: Get intelligent summaries of your notes over time
  • Smart Input Validation: Prevents single-word notes to avoid accidental commands
  • Background Processing: Embeddings and AI features work asynchronously
  • SQLite-based: Reliable local storage with vector search capabilities

Installation

Prerequisites

  • Python 3.9 or higher
  • uv (recommended) or pip

Install for Development

git clone https://github.com/mkaz/jotit.git
cd jotit
uv pip install .

Quick Start

1. Set up your API key (optional)

For AI features like auto-tagging and summarization, set your Anthropic API key:

export ANTHROPIC_API_KEY="your-api-key-here"

2. Add your first note

# Simple note
jotit "Had a great idea about improving user onboarding"

# With tags
jotit "Met with the design team about the new homepage" --tags "meeting,design"

# From stdin
echo "Important reminder for tomorrow" | jotit

3. Search your notes

# Semantic search - finds related concepts even if exact words don't match
jotit search "design discussions"

# List recent notes
jotit list

# List notes from a specific date
jotit list --date 2024-01-15
jotit list --after 2024-01-01
jotit list --before 2024-12-31
jotit list --tags "work,project"

4. Summarize Notes

# Get a summary of recent notes
jotit summary --days 7

# Process background jobs (embeddings and auto-tagging)
jotit worker

AI Features

# Generate summaries
jotit summary                    # Last 7 days
jotit summary --days 30          # Last 30 days
jotit summary --after 2024-01-01 # Since specific date

# Process background jobs
jotit worker                     # Process all pending jobs
jotit worker --max-jobs 10       # Limit number of jobs processed

Note Management

# Edit an existing note
jotit edit 123                   # Opens note #123 in your default editor

# Delete a note (with confirmation)
jotit delete 123                 # Permanently deletes note #123

# Auto-tag a note with AI
jotit auto-tag 123               # Generates relevant tags for note #123

Database Management

# Show database statistics
jotit stats

Configuration

Jotit can be configured via environment variables or a TOML configuration file located at ~/.config/jotit/jotit.toml. See jotit-sample.toml for a complete example with all available options.

Environment Variables

  • ANTHROPIC_API_KEY - Required for AI features (auto-tagging, summarization)
  • JOTIT_DB - Database file location (default: ./jotit.db)
  • JOTIT_MODEL - Embedding model name (default: all-MiniLM-L6-v2)

Configuration File

Create ~/.config/jotit/jotit.toml to customize default behavior:

[search]
# Default similarity threshold (0.0-1.0, set to 0.0 to disable)
threshold = 0.40
# Enable hybrid search with keyword boosting by default
hybrid = true

[ai]
model = "claude-3-5-sonnet-20241022"
tag_model = "claude-3-5-haiku-20241022"

[embedding]
model = "all-MiniLM-L6-v2"

[database]
path = "~/.config/jotit/jotit.db"

Development

Setup Development Environment

git clone https://github.com/mkaz/jotit.git
cd jotit

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install in development mode
just install-dev

Development Commands

Jotit uses just for task automation:

just install      # Install package
just install-dev  # Install in editable mode for development
just test         # Run test suite
just lint         # Check code with ruff linter
just lint-fix     # Auto-fix linting issues
just format       # Format code with ruff
just type-check   # Run type checking with mypy
just check        # Run all quality checks
just clean        # Remove build artifacts

Running Tests

# Run all tests
just test

# Run specific test file
pytest tests/test_db.py

# Run with coverage
pytest --cov=jotit --cov-report=html

Architecture

Core Components

  • CLI Interface - Rich-powered command-line interface with intelligent parsing
  • Database Layer - SQLite with vector search using sqlite-vec extension
  • Embedding System - Semantic search using sentence-transformers
  • AI Integration - Claude API for summarization and auto-tagging
  • Job Queue - Background processing for expensive operations

Key Features

  • Asynchronous Processing: Embeddings and AI operations run in background
  • Vector Search: Semantic similarity using 384-dimensional embeddings
  • Intelligent Parsing: Text without commands automatically becomes notes
  • Type Safety: Full type annotations with mypy strict mode

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run the quality checks (just check)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

License

MIT License - see LICENSE file for details.

Author

Created by Marcus Kazmierczak


Jotit - jot it down, find it later

About

A simple command-line tool to jot notes

Resources

License

Stars

Watchers

Forks

Packages

No packages published