Skip to main content

CLI notes manager with tags, colored output, exports and shell autocompletion

Project description

๐Ÿ“ mynotes-cli โ€” Simple Terminal Notes Manager

Manage colorful notes with tags, export to TXT/MD/PDF, and enjoy autocompletion in your terminal.


๐Ÿš€ Installation

1๏ธโƒฃ Clone or unpack the project

git clone https://github.com/antoninsiska/mynotes-cli.git
cd mynotes-cli

Or if you have a ZIP file:

unzip mynotes-cli.zip
cd mynotes-cli

2๏ธโƒฃ Install locally

pip install -e .

This command makes the mynotes command available in your Python environment.

๐Ÿ’ก Optional (for PDF export):

pip install reportlab

โš™๏ธ Enable autocompletion

mynotes uses argcomplete, which allows shell autocompletion by pressing TAB.

๐Ÿš Bash

Run:

python -m argcomplete.global

Then restart your shell or reload it:

source ~/.bashrc

๐ŸŒ€ Zsh

autoload -U bashcompinit && bashcompinit
eval "$(register-python-argcomplete --shell zsh mynotes)"

To make it persistent, add the last line to your ~/.zshrc.

๐ŸŸ Fish

register-python-argcomplete --shell fish mynotes | source

Or permanently:

register-python-argcomplete --shell fish mynotes > ~/.config/fish/completions/mynotes.fish

โšก Shortcut alias my

If you prefer shorter commands:

alias my="mynotes"

To make it persistent:

echo 'alias my="mynotes"' >> ~/.bashrc
source ~/.bashrc

๐Ÿง  Basic usage

Add a note

mynotes add "Buy milk"
mynotes add "Finish presentation" --tags school fll

List notes

mynotes list
mynotes list --tag school

list shows a colorful table with tags (using Rich).
Use --plain for plain text output.

Edit a note

mynotes edit 2 --text "Buy milk and eggs"
mynotes edit 2 --add-tags ftc --remove-tags school

Delete a note

mynotes delete 1

๐Ÿท๏ธ Tags

List all tags

mynotes tag list

Add a new tag

mynotes tag add school --color bright_blue

Edit a tag

mynotes tag edit school --new-name School --color yellow

Delete a tag

mynotes tag delete fll

Available colors:
black, red, green, yellow, blue, magenta, cyan, white

  • bright variants such as bright_blue, bright_yellow.

Tags are automatically styled for contrast:

  • light colors โ†’ black text
  • dark colors โ†’ white text

๐Ÿ“ค Export

To TXT

mynotes export --format txt --out notes.txt

To Markdown

mynotes export --format md --out notes.md --tag ftc

To PDF

mynotes export --format pdf --out notes.pdf

PDF export uses reportlab (if installed). Otherwise, a simple fallback is used.


๐Ÿ“ฆ Storage

  • Notes: ~/.mynotes.json
  • Tags: ~/.mynotes_tags.json

You can override paths:

MYNOTES_PATH=/custom/path/notes.json MYNOTES_TAGS_PATH=/custom/path/tags.json mynotes list

๐Ÿงฉ Autocomplete examples

Try pressing TAB:

mynotes [TAB]          # โ†’ add, list, edit, delete, tag, export
mynotes tag [TAB]      # โ†’ list, add, edit, delete
mynotes list --tag [TAB]  # โ†’ shows existing tags
mynotes edit [TAB]        # โ†’ offers existing note IDs

๐Ÿ’ก Tips

  • mynotes --l is a shortcut for mynotes list
  • mynotes --a "text" adds a note
  • mynotes --d 3 deletes note with ID 3

๐Ÿงฐ Troubleshooting

โŒ mynotes: command not found

  • Make sure your virtual environment is active
  • Reinstall:
    pip install -e .
    
  • Or run manually:
    python -m mynotes.cli
    

โŒ Autocompletion not working

  • Run:
    python -m argcomplete.global
    
  • Then restart your terminal.

๐ŸŽจ Example output

๐Ÿ“’ mynotes
โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ IDโ”ƒ Note               โ”ƒ Tags       โ”ƒ Created      โ”ƒ Updated      โ”ƒ
โ”ฃโ”โ”โ”โ•‹โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‹โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‹โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‹โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ซ
โ”ƒ 1 โ”ƒ Buy milk           โ”ƒ school fll โ”ƒ 5 min ago    โ”ƒ -            โ”ƒ
โ”ƒ 2 โ”ƒ Finish presentationโ”ƒ ftc        โ”ƒ 1 h ago      โ”ƒ 10 min ago   โ”ƒ
โ”—โ”โ”โ”โ”ปโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ปโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ปโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ปโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”›

๐Ÿงก Author

Antonรญn ล iลกka
CLI utility built in Python using argparse, rich, argcomplete, and reportlab.
Version: 0.3.0

ยฉ 2025 Antonรญn ล iลกka โ€” Licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mynotes_cli-0.3.5.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mynotes_cli-0.3.5-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file mynotes_cli-0.3.5.tar.gz.

File metadata

  • Download URL: mynotes_cli-0.3.5.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for mynotes_cli-0.3.5.tar.gz
Algorithm Hash digest
SHA256 8e5200019fff880481b9b6b594d346b883b9db971c2140a632dd5021c3831788
MD5 ab48c54a75e76474aeb69837aabd2430
BLAKE2b-256 dc9d0a635518225c841c014ed246af67c1153c2113f7cb58efa1876bc8ec3341

See more details on using hashes here.

File details

Details for the file mynotes_cli-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: mynotes_cli-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for mynotes_cli-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 207427c5d293c9f31644518599226bcae87d6192aafaf197ed948e8d259f7a8e
MD5 38d5063ca896cdd84ec66095bffe7d32
BLAKE2b-256 59f2280df6bebf5f0206ce0944100c2d3d16cf6af1c5bc8b008d02bbed9597ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page