Turns messy text (emails, notes, voice-to-text) into structured JSON using Groq LLM.
Project description
🤖 Messy2JSON
Transform messy, unstructured text into clean, structured JSON using Groq LLMs.
Messy2JSON is a lightweight, cross-platform Python CLI that converts meeting notes, emails, chat logs, and voice-to-text transcripts into structured JSON containing a summary, action items, and deadlines. Built with reliability in mind, it validates AI responses, automatically repairs malformed outputs, and provides a seamless terminal experience.
✨ Features
- 🤖 AI-powered information extraction using Groq LLMs
- 🔒 One-time API key setup with live validation
- 🧠 Automatic JSON self-repair using an AI reflection loop
- ✅ Strict schema validation for reliable output
- 📋 Automatic clipboard copy after successful extraction
- 📂 Read input from files, interactive mode, or Unix pipes
- 💾 Save structured JSON directly to a file
- 💻 Cross-platform support (Windows, macOS, Linux)
- ⚡ Fast, clean terminal interface powered by Rich
📦 Output Format
Every input is converted into the following JSON structure:
{
"summary": "A concise summary of the input.",
"action_items": [
"Action item 1",
"Action item 2"
],
"deadline": "Mentioned deadline or null"
}
🚀 Installation
Clone the repository
git clone https://github.com/hamzatahir06/Messy2JSON.git
cd Messy2JSON
Create a virtual environment
Linux / macOS
python -m venv venv
source venv/bin/activate
Windows
python -m venv venv
.\venv\Scripts\activate
Install the package
pip install -e .
PyPI support is coming soon.
pip install messy2json
⚡ Quick Start
Interactive Mode
messy2json
Paste your text, then type:
/do
to generate structured JSON.
Read from a File
messy2json -f meeting_notes.txt
Read from Standard Input
cat notes.txt | messy2json
Save Output to a File
messy2json -f notes.txt -o output.json
Use a Different Model
messy2json --model llama-3.3-70b-versatile
⚙️ Configuration
During the first run, Messy2JSON securely prompts for your Groq API key, validates it online, and stores it locally using your operating system's standard configuration directory.
You can also provide configuration through environment variables.
| Variable | Description |
|---|---|
GROQ_API_KEY |
Your Groq API key |
GROQ_MODEL |
Override the default model |
📁 Project Structure
Messy2JSON/
│
├── messy2json/
│ ├── __init__.py
│ └── main.py
│
├── pyproject.toml
├── README.md
└── LICENSE
🛠 Built With
- Python 3.12+
- Groq Python SDK
- Rich
- Pyperclip
💡 Why Messy2JSON?
Unlike basic AI wrappers, Messy2JSON is designed to produce consistent and dependable JSON.
It includes:
- Schema validation
- Automatic retry and self-correction
- Live API key verification
- Cross-platform configuration management
- Clipboard integration
- Interactive and non-interactive workflows
The goal is simple: give developers structured output they can immediately use in automation pipelines, scripts, or applications.
📄 License
This project is licensed under the MIT License.
See the LICENSE file for details.
⭐ Support the Project
If you find Messy2JSON useful, consider giving the repository a ⭐ on GitHub.
It helps others discover the project and motivates future development.
Made with ❤️ by Hamza Tahir
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file messy2json-0.1.0.tar.gz.
File metadata
- Download URL: messy2json-0.1.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d94b30f8d4be6298e07e36160f7da3b669db43df326f2d12438aad0ca16ea9aa
|
|
| MD5 |
e52dedf0b80c63237e66cbe8be436613
|
|
| BLAKE2b-256 |
687c34f20ddd8ddcda5d9bde41764d788b4935de317cdb7c04cd70213ce99df1
|
File details
Details for the file messy2json-0.1.0-py3-none-any.whl.
File metadata
- Download URL: messy2json-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f14a1063b6584647cb8557f75d8f163cda41a013c393d598a69b20038ecc23b3
|
|
| MD5 |
7b19ea59d1b935c5090f738de0a0e94b
|
|
| BLAKE2b-256 |
8122a5f08dcc307eaa7e1bbd2e391ba15a79e1193f1414d2a2fa452780928ddd
|