Metadata-Version: 2.4
Name: tui-postman
Version: 1.0.0
Summary: A terminal-based (TUI) alternative to Postman
Author-email: Gaurav Pandit <admin@example.com>
Project-URL: Homepage, https://github.com/GauravPandit27/TUI-postman
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: textual>=0.82.0
Requires-Dist: httpx>=0.28.0
Requires-Dist: pygments>=2.20.0

# 🚀 Termina (TUI Postman)

A blazing-fast, local-first Terminal User Interface (TUI) alternative to Postman and Insomnia. Built entirely in Python using the `textual` framework and `httpx`, it allows you to construct and execute HTTP requests without ever leaving your terminal.

## ✨ Features
- **Local-First & Fast:** No accounts, no cloud syncing, no electron-app bloat.
- **Global CLI:** Installs directly as a terminal command (`TUI_postman`).
- **Syntax Highlighting:** Automatically pretty-prints and highlights JSON responses.
- **Async Execution:** The UI remains perfectly smooth and responsive while waiting for network requests to complete.
- **Keyboard Friendly:** Use `Tab` to navigate inputs, `Ctrl+Q` to quit safely, or just click the UI elements with your mouse!

---

## 🛠️ Installation

1. **Clone or Download** this directory.
2. **Create a Virtual Environment** (Highly Recommended):
   ```bash
   python -m venv venv
   ```
3. **Activate the Virtual Environment**:
   - **Windows (PowerShell):** `.\venv\Scripts\Activate.ps1`
   - **Mac/Linux:** `source venv/bin/activate`
4. **Install the Package Locally**:
   Run the following command from the root folder (where `pyproject.toml` is located) to install all dependencies and register the CLI command:
   ```bash
   pip install -e .
   ```

---

## 💻 Usage

Once installed, you can launch the application from anywhere by simply typing:

```bash
TUI_postman
```

### Making a Request:
1. **Method:** Select your HTTP method (GET, POST, PUT, DELETE, PATCH) from the dropdown.
2. **URL:** Enter your target endpoint (e.g., `https://jsonplaceholder.typicode.com/todos/1`).
3. **Headers:** (Optional) Add custom headers in valid JSON format in the Headers tab.
4. **Body:** (Optional) If sending a POST/PUT request, add your JSON payload in the Body tab.
5. **Send:** Click the green **Send** button.

The response pane on the right will instantly display the Status Code, Response Time, and the formatted output from the server.

### Exiting:
Click the **Quit** button at the top, or press `Ctrl+Q` to close the application cleanly.

---

## 📦 Tech Stack
- **[Textual](https://github.com/Textualize/textual)**: The core TUI framework for building the user interface.
- **[httpx](https://www.python-httpx.org/)**: The asynchronous HTTP client.
- **[Pygments](https://pygments.org/)**: Handles the syntax highlighting for JSON payloads.
