Metadata-Version: 2.4
Name: add-pyproject
Version: 0.2.0
Summary: CLI to add python dependencies to pyproject.toml
Project-URL: Documentation, https://github.com/ketozhang/add-pyproject#readme
Project-URL: Issues, https://github.com/ketozhang/add-pyproject/issues
Project-URL: Source, https://github.com/ketozhang/add-pyproject
Author-email: "Keto D. Zhang" <ketozhang@gmail.com>
License-Expression: MIT
License-File: LICENSE.txt
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.7
Requires-Dist: packaging
Requires-Dist: tomlkit
Description-Content-Type: text/markdown

# add-pyproject

[![PyPI - Version](https://img.shields.io/pypi/v/add-pyproject.svg)](https://pypi.org/project/add-pyproject)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/add-pyproject.svg)](https://pypi.org/project/add-pyproject)

A CLI that just adds python dependencies directly into `pyproject.toml`

<table align="center">
<tr>
<td colspan="2">

```console
$ add_pyproject "numpy>=1.26"
```

</td>
</tr>

<tr>
<td>

Before
```toml
[project]
name = "mypackage"
version = "0.1.0"
```

</td>

<td>

After
```toml
[project]
name = "mypackage"
version = "0.1.0"
dependencies = ["numpy>=1.26"]
```
</td>
</tr>
</table>

-----

## Integration

### Pip

```sh
pip install add-pyproject
```

### uvx
```sh
uvx add-pyproject
```

```sh
uv tool install add-pyproject
```

### Hatch

```toml
[project]
name = "mypackage"
version = "0.1.0"
dependencies = []

[tool.hatch.envs.default]
dependencies = [
  "add-pyproject"
]

[tool.hatch.envs.default.scripts]
add = "python -m add_pyproject {args}"
```

```console
$ hatch run add "numpy>=1.26"
```

## License

`add-pyproject` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.


