Skip to main content

A CLI tool to create project folder structures from a markdown file.

Project description

Nirman-cli

PyPI Version License

A simple and powerful CLI tool to create project folder and file structures from Markdown and YAML tree definitions.

Stop creating files and folders manually. Define your project’s skeleton in a readable Markdown or YAML file, and let nirman build it for you in seconds.

Key Features

  • Two Input Formats:

    • Markdown (.md, .markdown)
    • YAML (.yml, .yaml)
  • Readable Tree Syntax: Write clean collapsible structures.

  • Safe Execution: Preview actions with --dry-run.

  • Flexible: Overwrite files using --force.

  • Lightweight & Fast: Uses simple tree-based parsing.

  • Cross-platform: Works on Linux, macOS, and Windows.


Installation

Install from PyPI:

pip install Nirman-cli

Usage

1) Markdown Example

Create a file structure.md:

my-python-app/
├── src/
│   ├── __init__.py
│   └── main.py
├── tests/
│   └── test_main.py
└── README.md

Build the structure:

nirman structure.md

2) YAML Example

Nirman also supports YAML. Rule: Individual files must be listed under a files: key.

Example (structure.yml):

project:
  src:
    files:
      - main.py
      - utils.py
  services:
    api:
      files:
        - handler.py
        - routes.py
  files:
    - README.md
    - .gitignore

Build it:

nirman structure.yml

This produces:

output_folder/
└── project/
    ├── src/
    │   ├── main.py
    │   └── utils.py
    ├── services/
    │   └── api/
    │       ├── handler.py
    │       └── routes.py
    ├── README.md
    └── .gitignore

Command-Line Options

usage: nirman [-h] [-o OUTPUT] [--dry-run] [-f] input_file

Build a project structure from a Markdown (.md) or YAML (.yml/.yaml) file.

positional arguments:
  input_file            Path to the structure file.

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Target directory where the structure will be created (default: current directory).
  --dry-run             Print the actions that would be taken without creating any files or directories.
  -f, --force           Overwrite existing files if they are encountered.

YAML Rules (Important)

Your YAML structure must follow these rules:

  1. Every folder is a dictionary key.

  2. All direct files inside a folder must be placed under:

    files:
      - file1.txt
      - file2.py
    
  3. Nested folders must be dictionaries.

  4. Lists may contain:

    • file names (strings)
    • dictionaries for nested folders

This rule is reflected in the updated parser:

# Individual files must be under "files:"
if key == "files":
    ...

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

nirman_cli-0.2.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

nirman_cli-0.2.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file nirman_cli-0.2.0.tar.gz.

File metadata

  • Download URL: nirman_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nirman_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e206e0b203acc3c08cf166f5214cbf59b3fabd109a1fb9e3ffcf2943175d7f0a
MD5 a8866f93222bb3100795728cda69fecd
BLAKE2b-256 317445369214743db6ada1c9883e1dcc240dca5e3809ba925a712053c970de71

See more details on using hashes here.

Provenance

The following attestation bundles were made for nirman_cli-0.2.0.tar.gz:

Publisher: ci-cd.yml on Hemanth0411/Nirman-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nirman_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nirman_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nirman_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f710894db5a9d452133469aa1c32a8ba33d7bf66b4579bb0d2dea67adc8d2f8b
MD5 bff8ebb226a4baddd90d174c9e5b3f41
BLAKE2b-256 6e3aff5781e5e93e057748269042ed2a0baed797d4f315120a1b4b39dfb0e8f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for nirman_cli-0.2.0-py3-none-any.whl:

Publisher: ci-cd.yml on Hemanth0411/Nirman-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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