Skip to main content

dirpluck

dirpluck is a CLI tool for selecting the files you need from multiple locations and collecting them into a single ZIP Archive.

A TOML Configuration records what to include, what to exclude, and which fixed material should always be attached. For example, when handing repositories to an LLM for development work, you can package the current development targets, a shared framework, local wheels needed for the task, and related repositories into a reproducible Archive built from the same rules.

Installation

The current version is 0.14.1.

Python 3.11 or later is required.

pip install dirpluck
dirpluck --version

dirpluck has no third-party runtime dependencies.

Example: prepare development context for an LLM

Suppose you have this workspace:

workspace/
├── default.dirpluck
├── framework-core/
│   └── dist/
│       └── framework_core-2.4.0-py3-none-any.whl
├── docs-builder/
│   └── dist/
│       └── docs_builder-1.6.0-py3-none-any.whl
└── repositories/
    ├── service-api/
    │   ├── src/
    │   └── .tmp/
    │       └── proposed-changes.patch
    ├── worker-jobs/
    └── web-console/

repositories/ contains several repositories built on the same foundation. For this task, service-api and web-console are the development targets to give to the LLM. The framework-core and docs-builder wheels are needed regardless of which Target is selected, so they should always be included in the Archive. service-api/.tmp/ contains a downloaded diff to review in a separate workflow.

Create default.dirpluck at the workspace root:

[about]
description = "Repositories and runtime dependencies for LLM-assisted development."

[namespace.dependencies]
[namespace.tools]
[namespace.repositories]

[always.framework]
description = "The foundational framework used by the target repositories."
path = "framework-core"
namespace = "dependencies"
must = ["dist/*.whl"]

[always.docs-builder]
description = "A tool used to build development documentation."
path = "docs-builder"
namespace = "tools"
must = ["dist/*.whl"]

[scope.projects]
description = "Repositories that can be selected as development targets."
path = "repositories"
namespace = "repositories"
ignore = ["archive/", "scratch/"]

[shared.ignore]
repository-noise = [
    ".git/",
    ".venv/",
    "__pycache__/",
    ".env*",
    "*.pem",
    "*.key",
    "*.pyc",
]

[pluck]
description = "Repositories selected as development targets for this LLM task."
may = ["*", "*/"]
ignore = [
    { shared = "repository-noise" },
    { path = "private/local-notes/" },
    { path = ".tmp/" },
]

[pluck.case.diff]
description = "Development target repository; .tmp/ contains the diff to review."
may = ["*", "*/"]
ignore = [
    { shared = "repository-noise" },
    { path = "private/local-notes/" },
]

[output]
path = "develop-target.zip"
overwrite = true

always adds fixed material regardless of the selected Target. scope.projects defines where selectable repositories live, and pluck applies the same Selection to each selected directory Target. Normally .tmp/ is excluded; the diff Case includes it when the downloaded changes should be reviewed. description does not change selection semantics, but it is carried into the generated Archive README so a person or LLM can distinguish the development targets, foundation, and supporting tools.

Preview

Before creating the Archive, inspect what will be collected. In this example, commands are run from the workspace root, so default.dirpluck is used automatically.

dirpluck projects/service-api/ projects/web-console/ --preview

--preview shows what would be selected from the current filesystem without writing the ZIP. Check that nothing unexpected is included and that required files are not missing.

Add a diff with a Case

The normal Selection excludes .tmp/. When service-api/.tmp/proposed-changes.patch should be included for review, select the diff Case:

dirpluck projects/service-api/ --case diff --preview

--case diff uses the Selection from [pluck.case.diff], so .tmp/ is included only for this run. The Case description is also carried into the generated Archive README. After inspection, remove --preview from the same command to build the Archive.

Build

If the preview looks right, build the Archive with the same Targets:

dirpluck projects/service-api/ projects/web-console/

Conceptually, the resulting Archive looks like this:

