Metadata-Version: 2.1
Name: pdm-bin-dir
Version: 1.0.6
Summary: PDM plugin that allows additional directories listed in pyproject.toml to be added to environment PATH
Keywords: pdm,plugin,path,environment,bin,virtualenv,script,activate
Author-Email: Sam McKelvie <dev@emckelvie.org>
License: MIT License
         
         Copyright (c) 2026 Samuel J. McKelvie
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
         
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Project-URL: Homepage, https://github.com/mckelvie-org/pdm-bin-dir
Project-URL: Source, https://github.com/mckelvie-org/pdm-bin-dir/tree/v1.0.6
Project-URL: Bug Tracker, https://github.com/mckelvie-org/pdm-bin-dir/issues
Project-URL: Changelog, https://github.com/mckelvie-org/pdm-bin-dir/releases
Requires-Python: >=3.10
Requires-Dist: pdm>=2.0
Requires-Dist: typing-extensions>=4.8; python_version < "3.12"
Description-Content-Type: text/markdown

# pdm-bin-dir

[![CI](https://github.com/mckelvie-org/pdm-bin-dir/actions/workflows/ci.yml/badge.svg)](https://github.com/mckelvie-org/pdm-bin-dir/actions/workflows/ci.yml)
[![PyPI version](https://img.shields.io/pypi/v/pdm-bin-dir.svg)](https://pypi.org/project/pdm-bin-dir/)
[![Python versions](https://img.shields.io/pypi/pyversions/pdm-bin-dir.svg)](https://pypi.org/project/pdm-bin-dir/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

`pdm-bin-dir` is a [PDM](https://pdm-project.org/) plugin that automatically prepends additional project directories to `PATH` when running commands via PDM. This lets you place helper scripts alongside your project and run them as plain commands — no prefix or activation needed.

## Requirements

- Python 3.10 or later
- PDM 2.0 or later

## Installation

Install the plugin into PDM's own environment:

```bash
pdm self add pdm-bin-dir
```

## Usage

The plugin is **opt-in per project**: it has no effect unless `[tool.pdm.plugin.bin-dir]` is present in the project's `pyproject.toml`. Once configured, the listed directories are prepended to `PATH` before every `pdm run …` invocation.

### Configuration

Add to your project's `pyproject.toml`:

```toml
[tool.pdm.plugin.bin-dir]
dirs = ["bin", "scripts"]
```

Paths are relative to the project root. Absolute paths are also accepted. The default is an empty list (no directories added).

### `pdm bin-dir` command

The plugin registers a `bin-dir` sub-command for inspecting and changing the configuration:

```bash
# Show current configured directories (JSON array)
pdm bin-dir show

# Replace the list
pdm bin-dir set bin scripts

# Append to the list (duplicates are silently skipped)
pdm bin-dir add tools
```

Changes made via `set` / `add` are written back to `pyproject.toml`.

## License

MIT. See [LICENSE](LICENSE).

---

For development and release workflow documentation, see [CONTRIBUTING.md](https://github.com/mckelvie-org/pdm-bin-dir/blob/main/CONTRIBUTING.md).
