Skip to main content

A CLI tool to generate numbered folder structures with custom subdirectories.

Project description

Scaffix

Scaffix is a small interactive CLI that creates numbered folder structures with consistent subdirectories.

Goal: make repetitive workspace setup fast, safe, and predictable.

CI Version Python License PyPI


✨ Features

  • Create parent folders in any numeric range (for example: 1 to 100)
  • Optional zero padding (for example: 001, 002, 003)
  • Optional custom child directories in every parent folder
  • Explicit skip option when you do not want folder-in-folder creation
  • Preview and confirmation before filesystem changes
  • Colored output for better CLI readability
  • Cleaner tree-style preview formatting
  • Progress bar during folder generation
  • Error logging to scaffix.log
  • Idempotent creation (exist_ok=True) to avoid hard failures on reruns

🧠 How Scaffix Works

Scaffix follows a simple step-by-step flow:

  1. Ask for folder range (start and end)
  2. Ask whether names should be zero-padded
  3. Ask whether subdirectories are needed; press Enter with no input to skip for parent-only output
  4. Ask for base output path
  5. Show summary + preview tree
  6. Ask confirmation and then create directories

If one folder fails to create, Scaffix continues with the next folder and reports results at the end.


📦 Installation (Local Development)

Clone the repository:

git clone https://github.com/YOUR_USERNAME/scaffix.git
cd scaffix

Install in editable mode:

pip install -e .

Run:

scaffix

Alternative run mode:

python -m scaffix

Check version:

scaffix --version

🚀 Example Usage

Enter START number: 1
Enter END number: 5
Zero-pad folder names? Y
Create subdirectories inside each folder? Y
Subdirectories: code, task
Base path: ./demo

Output structure:

01/
   ├── code/
   ├── task/
02/
   ├── code/
   ├── task/
...

📁 Project Structure

src/scaffix/
├── __init__.py   # Package metadata (__version__)
├── __main__.py   # python -m scaffix entrypoint
└── cli.py        # Interactive prompts + folder creation logic

tests/            # Test suite

Quick parent-only example:

Enter START number: 1
Enter END number: 100
Zero-pad folder names? N
Create subdirectories inside each folder? N
Base path: ./demo

For deeper internal flow, see docs/PROJECT_GUIDE.md.


🛠 Developer Notes

  • Main entry function: scaffix.cli.main()
  • Safe cancellation: Ctrl + C exits cleanly
  • Errors are handled per folder to avoid stopping the whole run
  • Runtime errors are logged to scaffix.log
  • Current Python requirement: >=3.9

Dev setup

pip install -e .[dev]
pre-commit install

Run checks locally:

black --check src tests
pytest

🚢 Release & Publishing

  • Semantic versioning is enabled using conventional commits.
  • .github/workflows/semantic-release.yml handles automated version/tag/release.
  • .github/workflows/publish-pypi.yml publishes to PyPI when a GitHub release is published.
  • For PyPI automation, configure a Trusted Publisher for this repository in PyPI.

✅ Suggested Next Improvements

  • Add automated tests for input parsing and creation behavior
  • Add a non-interactive mode with CLI flags (--start, --end, etc.)
  • Add optional dry-run mode (preview without creating)

🏷 Version

Current version: 1.0.2


📄 License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scaffix-1.0.2.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scaffix-1.0.2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file scaffix-1.0.2.tar.gz.

File metadata

  • Download URL: scaffix-1.0.2.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for scaffix-1.0.2.tar.gz
Algorithm Hash digest
SHA256 845a2f101226cc420b68ab7ad1651e5051f60c83101dd478ab7a88aa906ebd52
MD5 f8fa6ad8c62098e86c01daca6da1bc48
BLAKE2b-256 333d69143081c2a81287a1bf2fbd9e5eb83b789d6ba2302a40f47c65a90cd55a

See more details on using hashes here.

File details

Details for the file scaffix-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: scaffix-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for scaffix-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 75d12c6a95fdfdbaa622b192fb5dacde6e1789b13bfd0dc2153e4fcc19cda241
MD5 bbb3bbb81fe354f9f82e529ee6c500b5
BLAKE2b-256 4791ffb79d7c4bbb466fa1c4c8a7dc8e77ebd6a0dedbf46d77e4e802bd0e70dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page