Metadata-Version: 2.4
Name: dirforge-cli
Version: 0.1.0
Summary: Create project directory scaffolds from visual tree text files.
Keywords: cli,scaffold,project-tree,directories,filesystem
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
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: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: System :: Filesystems
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: twine>=5; extra == "dev"

# DirForge

DirForge is a dependency-free Python CLI that turns a visual project tree in a
UTF-8 text file into real directories and empty files.

> PyPI package name: `dirforge-cli`  
> Installed command: `dirforge`

The distribution uses `dirforge-cli` because `dirforge` is already registered
to another project on PyPI.

## Installation

```bash
python -m pip install dirforge-cli
```

DirForge requires Python 3.10 or newer and has no runtime dependencies.

## Usage

Create a text file such as `structure.txt`:

```text
project/
├── src/
│   └── app.py
├── LICENSE
├── Makefile
└── .gitignore
```

Then create the scaffold:

```bash
dirforge structure.txt
dirforge structure.txt --output ./projects
dirforge structure.txt -o ./projects --dry-run --verbose
```

The repository script remains directly executable too:

```bash
python dirforge.py example-structure.txt --dry-run
```

## Tree Syntax

Entries ending in `/` are directories. Every other entry is a file, including
extensionless names such as `LICENSE` and `Makefile`. Blank lines and visual
separator lines containing only `│` are ignored.

## Options

- `-o, --output`: Choose the directory that will contain the scaffold root.
- `--dry-run`: Show planned changes without modifying the filesystem.
- `--force`: Truncate existing files before recreating them.
- `-v, --verbose`: Print every create, skip, or overwrite operation.
- `--version`: Print the installed version.

Existing directories are reused and existing files are preserved by default.
DirForge rejects path traversal, absolute paths, separators inside node names,
malformed indentation, children under files, and file/directory conflicts.

## Development

Run the test suite with only the standard library:

```bash
python -m unittest discover -v
```

Install the packaging tools and build both distribution formats:

```bash
python -m pip install -e '.[dev]'
python -m build
python -m twine check dist/*
```

Test the release on TestPyPI before publishing it publicly:

```bash
python -m twine upload --repository testpypi dist/*
python -m pip install --index-url https://test.pypi.org/simple/ dirforge-cli
```

After verifying the installed `dirforge` command, upload the same artifacts to
PyPI:

```bash
python -m twine upload dist/*
```

PyPI does not allow replacing an uploaded version. Increment `__version__` in
`dirforge.py` before each new release; the build metadata reads it automatically.
