Skip to main content

Gen-CLI is a Python-based tool to generate boilerplate code and framework templates for multiple programming languages.

Project description

Gen-CLI

Gen-CLI is a Python-based command-line tool for generating boilerplate code and framework templates for multiple programming languages.

It supports:

  • Single-file boilerplate generation based on file extension
  • Project scaffolding using language and framework templates
  • Directory tree visualization
  • Environment diagnostics

Installation

pip install gen-cli

or run from source

git clone https://github.com/yourname/gen-cli.git
cd gen-cli
python -m gen

Usage

gen <command> [arguments]

Commands

help

Show the help message.

gen help
gen --help
gen -h

list

List all available language templates.

gen list

doctor

Check environment and configuration.

gen doctor

tree

Display a tree view of the directory structure.

gen tree
gen tree -r           # recursive
gen tree -3           # depth = 3
gen tree path/to/dir

new

Generate a new project using a language and framework template.

gen new <project_name> --lang <language> --template <framework>

Example

gen new myapp --lang python --template fastapi

⚠️ Both --lang and --template flags are required.


Single File Generation

Generate a boilerplate file based on its extension.

gen main.py
gen app.go
gen index.js

The tool determines the template automatically using the file extension.


Supported Languages & Templates

Language Templates
Python flask, fastapi, django
Go cli, web
Rust actix, rocket
C standard
C++ standard
Java spring, standard
JavaScript node, react, vue
HTML standard

Directory Tree Example

project/
├── main.py
├── app/
│   ├── __init__.py
│   └── routes.py
└── README.md

Error Handling

  • Invalid commands show the help message
  • Invalid file extensions list supported templates
  • Tree command falls back to current directory on error

Project Structure

gen/
├── commands/
│   ├── helper.py
│   ├── list_.py
│   └── template.py
├── config.py
└── main.py

Limitations

  • Argument parsing is manual (sys.argv)
  • Flags must follow exact order for new
  • No interactive mode
  • No plugin system

Roadmap

  • Migrate to argparse / typer
  • Improve error messages
  • Add interactive project generator
  • Add template registry
  • Add shell auto-completion

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

gen_cli-0.1.3.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

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

gen_cli-0.1.3-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file gen_cli-0.1.3.tar.gz.

File metadata

  • Download URL: gen_cli-0.1.3.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gen_cli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7090a661f81a2a84a8a1ee9d2abf8638b91d114a9cda744871434a2935621586
MD5 2410bfe51ed1a61ded8fb611eb498883
BLAKE2b-256 a065eeaa14c1f2033c1101c29c0f56ed2ad2c0599b7e26814fdb2c5feddfa49f

See more details on using hashes here.

File details

Details for the file gen_cli-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: gen_cli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gen_cli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 14b284dd4ca28210f56ec766ec2d53385491fc08e8ec38dc183f951ff4e2e356
MD5 a2861a56fc3a5d04bb61cf23fcfa2586
BLAKE2b-256 b9e3bb335f1166d386adf16314f04c9d5e335d8e5a6d0ad47b5ae011a1a4f31f

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