About
[[medi]] is a fast, editor-centric, command-line notes manager.
medi is a simple and powerful tool for creating and managing your notes, articles, and documentation directly from the
terminal. It's built for developers, writers, and anyone who loves the speed and focus of a command-line workflow.

Philosophy
medi is built on a few guiding principles:
- CLI-first: Everything is done through the terminal. No GUIs or TUIs, no distractions.
- Editor-centric: Your text editor (
$EDITOR) is where you write.medigets you there quickly and saves your work securely. - Local & private: All content is stored on your local machine in a high-performance embedded database. No cloud services, no network access.
- Zero-config start: Install it and start writing immediately.
Features ✨
- Create & Manage Notes: Quickly create new notes using a simple command (
medi new <note-key>). You can add content directly with a flag, pipe it from other commands, or open your favorite text editor for more detailed entries. - Powerful Organisation: Keep your notes tidy with tags. Add multiple tags when creating a note (
--tag) and easily add or remove them later (medi edit --add-tag ...). - Integrated Task Management: Turn your notes into actionable to-do lists. Add tasks to any note (
medi task add ...), list all your pending items, mark them as complete (medi task done ...), and set priorities to focus on what's important. - Full-text Search: Instantly find what you're looking for with a powerful search command (
medi search <term>) that scans the content of all your notes. - Import & Export:
mediis not a data silo. You can easily import entire directories of Markdown files to get started, and export all your notes back to Markdown or JSON at any time. - List & Review: Get a clean, sorted list of all your notes (
medi list) or view the content of any specific note (medi get <note-key>). - Finding Connections & Notes: Use
[[wiki-like]]syntax to link back to a note, and use a fuzzy finder to quickly find and edit a note by its key. - Colourful & Clear Output: Uses coloured output to clearly distinguish between success messages, information, warnings, and errors.
How It Works, DB as Source-of-Truth
medi uses a database-first approach. All your notes are stored in a sled key-value database, making access fast and
reliable. This database is the single source of truth.
To version control your work with Git, medi provides a simple and deliberate workflow:
- Write: Use
medi newandmedi editto manage your notes. - Export: Run
medi export ./my-notesto write all your notes to a local directory as.mdfiles. - Commit: Use Git to commit the exported directory, giving you a complete, version-controlled snapshot of your work.
Installation
You need Rust and Cargo installed.
Installing from crates.io
The easiest way to install medi is to download it from crates.io. You can do it using
the following command:
If you want to update medi to the latest version, execute the following command:
Building from source
Alternatively you can build medi from source using Cargo:
Configuration
On the first run, medi will automatically create a default configuration file at the standard location for your
operating system:
- macOS:
~/Library/Application Support/medi/config.toml - Linux:
~/.config/medi/config.toml - Windows:
C:\Users\<user>\AppData\Roaming\medi\config.toml
You can edit this file to customize medi's behaviour.
Example config.toml
# Path to the database file.
# You can change this to store your notes in a different location,
# for example, inside a cloud-synced folder like Dropbox.
= "/Users/cladam/Library/Application Support/medi/medi_db"
# Default directory for the `medi export` command.
# If this is set, you can run `medi export` without specifying a path.
# Leave it as an empty string ("") if you don't want a default.
= "/Users/cladam/Documents/medi_backups"
Usage
Creating and Editing Notes
-
Create a new note
mediprovides three ways to create a new note:-
Interactively (default): Opens your default editor for long-form content.
# With tags: Add tags to your note for better organisation. # With a title: Specify a title for your note. -
With a direct message: Perfect for quick, one-line notes.
-
From a pipe: Use the output of other commands as your note content.
|
-
-
Edit an existing note
# Add tags to a note # Remove tags from a note
Using Templates 📝
medi can create new notes from predefined templates to speed up your workflow. On its first run, medi creates an
example meeting.md template in the configuration directory.
-
Location of templates:
- macOS:
~/Library/Application Support/medi/templates/ - Linux:
~/.config/medi/templates/ - Windows:
%APPDATA%\medi\templates\
- macOS:
-
Create a note from a template:
-
Create your own templates: Simply add any
.mdfile to your templates directory. If you createblog.md, you can use it withmedi new ... --template blog.
Finding, Viewing & Listing Notes
⚠️ This feature is not supported on Windows.
-
Interactively find a note Open a fuzzy finder to quickly search for and edit a note by its key.
This will open an interactive TUI to help you find the note you want to edit.
-
Get a note's content Prints the note directly to the console. This is perfect for piping to other tools.
# Pipe to a Markdown renderer like mdcat | # Get a note in Json format # Get one or several notes via a tag -
List all notes The
listcommand provides a rich overview of your notes, including their keys and tags.Output:
- cladam_github_io_readme [#blog #project] - medi-blogpost [#rust] -
Sort your notes You can sort the list by creation or last modification date using the
--sort-byflag. The default is to sort alphabetically by key.# Sort by the most recently modified notes # Sort by when the notes were created
Searching & Indexing
medi includes a full-text search engine (tantivy) that lets you find notes by their content, title, or tags.
Search for a note
# Find all notes containing the word "rust"
# Search for a phrase
Output:
Search Results:
- medi-blogpost
- rust-cli-ideas
Rebuild the search index
If your search index ever gets out of sync or you're setting up medi for the first time with an existing database, you
can rebuild the entire index.
Deleting a Note
-
Delete a note You will be prompted for confirmation.
# Skip the confirmation prompt
Versioning with Export/Import
-
Export all notes to a directory Creates a version-controllable snapshot of your database.
-
Export all notes to a Json document
-
Export notes via a tag
-
Import notes from a directory Restores notes from a directory of
.mdfiles.# By default, skips any notes that already exist # Import a single # Overwrite existing notes with the imported versions
Task Management
medi includes a simple task manager to help you turn notes into actionable to-do lists.
-
Add a task to a note
-
List all tasks
The list is sorted by priority and status.
Output:
Tasks: [42] [Prio] ⭐ : Review final draft (for note 'medi-readme') [43] [Open] : Add usage examples (for note 'medi-readme') [44] [Done] : Write introduction (for note 'my-blog-post') -
Prioritise a task
-
Complete a task
-
Delete a task
-
Clear all tasks
This is a destructive action
Checking Status
The status command provides a high-level overview of your database or detailed statistics for a single note.
-
Get a global overview:
Output:
medi status Notes: 42 Tasks: 8 open (3 priority) -
Get stats for a specific note:
Output:
medi-blogpost Key: medi-blogpost Tags: rust, cli Words: 584 Reading Time: ~3 minute(s) Created: Mon, 12 Sep 2025 10:30:00 +0200 Modified: Tue, 13 Sep 2025 15:00:00 +0200
Discover Connections
-
Find backlinks for a note Discover all the notes that link to a specific topic using
[[wiki-link]]syntax.Output:
Found 1 backlinks for 'rust': - medi-project
Markdown Linting
medi can check your notes for common Markdown issues using rumdl.
-
Lint a specific note
-
Lint all notes
Formatting and fixing the issues is left to your editor or other tools.
Markdown Preview
medi includes a simple preview mode using egui to render your Markdown notes in a window.
-
Preview a note
Shell Completion
To make medi even faster to use, you can enable shell completion. Add one of the following lines to your shell's
configuration file.
For Zsh (~/.zshrc):
For Bash (~/.bashrc):
For Fish (~/.config/fish/config.fish):
|
Project Roadmap 🗺️
This section tracks the implementation status of medi's features. Contributions are welcome!
- All core commands (new, get, list, edit, delete, import, export).
- Configuration file for settings (e.g. database path).
- Support for note metadata (tags, creation dates).
-
exportnotes by tag. - Full-text search over note content.
- Implement a
taskcommand for tracking the status of notes. - Implement a simple status command
- Add a Fuzzy Finder for notes
- Add templates for different documents
- Wiki-Style Linking
- Linting of notes
- A preview mode using egui
- ... your idea here?