Skip to content

Enhanced CLI tools for PLC interaction#631

Merged
gijzelaerr merged 3 commits intomasterfrom
feature/cli-tools
Mar 20, 2026
Merged

Enhanced CLI tools for PLC interaction#631
gijzelaerr merged 3 commits intomasterfrom
feature/cli-tools

Conversation

@gijzelaerr
Copy link
Owner

Summary

  • Adds Click-based CLI with read, write, dump, info, and server subcommands
  • Supports typed reads/writes (bool, byte, int, uint, word, dint, udint, dword, real, lreal, string, bytes)
  • Includes hex dump formatting and comprehensive --help for each command
  • Adds snap7 entry point to pyproject.toml

Closes #621

Test plan

  • 19 CLI tests pass (tests/test_cli.py)
  • ruff check passes
  • ruff format passes
  • Manual testing with a real PLC

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Expand the snap7 CLI beyond snap7-server with subcommands for reading,
writing, dumping, and inspecting PLCs directly from the terminal.

Closes #621

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gijzelaerr and others added 2 commits March 19, 2026 15:42
Uses pytest.importorskip("click") so test collection doesn't fail
in CI environments that only install the test dependencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Renames the CLI command from `snap7` to `s7` for a cleaner interface.
Adds a hook to auto-register `s7 discover` when the discovery module
is available, so both PRs compose cleanly when merged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gijzelaerr gijzelaerr merged commit a2561a2 into master Mar 20, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhanced CLI tools (read, write, scan, dump, monitor)

1 participant