Skip to main content

A command-line interface tool for managing bills and time tracking across different providers

Project description

MrvBill CLI

A command-line interface tool for managing bills and time tracking across different providers.

Features

  • Interactive CLI with styled prompts
  • Bill management and time tracking
  • Customer management
  • PDF invoice generation

Installation

pipx install mrvbill

Getting Started

After installing the package, you can use the CLI to manage your bills and time tracking by first running the init command and going over the setup wizzard.

bill init

This will create a config.json file inside the root/~/.pybill/config.json directory that looks like this. You can edit this file manually to change the config. The CLI currenlty only supports the Harvest provider, make sure you don't share your PAT with anyone.

{
  "vendor_name": "Your Company Name",
  "vendor_vat_code": "Your VAT Code",
  "vendor_address": "Your Address",
  "vendor_city": "Your City",
  "vendor_zip": "Your Zip Code",
  "vendor_country": "Your Country",
  "vendor_email": "Your Email",
  "vendor_phone": "Your Phone Number",
  "invoices_folder": "The path to the folder where the invoices will be saved",
  "vendor_currency": "The currency of the invoices",
  "vendor_rate_per_hour": 1000,
  "national_trade_register_no": "Your National Trade Register Number",
  "configured": "1",
  "provider": "harvest",
  "pat": "Your Personal Access Token",
  "account_id": "Your Account ID",
  "invoice_series_name": "The name of the invoice series",
  "invoice_series_number": 1,
  "customers": {}
}

Creating a new customr

bill create-customer --name "John Doe" --customer-id "123456" --address "123 Main St" --country "United States" --email "john.doe@example.com" --phone "123-456-7890" --vat "1234567890"

This will create a new customer and add it in the config.json file. You can create invoices for different customers using the create command.

You can also manually add the customer in the config.json customers object with a new key value entry. The key should be a unique identifier you choose for the customer.

"customers": {
  "client1": {
    "name": "Client 1",
    "address": "123 Main St",
    "country": "United States",
    "email": "john.doe@example.com",
    "phone": "123-456-7890",
    "vat": "1234567890"
  }
}

Creating an invoice

To create an invoice, you'll need to use the create command with the following parameters:

bill create --month "MonthName" --customer "customer_id" --name "invoice_name"

For example:

bill create --month "January" --customer "client1" --name "invoice_jan_2024"

Where:

  • --month: The month for which you want to create the invoice (e.g., "January", "February", etc.)
  • --customer: The customer ID that you used when creating the customer (e.g., "client1")
  • --name: (Optional) A custom name for the invoice file. If not provided, it will use a default format

The command will:

  1. Fetch all time entries from Harvest ( or a different provider ) for the specified month
  2. Generate a PDF invoice with:
    • Your company details from the config
    • Customer details
    • Time entries and hours worked
    • Subtotal and total amounts (including VAT if applicable)
    • Invoice number and series
    • Payment terms (30 days from invoice date)

The generated PDF will be saved in the invoices folder specified in your config file.

Note: Make sure you have already:

  1. Run bill init to set up your configuration
  2. Created a customer using bill create-customer or manually added them to the config file
  3. Have time entries logged in Harvest for the specified month

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

mrvbill-1.2.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

mrvbill-1.2.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file mrvbill-1.2.0.tar.gz.

File metadata

  • Download URL: mrvbill-1.2.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.3 Darwin/24.4.0

File hashes

Hashes for mrvbill-1.2.0.tar.gz
Algorithm Hash digest
SHA256 66957d0ba4a702e37ce339c783e711a7577f3ed7ca3bea179a36f4d8bcc40f39
MD5 0b8f4285fe9b5e7e0308c159b019c3e3
BLAKE2b-256 2f2b197366c3b4fc7837d758e732e1fd27c3469aa15ec60b336b3bc1139f6797

See more details on using hashes here.

File details

Details for the file mrvbill-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: mrvbill-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.3 Darwin/24.4.0

File hashes

Hashes for mrvbill-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 824093b3592864b9e46d5d6088ae66f4a4d7e025cc9ec49cceea334e04ec0f70
MD5 0a194e255fe6350c353fca2ceb2f96c6
BLAKE2b-256 cfb94401c26b1beb67a85b055b6b428a876ac82da7ef49d1458f5fa23a2eb0ab

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