npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nirman-cli-js

v0.1.0

Published

Reconstruct directory structures from Markdown tree files (JS port of Nirman CLI).

Readme

Nirman-cli-js

A clean, fast CLI tool to generate project folder structures from Markdown or YAML definitions. Stop clicking around in file explorers — describe your structure once, build it instantly.

Note: This is the Node.js port of the original Nirman-cli (Python).


✨ Features

  • Two input formats
    • Markdown (.md, .markdown)
    • YAML (.yml, .yaml)
  • Tree-based, human-readable syntax
  • Dry-run mode to preview without writing
  • Force overwrite for regenerating projects
  • Cross-platform (Linux, macOS, Windows)
  • Zero learning curve — simple, predictable behavior

📦 Installation

npm install -g nirman-cli-js

🚀 Quick Start

1) Markdown

structure.md

my-node-app/
├── src/
│   ├── index.js
│   └── utils.js
├── tests/
│   └── app.test.js
└── README.md

Generate:

nirman structure.md

Creates the project inside the current directory. (Use -o to output elsewhere.)


2) YAML

YAML uses a clean folder → files pattern. Files MUST be under a files: key.

structure.yml

project:
  src:
    files:
      - index.js
      - utils.js

  components:
    Button:
      files:
        - index.js
        - styles.css

  files:
    - README.md
    - .gitignore

Generate:

nirman structure.yml

📂 Output Structure Example

project/
├── src/
│   ├── index.js
│   └── utils.js
├── components/
│   └── Button/
│       ├── index.js
│       └── styles.css
├── README.md
└── .gitignore

🛠 CLI Reference

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

Arguments

| Argument | Description | | ------------ | ------------------------------------------------------------ | | input_file | Markdown (.md/.markdown) or YAML (.yml/.yaml) structure file |

Options

| Option | Description | | -------------- | --------------------------------------------- | | -o, --output | Target directory (default: current directory) | | --dry-run | Show actions without creating anything | | -f, --force | Overwrite existing files |


📘 YAML Rules (Important)

You must follow these rules when writing YAML structures:

  1. Every folder is a dict key

  2. Files go under the files: key

    files:
      - file1.js
      - file2.txt
      - config.json
  3. Nested folders must be dictionaries

  4. Lists can contain:

    • filenames (strings)
    • folders (dictionary items)

This enforces a clean, consistent YAML tree.


🧪 Running Tests (For Contributors)

npm test

🔧 Local Development Setup

git clone https://github.com/Hemanth0411/Nirman-cli-js
cd Nirman-cli-js
npm install

Run CLI from source:

node bin/index.js example.yml

📄 License

This project is licensed under the MIT License.