Files
pm3py/activate
michael 1027d187c4 feat: mode-based REPL auto-imports via activate script
source activate          — core (Proxmark3, Cmd, PM3Status, etc.)
source activate sim      — + SimSession, all transponder models
source activate sniff    — + SniffSession, trace decoders
source activate all      — everything

Sets PM3PY_MODE env var and PYTHONSTARTUP for the venv.
Prompt shows current mode: (pm3py:sim)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 20:40:46 -07:00

22 lines
820 B
Plaintext

# pm3py venv activation with mode-based auto-imports.
# Usage: source activate — core (Proxmark3, Cmd, etc.)
# source activate sim — + SimSession, transponder models
# source activate sniff — + SniffSession, trace decoders
# source activate all — everything
#
# Then: python — REPL with auto-imports
# ipython — IPython with auto-imports (if installed)
# Activate the venv
source "$(dirname "${BASH_SOURCE[0]}")/.venv/bin/activate"
# Set mode and PYTHONSTARTUP
export PM3PY_MODE="${1:-core}"
export PYTHONSTARTUP="$(dirname "${BASH_SOURCE[0]}")/.pythonstartup.py"
# Update prompt to show mode
PS1="(pm3py:${PM3PY_MODE}) ${_OLD_VIRTUAL_PS1:-\$ }"
export PS1
echo "pm3py env ready (mode: ${PM3PY_MODE}). Run 'python' for REPL with auto-imports."