ohm
Electronics & hardware reference CLI: calc, power, id, pcb, thermal, rf, ref, safe
v1.0.1
Linux
Quick Start
Install via jcli
jcli install ohm
Bench-side calculations
# Ohm's law — solve any two of V/I/R/P
ohm calc ohm --v 9 --r 470
# Voltage divider — emits an ASCII schematic alongside the numbers
ohm calc vdiv --vin 5 --r1 10000 --r2 4700
# Current-limiting resistor for an LED (closest E24 included)
ohm calc clim --vsupply 5 --vdrop 2.1 --i 0.02
# 4-band resistor decoder (English or French colour names)
ohm id rcc --read 'red red brown gold'
# Ceramic capacitor 3-digit code
ohm id cap --type ceramic --code 104K
# UK wire ampacity (BS 7671) — NEW vs the Python build
ohm --region uk ref awg --gauge '2.5 mm²'
# Markdown report for engagement notes
ohm --output markdown calc vdiv --vin 5 --r1 10000 --r2 4700
Categories & modules
| Category | Modules |
|---|---|
calc | ohm, series, vdiv, clim, tau, db, resonance |
power | ac, bat, inrush |
id | rcc (resistor colour code), cap, led |
pcb | trace (IPC-2221A) |
thermal | tj (junction temperature) |
rf | antenna, wave, bands |
ref | awg (region-aware), eval (E-series finder) |
safe | capdisch (hazard tier), hv (HV reference card) |
config | set / get / list / reset |
Improvements over the Python 0.1.x
- Markdown output alongside text / json / csv — ready for engagement deliverables.
- UK region (BS 7671) added to
ref awgalongside US (NEC) / EU (NF C 15-100) / JP (JIS). - ASCII schematic diagrams for voltage divider, RC low-pass, RL low-pass, LC parallel, and current-limit circuits — printed alongside the calculation.
- Operator pivot URLs — every
idresult (resistor / cap) emits an Octopart + Digikey search URL pre-formatted for the identified part. - Persistent config at
~/.config/ohm/config.json— same schema as the Python build so config files migrate. - Zero runtime deps — single Rust binary, no Python toolchain.
Global flags
| Flag | Effect |
|---|---|
--region us|eu|jp|uk | Region defaults for AC mains + wire ampacity |
--output text|json|csv|markdown | Output format |
--no-color | Disable ANSI colours |
--explain | Verbose: show formula derivation |