Metadata-Version: 2.4
Name: moles-tools
Version: 0.0.2
Summary: A collection of Python tools from the underground
Project-URL: Homepage, https://github.com/the78mole/moles-tools
Project-URL: Documentation, https://the78mole.github.io/moles-tools
Project-URL: Repository, https://github.com/the78mole/moles-tools
Project-URL: Issues, https://github.com/the78mole/moles-tools/issues
Project-URL: Changelog, https://github.com/the78mole/moles-tools/releases
Author-email: the78mole <the78mole@users.noreply.github.com>
License: MIT
License-File: LICENSE
Keywords: cli,env,tools,utilities
Classifier: Development Status :: 3 - Alpha
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.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Provides-Extra: dev
Requires-Dist: black>=24.0; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pre-commit>=3.7; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4.0; extra == 'dev'
Description-Content-Type: text/markdown

# moles-tools

[![CI/CD](https://github.com/the78mole/moles-tools/actions/workflows/ci.yml/badge.svg)](https://github.com/the78mole/moles-tools/actions/workflows/ci.yml)
[![Documentation](https://github.com/the78mole/moles-tools/actions/workflows/docs.yml/badge.svg)](https://the78mole.github.io/moles-tools)
[![PyPI version](https://badge.fury.io/py/moles-tools.svg)](https://badge.fury.io/py/moles-tools)
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A collection of Python tools from the underground. 🐾

📖 **[Full Documentation](https://the78mole.github.io/moles-tools)**

## Tools

| Tool | Description |
|---|---|
| [`env-updater`](https://the78mole.github.io/moles-tools/tools/env-updater) | Update ENV variables in a target file from a source file |

## Quick Start

```bash
# Install from PyPI
pip install moles-tools

# Or with uv
uv tool install moles-tools

# Update .env from .env.production
env-updater .env.production .env
```

## Usage

### `moles-tools`

```
moles-tools - A collection of Python tools from the underground

Available tools:
  env-updater          Update ENV variables in a target file from a source file

Run 'env-updater --help' for usage information.
```

### `env-updater`

```
usage: env-updater [-h] [--no-create] [--quiet] [UPDATE] [TARGET]

Update ENV variables in TARGET from UPDATE.

When TARGET is omitted the tool auto-detects the target:
  1. .env exists            → update .env with UPDATE
  2. .env missing, .env.example/.env found → create .env from
     example, then apply UPDATE
  3. No UPDATE given, .env missing → copy .env.example / env.example
     to .env

positional arguments:
  UPDATE       ENV file whose values take precedence (optional).
  TARGET       Target ENV file to update in-place. Auto-detected from the
               current directory when omitted.

options:
  -h, --help   show this help message and exit
  --no-create  Fail if TARGET does not exist instead of creating it.
  --quiet, -q  Suppress informational output.
```

## Development

```bash
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone and set up
git clone https://github.com/the78mole/moles-tools.git
cd moles-tools

# Install all dependencies
uv sync --all-extras

# Install pre-commit hooks
uv run pre-commit install

# Run tests
uv run pytest
```

## License

[MIT](LICENSE)
