feat(cli): add pm3py client — autocompleting console over the stock proxmark3 client

Wraps the standard Proxmark3 C client (so it works with any Proxmark/firmware) in a prompt_toolkit REPL: full command-tree completion sourced from the client's commands.json, option-flag completion, Tab-to-descend, a press-right help toggle, and the client's own coloured output.

Two swappable backends behind ClientDriver: in-process SWIG (_pm3) by default, a pexpect-around-the-binary fallback otherwise. Both auto-detect /dev/ttyACM* and discover the checkout via its doc/commands.json marker (walk-up + side-by-side), so no path is hardcoded.

`pm3py client --pack OUT` spins off a self-contained drop-in — a readable .py, or a .pyz with prompt_toolkit/pexpect bundled — amalgamated from the package (the tested source of truth) so it can't drift. Adds pexpect to deps; hardware-free tests in tests/test_clientcli.py.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
michael
2026-07-15 21:05:53 -07:00
parent 925d2c92f0
commit 4f66a93de9
13 changed files with 1622 additions and 2 deletions

View File

@@ -39,6 +39,7 @@ dependencies = [
"bitarray>=2.0",
"pycryptodome>=3.10",
"prompt_toolkit>=3.0",
"pexpect>=4.8",
]
[project.optional-dependencies]