Skip to content

A simple bash-based note CLI that supports creating notes with nano, listing with numbers, fuzzy partial selection, and short command aliases, packaged with GitHub Actions for downloadable releases and quick global installs.

Notifications You must be signed in to change notification settings

Anant1711/notes-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note CLI Tool

A simple command-line note-taking tool built with bash. It uses the nano text editor by default to create, read, edit, delete, search, and list notes.

Features

  • Create notes quickly with markdown support
  • List notes with numbering
  • Read notes with beautiful markdown formatting by default
  • View raw markdown when needed
  • Edit notes with your preferred editor
  • Delete notes safely
  • Search notes by content
  • Support for short command aliases (e.g., n for new, r for read)
  • Auto-installs markdown renderers with .deb package
  • Version tracking built-in
  • Simple and portable bash script

Installation

Option 1: Install via .deb package (Recommended for Ubuntu/Debian)

  1. Download the latest .deb package from the GitHub Releases page.
  2. Install it using:
sudo dpkg -i note-cli_*.deb

Option 2: Manual install (for any Linux)

  1. Download the note script from the releases or clone this repo.
  2. Make it executable and move to your PATH:
chmod +x note
sudo mv note /usr/local/bin/
  1. (Optional) Add environment variables to your shell config (~/.bashrc or ~/.zshrc):
export NOTES_DIR="$HOME/notes"
export EDITOR="nano"
source ~/.bashrc

Usage

note n "My new note"    # Create a new note
note l                   # List notes
note r 1                 # Read first note (beautiful formatting)
note raw 1               # View raw markdown (if needed)
note e mqtt              # Edit note with "mqtt" in its name
note s keyword           # Search notes for keyword
note d 1                 # Delete first note
note h                   # Show help
note v                   # Show version

Beautiful Markdown Rendering

The read command (note r) now renders your markdown notes beautifully by default! When you install via the .deb package, it automatically sets up the best markdown renderer available.

Auto-Installation with .deb Package

The .deb package automatically handles dependencies:

  • Core dependencies: nano, grep, find, sed, coreutils
  • Automatic setup: Tries to install glow via snap, falls back to bat if needed
  • Zero configuration: Works out of the box with beautiful formatting

Rendering Priority (Auto-detected)

  1. glow - Beautiful terminal markdown renderer (auto-installed)
  2. bat - Syntax highlighter with markdown support (fallback)
  3. mdcat - Rust-based renderer (if available)
  4. pandoc - Universal document converter (if available)
  5. Built-in formatter - Always available as final fallback

Manual Installation (if needed)

# Best option - glow
sudo snap install glow

# Alternative - bat  
sudo apt install bat

# If you have Rust - mdcat
cargo install mdcat

Built-in Formatter Features

Even without external tools, the built-in formatter provides excellent formatting:

  • 🎨 Headers (H1-H4) with colored styling and visual separators
  • Bold and italic text formatting
  • Code blocks and inline code highlighting
  • • Bullet points and → numbered lists with proper indentation
  • 🔗 Links with URL display
  • ──── Horizontal rules ────
  • │ Blockquotes with visual indicators
  • Proper spacing and line breaks

Raw Markdown Access

If you need to see the raw markdown (for editing or debugging):

note raw 1              # View unformatted markdown

Uninstallation

Remove via Package Manager

# Remove the package (keeps your notes and dependencies)
sudo apt remove note-cli

# Complete removal with cleanup options
sudo apt purge note-cli

Uninstallation Process

When you uninstall note-cli:

  1. During removal (apt remove):

    • Removes the note command
    • Asks if you want to remove markdown rendering dependencies (glow, bat)
    • Gives you the choice to keep or remove them
  2. During purge (apt purge):

    • Performs complete removal
    • Asks if you want to delete your notes directory (~/notes)
    • Gives you the choice to preserve or delete your notes

Manual Cleanup (if needed)

# Remove dependencies manually
sudo snap remove glow          # If installed via snap
sudo apt remove bat           # If installed via apt

# Remove notes directory manually
rm -rf ~/notes                # ⚠️ This deletes all your notes!

# Remove any custom configuration
unset NOTES_DIR EDITOR         # Clear environment variables

Safe Uninstallation

The package uninstaller is designed to be safe:

  • Never removes dependencies without asking
  • Never deletes notes without explicit confirmation
  • Checks dependencies before removal to avoid breaking other packages
  • Provides clear options for what to keep or remove

Versioning

This tool uses semantic versioning. See the current version with:

note v

License

MIT License

About

A simple bash-based note CLI that supports creating notes with nano, listing with numbers, fuzzy partial selection, and short command aliases, packaged with GitHub Actions for downloadable releases and quick global installs.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages