Generate invoices and quotes with style.
Project description
📦 Molière
Generate elegant invoices and quotes from JSON and HTML templates – right from your terminal.
Molière is a simple but powerful CLI tool for developers, freelancers, and small businesses to create beautiful PDF invoices and quotes from JSON files and customizable HTML/CSS templates.
🚀 Features
- Create invoices and quotes in PDF format
- Fully customizable HTML/CSS templates
- Simple JSON-based data structure
- Easily configurable via CLI or config file
- Shell completions support
- Portable and script-friendly
⚙️ Installation
Install via PyPI:
pip install molieregen
📖 Usage
molieregen [OPTIONS] COMMAND [ARGS]...
Global Options
| Option | Description |
|---|---|
--install-completion |
Install shell completion for the current shell |
--show-completion |
Show completion code for manual installation |
--help |
Show help message and exit |
🛠 Commands
🔧 configure
Interactively configure default paths and values.
molieregen configure
This creates or updates the config file at ~/.molieregen/config.json.
🧾 generate
Generate a PDF invoice or quote from a JSON file.
molieregen generate ./invoice.json
The output will be saved to the configured output_dir.
📝 json
Generate a default JSON structure for an invoice or quote.
molieregen json invoice > invoice.json
molieregen json quote > quote.json
Use this as a starting point and customize the fields as needed.
⚙️ set-config
Update a single configuration value directly.
molieregen set-config template_dir ./my-templates
molieregen set-config output_dir ./exports
This modifies the ~/.molieregen/config.json file.
📂 Example Workflow
-
Create a base invoice:
molieregen json invoice > invoice.json -
Edit
invoice.jsonto reflect your client, services, pricing, etc. -
Generate the PDF:
molieregen generate invoice.json -
Find the output in your configured output directory.
🎨 Custom Templates
Templates are standard HTML files with placeholders for data.
- Default templates are included with Molière
- You can override by setting a custom template path:
molieregen set-config template_path ./custom_template.html
Template files can use basic CSS and HTML along with variables like:
{{ invoice.number }}
{{ client.name }}
{{ items[0].description }}
🔒 Configuration
Molière stores user preferences in:
~/.molieregen/config.json
Example:
{
"output_dir": "./exports",
"template_path": "./templates/invoice.html",
"author_name": "John Doe",
"default_currency": "EUR"
}
🧪 Coming Soon
- Multi-language support
- Emailing invoices directly from CLI
- Convert CSV to invoice
- Built-in template gallery
🤝 Contributing
Pull requests and feedback are welcome!
- Fork the repo
- Create your feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin feature/my-feature) - Open a pull request
🧑💻 Author
Made with 💡 by Caribbean Code GitHub: https://github.com/kenyhenry/moiliere.git
📄 License
This project is licensed under the MIT License – see the LICENSE file for details.
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 molieregen-0.1.2.tar.gz.
File metadata
- Download URL: molieregen-0.1.2.tar.gz
- Upload date:
- Size: 73.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df5bb9aefb9514ba67396ac9e25a284b77c2d392b039556548b8181422202d6b
|
|
| MD5 |
79676e03937c65b5aa6ea36af6f61e24
|
|
| BLAKE2b-256 |
10ea79b9a548be7c560f3cad8a0cfc4f9fe822d2618d6dbea3b675d0d692e599
|
File details
Details for the file molieregen-0.1.2-py3-none-any.whl.
File metadata
- Download URL: molieregen-0.1.2-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d4accfacc07f8252c98d30752633a4100ba7faf9f1a4d0cf8722ced015cce78
|
|
| MD5 |
ee38615b700c45e0e624a7cd00cf08b5
|
|
| BLAKE2b-256 |
34253aa2f0b4b073f41360daeeaf47e0993228209e81d0088ba4ca80785f114c
|