Metadata-Version: 2.4
Name: pynotes-cli
Version: 0.1.2
Summary: A terminal Markdown personal journal and notes tool.
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: typer>=0.9.0
Requires-Dist: rich>=13.0.0
Requires-Dist: questionary>=2.0.0

# Pynotes

Pynotes is a lightning-fast terminal-based Markdown personal journal and notes tool. It allows you to seamlessly create, read, list, and filter your notes directly from the command line, while storing everything locally in a lightweight SQLite database.

## What it Does

- **Create & Edit**: Interactively create notes with titles, tags, and Markdown content. Edit existing notes smoothly.
- **List & Filter**: View all your notes in a beautifully formatted table or filter them down by specific tags.
- **View Notes**: Render your notes with full Markdown syntax highlighting right in your terminal.
- **Local Storage**: Keeps all your data secure and accessible on your local machine (`~/.pynotes.db`).

## Project Structure

```text
pynotes/
├── pyproject.toml      # Project metadata and dependencies configuration
├── README.md           # Project documentation and instructions
└── pynotes/            # Main application package
    ├── __init__.py     # Marks the directory as a Python package
    ├── main.py         # Entry point defining the CLI commands using Typer
    ├── db.py           # Handles SQLite database connection and queries
    ├── ui.py           # Manages terminal output rendering using Rich
    └── prompts.py      # Handles interactive user inputs using Questionary
```

## Tech Stack

- **[Python 3.10+](https://www.python.org/)**
- **[Typer](https://typer.tiangolo.com/)**: For building the powerful command-line interface.
- **[Rich](https://rich.readthedocs.io/)**: For beautiful terminal formatting, tables, and Markdown rendering.
- **[Questionary](https://questionary.readthedocs.io/)**: For interactive and user-friendly CLI prompts.
- **[SQLite3](https://docs.python.org/3/library/sqlite3.html)**: For local database storage (built-in).

## Instructions to Run

### 1. Installation

**From PyPI (Recommended)**
You can install `pynotes` directly from PyPI:
```bash
pip install pynotes-cli
```

**From Source (For Developers)**
If you want to modify the code, install it in editable mode:
```bash
# Clone the repository and navigate to the directory
git clone https://github.com/senku1505/pynotes.git
cd pynotes

# Install the package and its dependencies
pip install -e .
```

### 2. Usage

Once installed, the `pynotes` command will be globally available in your terminal environment.

**Initialize the Database:**
Initialize your local database at `~/.pynotes.db`.
```bash
pynotes init
```

**Create a New Note:**
```bash
pynotes new
```
Follow the interactive prompts to add your title, tags, and Markdown content. Press `Alt+Enter` (or `Esc` then `Enter` on Mac) to save the content.

**List All Notes:**
```bash
pynotes list
```

**Filter Notes by Tag:**
```bash
pynotes list --tag <your-tag>
```

**View a Specific Note:**
View the full rendered Markdown of a note by providing its ID.
```bash
pynotes view <note_id>
```

**Edit a Note:**
Edit the title, tags, or content of an existing note.
```bash
pynotes edit <note_id>
```
