qnote

Crates.ioqnote
lib.rsqnote
version1.1.0
created_at2025-10-18 03:34:00.031196+00
updated_at2025-10-20 23:41:54.969029+00
descriptionA fast, lightweight terminal-based note-taking application
homepage
repositoryhttps://github.com/adi-sen/qnote
max_upload_size
id1888762
size144,860
Aditya Sengupta (adi-sen)

documentation

README

qnote

Quick Note - A fast, lightweight terminal-based note-taking application written in Rust

Crates.io License: MIT

Features

Fast, lightweight note-taking with CLI and TUI interfaces. Tag-based organization with fuzzy search, external editor integration, and markdown preview.

Quick Start

# Install
cargo install qnote

# Launch interactive TUI
qnote

# CLI usage
qnote add "My Note" "Content here" --tags work,ideas
qnote list
qnote search "keyword"

Installation

From Crates.io (Recommended)
cargo install qnote
Pre-built Binary

Linux/macOS (one-liner):

curl -sSL https://raw.githubusercontent.com/adi-sen/qnote/master/scripts/install.sh | bash

Manual download:

  • Download from Releases
  • Extract and move to PATH

Windows:

  • Download qnote-Windows-x86_64.exe from Releases
  • Rename to qnote.exe and add to PATH
From Source
git clone https://github.com/adi-sen/qnote.git
cd qnote
cargo install --path . --features bundled  # Portable version

Build variants:

  • --features bundled - Bundled SQLite (portable, larger binary)
  • Default - System SQLite (smaller, requires SQLite installed)

Usage

CLI Commands

See full CLI examples and scripting guide

Basic Operations
# Create
qnote add <title> <content> [--tags tag1,tag2]

# Read
qnote list [--tag work] [--sort title] [--limit 10]
qnote show <id|pattern>

# Update
qnote edit <id|pattern> [--title "..."] [--content "..."]

# Delete
qnote delete <id|pattern> [--yes]
Search & Organization
# Search
qnote search "keyword"

# Tag management
qnote tags                # List all tags with counts
qnote list --tag work     # Filter by tag

# Sorting
qnote list --sort updated  # updated (default), created, title
Import/Export
# Export note to markdown
qnote export <id|pattern> [-o output.md]

# Import from markdown files
qnote import notes/*.md

# Statistics
qnote stats

Interactive TUI

Keybindings

Navigation:

  • j/k or ↓/↑ - Move selection
  • g/G - Jump to top/bottom
  • Ctrl+j/k - Scroll preview

Actions:

  • n or a - New note
  • e or Enter - Edit note
  • d - Delete note
  • x - Export to markdown
  • / - Search mode
  • s - Cycle sort mode
  • Esc - Clear search/cancel
  • q - Quit

Search Mode:

  • Type to filter (fuzzy matching)
  • Ctrl+n/p - Next/previous match
  • Enter - Select note
  • Esc - Exit search

Configuration

Setup & Location
# Generate config file
qnote config

# View current config
qnote config --show

Config locations:

  • Linux/BSD: ~/.config/qnote/config.toml
  • macOS: ~/Library/Application Support/qnote/config.toml
  • Windows: %APPDATA%\qnote\config.toml

Database locations:

  • Linux: ~/.local/share/qnote/notes.db
  • macOS: ~/Library/Application Support/qnote/notes.db
  • Windows: %APPDATA%\qnote\notes.db
Configuration Options
[ui]
split_ratio = 0.4                    # List pane width (0.1-0.9)
message_display_keypresses = 5       # Status message duration
preview_scroll_step = 3              # Lines per scroll
preview_max_scroll_buffer = 10       # Preview scroll bounds
header_lines = 3                     # Preview header lines
max_markdown_formatting_buffer = 10  # Markdown formatting buffer

[editor]
default_editor = "nvim"              # Override $EDITOR (optional)
secure_temp_files = true             # 0600 permissions (Unix only)

[keybindings]
quit = "q"
new_note = "n"
delete = "d"
edit = "e"
search = "/"
export = "x"
sort = "s"
goto_top = "g"
goto_bottom = "G"
move_down = "j"
move_up = "k"

[database]
wal_mode = true                      # Write-Ahead Logging
cache_size_kb = -64000               # 64MB cache (negative = KB)
synchronous = "NORMAL"               # OFF, NORMAL, FULL, EXTRA
temp_store = "MEMORY"                # DEFAULT, FILE, MEMORY
Note Format

When editing notes in external editor:

Note Title
#tag1 #tag2 #tag3

Note content goes here.
Multiple lines supported.
  • Line 1: Title
  • Line 2: Tags (optional, # prefix)
  • Line 3: Blank separator
  • Line 4+: Content

Development

Project Structure
src/
├── main.rs
├── cli.rs              # CLI definitions
├── db.rs               # Database layer
├── commands/           # Command handlers
│   ├── note_ops.rs     # CRUD operations
│   ├── list.rs         # List, tags, stats
│   ├── io.rs           # Import/export
│   └── config.rs       # Config management
├── config/             # Configuration
│   ├── ui.rs
│   ├── keybindings.rs
│   ├── editor.rs
│   └── database.rs
├── utils/              # Utilities
│   ├── formatting.rs
│   ├── parsing.rs
│   ├── conversion.rs
│   └── interaction.rs
└── tui/                # Terminal UI
    ├── app.rs
    ├── render.rs
    ├── editor.rs
    └── markdown.rs
Building
# Development build
cargo build

# Release build (optimized)
cargo build --release

# Portable version (bundled SQLite)
cargo build --release --features bundled

# Run tests
cargo test

# Format & lint
cargo fmt
cargo clippy

Roadmap

Core Functionality

  • Configuration file
  • Backup/restore functionality

TUI Improvements

  • Tag filtering (filter notes by tag in TUI)
  • Delete confirmation dialog
  • Display note ID and creation date in preview
  • Inline title editing (rename without external editor)
  • Statistics/dashboard view
  • Tag management view (list all tags with counts)

License

MIT License - see LICENSE for details.

Contributing

Contributions welcome! Please feel free to submit a Pull Request.

Acknowledgments

Built with:

Commit count: 0

cargo fmt