pecunia
A blazing-fast, type-safe, AI-friendly CLI for finance and quant formulas.
Pecunia (Latin for money — the root of English pecuniary) computes the
formulas you reach for every day in finance: enterprise value, free cash
flow, discounted cash flow, WACC, returns, ratios. It runs in your
terminal, prints clean tables (or structured JSON for piping and
agents), and uses decimal.Decimal throughout so you never lose a cent to
floating-point rounding.
Built on the modern Astral toolchain — uv, ruff, ty — with strict
type checking, 100% formula coverage, and Hypothesis property tests on
every invariant.
Status: early alpha. Today: Enterprise Value, Free Cash Flow, schema discovery. The rest of the formula library (DCF, WACC, ratios, returns) is landing next.
Install
uv tool install pecunia
Or run without installing:
uvx pecunia --help
Quickstart
# Enterprise Value
$ pecunia valuation ev --market-cap 500 --total-debt 200 --cash 50
Enterprise Value 650
# Free Cash Flow
$ pecunia cash-flow fcf --operating-cash-flow 100 --capital-expenditures 30
Free Cash Flow 70
Output formats
Every command supports --format / -f:
| Format | What you get | Use case |
|---|---|---|
table |
Rich-rendered table (default) | Reading in the terminal |
json |
Structured envelope with command, inputs, result | Agents, pipelines, jq |
plain |
The bare value, nothing else | x=$(pecunia ... -f plain) |
$ pecunia valuation ev --market-cap 500 --total-debt 200 --cash 50 -f json
{"schema_version":"1","command":"valuation.ev","formula":"Enterprise Value",
"result":{"value":"650","type":"decimal"},
"inputs":{"market_cap":"500","total_debt":"200","cash":"50",
"minority_interest":"0","preferred_equity":"0"}}
For AI agents
Pecunia is designed to be driven by LLMs and autonomous agents. See
AGENTS.md for the terse machine-oriented spec: JSON
schema, exit codes, error envelopes, and the pecunia schema discovery
command.
$ pecunia schema | jq '.commands[].path'
["valuation","ev"]
["cash-flow","fcf"]
["schema"]
Development
See CONTRIBUTING.md. Quick version:
git clone https://github.com/nsollazzo/pecunia.git
cd pecunia
uv sync
uv run pre-commit install
uv run pre-commit install --hook-type commit-msg
uv run pytest --cov=pecunia
Security
Please report vulnerabilities privately via GitHub Security Advisories —
see SECURITY.md.
License
MIT — see LICENSE.
Metadata
Release files for pecunia 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pecunia-0.1.0.tar.gz | 45.0 kB | Without provenance | Details for pecunia-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pecunia-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pecunia-0.1.0-py3-none-any.whl |
Total release size: 56.4 kB
Release files / pecunia-0.1.0.tar.gz
| Download URL | pecunia-0.1.0.tar.gz |
|---|---|
| Size | 45.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7c80d4085280d5c67947e8b6cbdd63aba5dc776aa94d581bc4de2c95a0b8a04
|
|
BLAKE2b-256 checksum How to use checksums |
13f6ef0785ea9e780496017684fb0d3a063652243f9a8670ed4b71761b6a7cc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pecunia-0.1.0-py3-none-any.whl
| Download URL | pecunia-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
745a3bce8516ccf33680e45a557c67e286af7d28a9c378e06d9c2101875eba18
|
|
BLAKE2b-256 checksum How to use checksums |
3334eb7ceae67be0c6ee07d1d0d25753512d598dca2ea557898330e80fb041a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pecunia 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.