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.4.tar.gz (12.1 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.4-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gen_cli-0.1.4.tar.gz
  • Upload date:
  • Size: 12.1 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.4.tar.gz
Algorithm Hash digest
SHA256 7cb18fc28127b803b1facb9b1258e043af4ec734e25f50ae576a9b865cf6f858
MD5 e952d8cd60fb9a2b0d9617c8526e282f
BLAKE2b-256 dec5e4b9475bcf0af76f5ad45df0bd6b16a93cbbc1ee770b3d8c62850a9a11b1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gen_cli-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 16.5 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e53292718292a1993893085b926acec0207a7a22ae7cccd88f6e0ac49a3e1d44
MD5 d4eca8b7456a586882b98ea04f34cea2
BLAKE2b-256 4e05d7105b2729c04ce9ed4c3bf9febee4228c51b9d4f2c964dd06da6ad0e0ff

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