Files
pm3py/pm3py/cli/clientcli/__init__.py
michael 4f66a93de9 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>
2026-07-15 21:05:53 -07:00

9 lines
538 B
Python

"""``pm3py client`` — an interactive prompt_toolkit REPL that wraps the stock Proxmark3 C client.
Unlike :mod:`pm3py.cli.rawcli` (which speaks pm3py's pure-Python protocol stack), this drives the
real ``proxmark3`` binary over pexpect, so it works with any Proxmark3 / firmware. It offers
autocompletion and help hints for the full pm3 command tree — sourced from the client's
``commands.json`` help dump — plus a right-arrow help toggle: highlight a completion, press RIGHT to
expand its full help, LEFT / ESCAPE to back out.
"""