New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

Nirman-cli

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Nirman-cli

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

pipPyPI
Version
0.2.0
Maintainers
1

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:

  • Every folder is a dictionary key.

  • All direct files inside a folder must be placed under:

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

  • 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.

Keywords

cli

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts