Know what your print actually costs before you hit slice.
OmniCost is an offline-first CLI that estimates the true cost of creative projects — filament, electricity, equipment wear-and-tear, labor, profit margin, and GST — for Indian makers and illustrators. v1 ships with full 3D-printing support; the architecture is built to accept art and illustration modules later.
Existing calculators stop at filament weight. OmniCost models the costs that actually decide whether a commission is profitable:
- Material — grams used × cost per kg
- Electricity — flat rate or MSEDCL-style telescopic slab tiers (Maharashtra)
- Wear-and-tear — per-hour equipment cost
- Labor — billable hours × hourly rate
- Margin & GST — margin applied to base cost, then GST on the margined amount
- 🔌 Plug-in cost modules — shared financial engine, domain-specific inputs per medium (3D printing today; art/illustration tomorrow)
- 🇮🇳 Indian regional defaults — INR with proper digit grouping (₹1,00,000.00), GST, MSEDCL slab tiers, all user-configurable
- 📋 Profiles — save printers (power draw, wear rate) and materials (cost per kg) in config, reference by name
- 🧮 Telescopic slab calculation — job kWh split across tiers correctly, with an explicit caveat
- 🔒 Strictly offline — no network calls, ever
- ✅ Full precision math —
f64throughout; rounding to paise only at display
Requires the Rust toolchain (1.70+).
git clone https://github.com/deshmukhmayur/omnicost.git
cd omnicost
cargo install --path .# First run creates a default config at ~/.config/omnicost/config.json
omnicost calculate 3d-print \
--weight-grams 85 \
--time-hours 4.5 \
--spool-cost 1200 \
--power-watts 150 \
--wear-cost-per-hour 5 \
--labor-hours 0.5 \
--labor-rate 200 \
--margin-percent 20 OmniCost — 3D Print Estimate
Component Detail Cost
────────────────────────────────────────────────────────
Material 85 g @ ₹1,200.00/kg ₹102.00
Energy 0.675 kWh @ ₹8.50/kWh ₹5.74
Wear 4.5 h @ ₹5.00/h ₹22.50
Labor 0.5 h @ ₹200.00/h ₹100.00
────────────────────────────────────────────────────────
Base cost ₹230.24
Margin +20% ₹46.05
GST 18% ₹49.73
────────────────────────────────────────────────────────
FINAL PRICE ₹326.02
| Flag | Description |
|---|---|
--weight-grams <g> |
Filament used (required, must be > 0) |
--time-hours <h> |
Print duration (required, must be > 0) |
--spool-cost <₹/kg> |
Filament cost per kg (overrides --material) |
--power-watts <w> |
Printer power draw (overrides --printer) |
--wear-cost-per-hour <₹> |
Equipment wear rate (defaults to 0) |
--labor-hours <h> |
Billable labor hours |
--labor-rate <₹/h> |
Hourly labor rate (defaults to config) |
--margin-percent <%> |
Profit margin (defaults to config) |
--printer <name> |
Look up power draw and wear rate from a profile |
--material <name> |
Look up filament cost from a profile |
--no-gst |
Skip GST for this estimate |
--config <path> |
Use an alternate config file (overrides OMNICOST_CONFIG) |
Print the resolved configuration.
omnicost config set-electricity --rate 10.25 --mode slabs--rate <₹/kWh>— flat electricity rate--mode <flat|slabs>— billing mode (slabsuses themsedcl_slabstiers in config)
Config lives at ~/.config/omnicost/config.json (override with OMNICOST_CONFIG or --config). Defaults are written on first run:
{
"currency": "INR",
"symbol": "₹",
"tax": { "enable_gst": true, "gst_rate_percent": 18.0 },
"electricity": {
"mode": "flat",
"flat_rate_per_kwh": 8.50,
"msedcl_slabs": [
{ "min_units": 0, "max_units": 100, "rate": 5.50 },
{ "min_units": 101, "max_units": 300, "rate": 8.90 },
{ "min_units": 301, "max_units": null, "rate": 12.50 }
]
},
"labor": { "default_rate": 200.0 },
"margin": { "default_percent": 0.0 },
"profiles": {
"printers": [ { "name": "Ender-3 V2", "power_watts": 120.0, "wear_cost_per_hour": 5.0 } ],
"materials": [ { "name": "Generic PLA", "cost_per_kg": 1000.0 } ]
}
}Notes:
- Slab tiers must be contiguous (
min_units= previousmax_units+ 1), rates must be positive, and the top tier must be open-ended ("max_units": null). Invalid configs fail with a readable error naming the offending field. - Only
INRis supported in v1; other currencies error cleanly.
OmniCost never panics. Errors exit with code 2 (bad input/config) or 1 (runtime/I-O) and a human-readable message on stderr.
cargo test # unit + config + integration suites
cargo clippy # lint- Interactive mode (
v1.1) - Art & illustration cost modules
- Non-INR currency support
Apache-2.0 — see LICENSE.