Skip to main content

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 moliere

📖 Usage

moliere [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.

moliere configure

This creates or updates the config file at ~/.moliere/config.json.


🧾 generate

Generate a PDF invoice or quote from a JSON file.

moliere generate ./invoice.json

The output will be saved to the configured output_dir.


📝 json

Generate a default JSON structure for an invoice or quote.

moliere json invoice > invoice.json
moliere json quote > quote.json

Use this as a starting point and customize the fields as needed.


⚙️ set-config

Update a single configuration value directly.

moliere set-config template_dir ./my-templates
moliere set-config output_dir ./exports

This modifies the ~/.moliere/config.json file.


📂 Example Workflow

  1. Create a base invoice:

    moliere json invoice > invoice.json
    
  2. Edit invoice.json to reflect your client, services, pricing, etc.

  3. Generate the PDF:

    moliere generate invoice.json
    
  4. 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:
    moliere 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:

~/.moliere/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!

  1. Fork the repo
  2. Create your feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

molieregen-0.1.0.tar.gz (73.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

molieregen-0.1.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file molieregen-0.1.0.tar.gz.

File metadata

  • Download URL: molieregen-0.1.0.tar.gz
  • Upload date:
  • Size: 73.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for molieregen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 083b68fa0405a3eca27f97ae097d4cce0846ee3f9da8b11ab6114ee34fc8c493
MD5 0447249082d783c9fb3b7340eddfde32
BLAKE2b-256 3713ba0ab09e84ef25571d222f5d0d325b1f77eb8d7d2bda4418d313a36c16a0

See more details on using hashes here.

File details

Details for the file molieregen-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: molieregen-0.1.0-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

Hashes for molieregen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb419dd53201e2daf41941b14477052d325026b2efc6d680ce1a3293ebd03485
MD5 0e25e962f25ef1f742a4d5e267b0ea7c
BLAKE2b-256 dbf21d1e05cfc21731df566feae7741e7d9c296af4703d73a9dd8db2e0229e2b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page