A feature-rich Node.js CLI application for managing notes. This app uses a JSON file (db.json) as its local database and supports operations like adding, retrieving, filtering, removing, and viewing notes in a web browser.
- Add Notes: Create new notes with content and optional tags.
- List Notes: View all saved notes in the CLI or browser.
- Search Notes: Find notes by ID, tags, or content.
- Delete Notes: Remove specific notes or clear all notes.
- View Notes in Browser: Launch a local server to view notes in an HTML format.
-
Clone the repository:
git clone https://github.com/alimagdye/note-app.git cd note-app -
Install Dependencies:
npm install
-
Set Up as a Global CLI Tool:
npm link
This will make the note command globally accessible.
After installation, use the note command with the following options:
- Add a Note
note new "<note content>" --tags "tag1,tag2,..."Creates a new note with content and optional tags. Example:
note new "Complete project documentation" --tags "work, urgent "
- List All Notes
note allDisplays all saved notes in the CLI.
- Search Notes
note find --id <ID> --tags "tag1, tag2" --content "search term"Find notes by ID, tags, or content. Example:
note find --tags "work" --content "project"- Remove Notes
note remove --id <ID> --tags tag1,tag2,... --content "term"Deletes notes matching the provided filters. Example:
note remove --tags "urgent"
- Clear All Notes
note cleanRemoves all notes from the database.
- View Notes in Browser
note web [port]Launches a local server to view notes in the browser. The default port is 5000. Example:
note web 3000
In the browser notes are displayed in a structured, styled HTML format.
--tags, -t: Specify tags for filtering or adding notes.
--id, -i: Specify the ID of the note for filtering.
--content, -c: Specify the content for filtering.
--help, to show information about all commands and flags
Contributions are welcome! If you find a bug or have a feature request, please create an issue or submit a pull request.