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

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.6.tar.gz (12.2 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.6-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gen_cli-0.1.6.tar.gz
  • Upload date:
  • Size: 12.2 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.6.tar.gz
Algorithm Hash digest
SHA256 2945604a15cfc8d915fff81edd077f3d0ce6cbb73c9e400129d35e8c1137aa36
MD5 72dc2ed0de4a983dd833a434ae0d8324
BLAKE2b-256 80c0b922af0bf1a2d1bfae883a94d7ab43644a7a739b26e9386c5ef52b118f5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gen_cli-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 16.7 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 984f85055fecf8b747717f7d9bf668ece9516907912c87b69c9edef761fadaa1
MD5 e88a5a69cc1da9588fb57a38cac41c54
BLAKE2b-256 edbae2a15d41c4520cc0d8545484711a6e273b187e8abdf612a25eaf69eacd15

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