Conversation
Introduce a `dissect` console script that forwards subcommands to the installed `target-*` tools, e.g. `dissect shell <target>` runs `target-shell` and `dissect dd <target>` runs `target-dd`. Subcommands are discovered dynamically from the `console_scripts` entry points, so any `target-<name>` tool is automatically available as `dissect <name>`. Help listings use each tool's module docstring summary (read statically, without importing the tool), falling back to `run target-<name>`.
a51adf2 to
d1b77b6
Compare
|
This does not solve: Because this tool UPDATE: is now discoverable via |
* added benchmarks and tests * added --help-all * cli color support for Python 3.14+
|
Added a new commit that adds the following improvements to the unified
Some screenshots below for comparison and tracking progress over time (click to open): |
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
Congrats! CodSpeed is installed 🎉
You will start to see performance impacts in the reports once the benchmarks are run from your default branch.
|
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed changes are covered by tests and CI updates with no unresolved blocking issues.
Pull request overview
Adds a unified dissect CLI that dynamically discovers and dispatches installed target tools.
Changes:
- Added CLI dispatcher and console entry point.
- Added dynamic command discovery, help generation, and argument forwarding.
- Added tests, benchmarking, lint configuration, and CI coverage.
- Updated namespace package discovery.
File summaries
| File | Description |
|---|---|
tox.ini |
Adds benchmark, lint, and formatting environments. |
tests/test_cli.py |
Adds functional and benchmark tests. |
tests/conftest.py |
Handles optional benchmark dependencies. |
tests/__init__.py |
Adds the tests package marker. |
pyproject.toml |
Registers the CLI and configures package discovery. |
dissect/cli.py |
Implements command discovery, dispatch, and help generation. |
.github/workflows/dissect-ci.yml |
Enables linting, tests, and benchmarks. |
Review details
- Files reviewed: 6/7 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.



This PR adds a single
dissectcommand that dispatches to the varioustarget-*tools as describe in #104, so they can be run without installing/knowing each script name:DISCLAIMER: Claude made this using my prompts, the
pyproject.tomlandtox.inifixups were done manually.uvx dissect#104dissect-prefixed aliases to all script entry points #105Changes
dissect/cli.pydispatcher exposed via[project.scripts]asdissect = "dissect.cli:main".console_scriptsentry points (anytarget-<name>becomesdissect <name>), so the list stays in sync automatically.argparsewith subparsers for a proper--help/command listing and clean error handling, then forwards the remaining args to the underlying tool verbatim (sidestepping theargparse.REMAINDERleading-option bug).ast(no import, no side effects). Falls back torun target-<name>when a tool has no docstring.pyproject.toml: enabled namespace package discovery (namespaces = true,include = ["dissect", "dissect.*"]) sodissect/cli.pyis packaged while keepingdissecta PEP 420 namespace package (no__init__.py).Notes
Currently we should add a one-line module docstring to the
target-*tools indissect.target, which would make thedissect --helplisting more descriptive. They now fall back to a generic string, which is:run target-<name>.