develop-target.zip
├── README.md
├── dependencies/
│   └── framework-core/
│       └── dist/
│           └── framework_core-2.4.0-py3-none-any.whl
├── repositories/
│   ├── service-api/
│   │   └── ...
│   └── web-console/
│       └── ...
└── tools/
    └── docs-builder/
        └── dist/
            └── docs_builder-1.6.0-py3-none-any.whl

For another task, change only the Target:

dirpluck projects/worker-jobs/ --preview

The collection rules and fixed material recorded in the Configuration stay the same.

Filesystem note

Symbolic links and recognized Windows directory junctions encountered during automatic Target discovery or Selection traversal are not followed or included in the Archive. See Trust Model for the exact filesystem boundary.

Before sharing an Archive

dirpluck does not infer from filenames or contents that something is sensitive and should not be shared.

The example ignore list for .git/, .venv/, .env*, *.pem, *.key, and similar entries is useful, but it is not a security boundary. Project-specific credentials, private keys, personal information, customer data, local settings, test fixtures, or other sensitive material may exist under completely different names or locations.

Before sending an Archive to another party or to a non-local LLM, inspect the selection with --preview.

A Configuration is also an instruction for filesystem operations. Named Scopes and Always sources can reference local filesystem locations, and Output declares where the Archive is written. Do not run a Configuration received from someone else, or one you have not reviewed, without checking its referenced sources, Base Configuration, Selection, and Output.

The generated Archive README does not include source filesystem paths by default. If --paths is used, resolved source paths are added and may reveal local-environment information such as absolute paths.

See Trust Model for the detailed trust boundary and guidance for Archives that will leave the local environment.

Why dirpluck?

For a one-off ZIP, doing the work by hand may be simpler.

dirpluck is useful when the decision about what to hand off needs to be reused later. Recording the rules in a Configuration lets you reconstruct an Archive from the same intent without relying on shell history, past conversations, or human memory.

You can change the Target, select multiple Targets together, and attach fixed material with always while keeping the collection rules reusable.

Documentation

This README introduces the basic workflow through one concrete example.

  • Getting Started: a short walkthrough from a minimal Configuration to preview and build.
  • Glossary: meanings of the concepts used throughout the documentation.
  • Configuration Guide: Configuration authoring, including Scope, Always, Shared, Case, and Base Configuration.
  • CLI Guide: Target references, CLI options, and Invocation Templates.
  • Python API: the small official Python API for the same execution model as the CLI.
  • Specification: exact rules for Configuration composition, resolution, matching, filesystem traversal, Archives, Output, and validation.
  • Trust Model: the trust boundary for Configurations, filesystem access, and external sharing.
  • Changelog: release history.
  • Status: current development stage, compatibility policy, and publication status.

License

dirpluck is released under the MIT License.

See LICENSE for details.

Metadata

Release files for dirpluck 0.14.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dirpluck 0.14.1
File Size Uploaded
dirpluck-0.14.1.tar.gz 334.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dirpluck 0.14.1
File Interpreter ABI Platform
dirpluck-0.14.1-py3-none-any.whl Python 3 none any Details

Total release size: 485.5 kB

Release files / dirpluck-0.14.1.tar.gz

Download URL dirpluck-0.14.1.tar.gz
Size 334.4 kB
Tags Source
SHA-256 checksum
How to use checksums
81c1077bc2eda1247cfdf3e16a32ceaa3aaf7314b4bcb539e0589c4608175a97
BLAKE2b-256 checksum
How to use checksums
2d1875a2acb7ee20bd352b3c84c6c07d542c66de710ba2d59152cc717715e8df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / dirpluck-0.14.1-py3-none-any.whl

Download URL dirpluck-0.14.1-py3-none-any.whl
Size 151.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0cd48c69ef96022ef2f84cc92f3bc75f01de0c118746fe192c64ca5f822019f2
BLAKE2b-256 checksum
How to use checksums
5424b8430bdaee764638ae0e4380b0181aff2258666eba21f88873b1d20435e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.14.1 This release

2 release files

0.14.0

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page