Skip to content

Raaghavi-K-R/Notescli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📝 NOTECLI - A CLI Tool to take notes with Auth0 Security

NOTECLI is a Python-based Command-Line Interface (CLI) tool that allows users to securely create, read, update, and delete notes from the terminal. It integrates with Auth0 for authentication and MongoDB (via Atlas) as the backend database. Built with Flask, it offers a seamless way to manage your notes from any system.


🚀 Features

  • User Authentication using Auth0
  • 📓 Create, 📝 Read, ✏️ Update, 🗑️ Delete notes
  • ☁️ Cloud-hosted backend using Flask + MongoDB
  • 🔐 Secure access with OAuth2 token-based auth
  • 🔌 Easily installable globally via PyPI
  • 🧪 Testable on any system using notescli commands

📦 Installation

You can install NOTECLI globally on any system via PyPI:

pip install notescli-tool

Note: Make sure Python (>=3.6) and pip are installed.


🔑 Authentication

NOTECLI uses Auth0 for login. You must log in before using note commands.

notescli login
  • A browser window will open prompting Auth0 login.
  • After login, you'll be asked to paste the token into the terminal.
  • The token is securely stored for subsequent operations.

To logout:

notescli logout

To see the currently authenticated user:

notescli whoami

💻 CLI Commands

Create a New Note

notescli create
  • Prompts for note title and content
  • Sends data securely to the server

Read All Notes or a Specific Note

notescli read            # Show all your notes
notescli read <note_id>  # Show a single note by ID

Update a Note

notescli update <note_id>
  • Prompts for new title and content

Delete a Note

notescli delete <note_id>

Install (from GitHub)

pip install git+https://github.com/Raaghavi-K-R/Notescli.git

🌐 Backend Server

  • Runs on Flask (default port 5000)
  • Secured by OAuth2 via Auth0
  • Stores notes in MongoDB Atlas
  • Each note is associated with a unique Auth0 user ID

Example API endpoints:

  • GET /notes – get all notes
  • POST /notes – create a new note
  • GET /notes/<id> – fetch a specific note
  • PUT /notes/<id> – update a note
  • DELETE /notes/<id> – delete a note

🔐 Security

  • All endpoints require a valid Bearer Token
  • Tokens are verified against Auth0
  • Notes are scoped per user using user_id

📡 Deployment

The backend server is deployed on a Microsoft Azure VM at the public IP:
👉 http://13.71.28.224:5000

The server runs on port 5000 and was started using the following command:

nohup python3 app.py --host 0.0.0.0 --port 5000 &

This allows the server to run in the background and remain active even after logout.
The client can connect to the backend by pointing to the above IP and port.


🌍 Global Tool Installation (PyPI)

Published to PyPI, that can be installed using commad:

pip install notescli-tool

Then use it locally:

notescli login
notescli create
notescli read
# etc.

View on PyPI: https://pypi.org/project/notescli-tool


🤝 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.

🙋‍♀️ Authors

Maintainers

Raaghavi

Shrivarshini

🔗 Useful Links


✨ Happy Noting with NOTECLI!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages