dp100-cli
Command-line tool and Python library for the ALIENTEK DP100 (ATK-MDP100) USB digital power supply. Read live voltage / current / temperature, change setpoints, switch the output, and log samples to CSV — from a terminal or a script.
$ dp100 info
Vout 11.997 V Iout 0.354 A P 4.247 W [CV] Vin 32.22 V T 38.2/38.7 C
$ dp100 get
output ON Vset 12.000 V Iset 5.000 A OVP 30.50 V OCP 5.05 A (preset 0)
Talks to the device directly over USB HID (via hidapi); no vendor software or driver required.
Install
pipx install dp100-cli && dp100 skill install --global # CLI + Claude Code skill, one line
pipx keeps the tool isolated and puts dp100 on your PATH (plain pip install dp100-cli
works too). The second half is optional: it drops the bundled Claude Code skill into
~/.claude/skills/dp100/ so Claude knows the commands and safety rules in every project;
run dp100 skill install (no --global) inside a repo to install it for that project only.
Requires Python 3.9+. hidapi ships binary wheels for CPython 3.9–3.13; on a
brand-new interpreter without a wheel, point pipx at an older one, e.g.
pipx install --python python3.12 dp100-cli. On Linux add a udev rule so you can open the device
without root (see contrib/99-dp100.rules):
sudo cp contrib/99-dp100.rules /etc/udev/rules.d/ && sudo udevadm control --reload-rules
Usage
dp100 info # live readings
dp100 get # current setpoints
dp100 set --v 12 --i 2.5 # change only the fields you pass (read-merge-write)
dp100 set --ovp 15 --ocp 3 # protection thresholds
dp100 set --v 7.4 --on # set and enable in one go
dp100 on # enable output
dp100 off # disable output
dp100 watch --hz 10 # sample continuously, Ctrl-C to stop
dp100 watch --hz 10 --csv --seconds 30 > log.csv
dp100 --json info # every command can emit JSON
dp100 raw 35 80 # send a raw function code, print the reply
set refuses a voltage above OVP or a current above OCP instead of tripping the
supply's protection. While the output is off the unit reports mode PROT; the CLI
shows OFF in that case.
As a library
from dp100 import DP100
with DP100() as psu:
print(psu.info()) # dict of live readings
psu.apply(v=7.4, i=2.0) # change setpoints, output state untouched
psu.output(True)
print(psu.read_info().power_w)
dp100.protocol (frame building/parsing, CRC, payload dataclasses) has no hardware
dependency and can be reused in other transports.
Protocol
Documented in docs/PROTOCOL.md: 64-byte HID reports,
[addr, func, seq, len, data…, CRC-16/MODBUS], function 0x30 for live readings and
0x35 to read/write setpoints.
Claude Code skill
A Claude Code skill ships inside the package and in
this repo at .claude/skills/dp100/SKILL.md. It teaches
Claude the commands, the safety rules (never enables the output unless asked) and the
troubleshooting steps.
dp100 skill install # into ./.claude/skills/dp100/ of the current project
dp100 skill install --global # into ~/.claude/skills/dp100/ for every project
dp100 skill show # print it
Platform notes
- Verified on macOS 15 (Apple Silicon) with a real unit.
- Linux and Windows use the same hidapi code path but have not been exercised on hardware yet — reports welcome.
- The DP100 USB-A port does not supply 5 V while the unit is in USB device mode; this tool only uses the USB-C data connection.
Releasing
Bump __version__ in src/dp100/__init__.py, add a CHANGELOG entry, then
git tag vX.Y.Z && git push origin vX.Y.Z. The release.yml workflow builds the
sdist/wheel and publishes to PyPI via Trusted Publishing (OIDC, no stored token).
Development
git clone https://github.com/AndySze/dp100-cli && cd dp100-cli
python -m venv .venv && .venv/bin/pip install -e '.[dev]'
.venv/bin/pytest # protocol + CLI tests run without hardware
.venv/bin/ruff check .
Credits
The frame format and function codes were learned by reading the ESP32 host implementation in DP100_ESP32_WebApp (GPL-3.0), which in turn builds on DP100-WebApp. This project is an independent, from-scratch Python implementation of that wire protocol; no code from either project is included, so it is offered under MIT.
License
MIT — see LICENSE.
Metadata
Release files for dp100-cli 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 | |
|---|---|---|---|
| dp100_cli-0.1.0.tar.gz | 13.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dp100_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.0 kB
Release files / dp100_cli-0.1.0.tar.gz
| Download URL | dp100_cli-0.1.0.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32c7d32e82a0fc8acd0dffd3b5d1743e63283d5141870258836327905fbd5995
|
|
BLAKE2b-256 checksum How to use checksums |
ab748ffdeb5dc986de5035fc861c16f0333f65dcf983404219dc73f641e7810f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logRelease files / dp100_cli-0.1.0-py3-none-any.whl
| Download URL | dp100_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e091d9cdd11b9cbee24397645ed0309d41376b161fae93fd40a4e23c9d3b6a7c
|
|
BLAKE2b-256 checksum How to use checksums |
655f0bd7457c3d7aaab5615d4195383ec8123832416b1c2552625b00bcdf972f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency log