@framini/invoicer-cli v0.2.0
🧾 Invoicer CLI
Terminal assistant for generating invoices
Overview
Invoicer is a command line tool to help you generate invoices by just following a small set of steps. Absolutely nothing will leave your computer so feel free to experiment with it. Meaning, everything you do stays local in your computer (within the user config directory) and nothing is sent to the outside at any point.
Quick Start
- Get the
Personal Access TokenandAccount IDfrom harvest. - Download template.xlsx and place it on any folder you want. There's nothing special about this file, it just shows you how you could use the different template variables available.
- Install the package:
npm install -g @framini/invoicer-cli - From within that same folder, run:
inv. - Follow the steps.
Features
- Harvest report: Connect to your
Harvestaccount and fetch the hours report for a specific date. - Flat salary/Hourly rate: Depending on your contract, you can pick among a couple of different options, including
Flat SalaryandHourly Rate. If you are lucky and don't have to provide a detailed hours report you can also useFixed Rate.
Install
npm install -g @framini/invoicer-clior
yarn global add @framini/invoicer-cliExposes two global commands (the same),
invandinvv.
Usage
There are a couple of requirements in order to be able to run the tool:
template.xlsx: This is a normal Excel file that's gonna serve as the base template for the invoice (you could see the example file template.xlsx for some inspiration). You can put anything you want in there, from formulas to custom styles. We'll keep everything as it is and only replace the parts you told us to. This file should exist at the root of theprocess.cwd()(Current Working Directory)- Template variables: The part to be replaced within
template.xlsxare placeholders we're gonna be replacing with the data for the specified month. Here's the list of supported variables:{{fullName}}{{report}}{{totalHours}}{{hourlyRate}}{{flatSalary}}{{paymentMethod}}{{month}}{{year}}
By placing any of the values above within your template.xlsx we'll take care of placing the right value when needed. If certain variables don't apply for a specific type of invoice we'll clean them up before generating the final file.
❯ invConnecting with Harvest
In order to be able to connect with Harvest you'll have to create a Personal Access Token in here. There are 2 pieces of interest, the Account ID and the Token, you'll need both. If your are interested in reading more info about it and why we need this: link
Development
By running:
yarn dev
You'll get to expirement with the attached template.xlsx file.
License
MIT © Francisco Ramini