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.5.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.5-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gen_cli-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 c0fbaa49e07e22cfd3d6d992a6087a602c9a6b22dec81fc798281635f5ca1d7d
MD5 14c4cdb366865fff82c5a6fd884c572c
BLAKE2b-256 2712430d09d5260d50a30b290c3c1281c539101293283655ff014760d5d74105

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gen_cli-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6bb90d0094393c405a715ba46cadbf770a63d383d204383cee9fd2a613cab65c
MD5 28b0778e88a099d149046bddf3d6476d
BLAKE2b-256 d5cd0960b233bd8412dcaa82cbe2945dfa80e388d36e272d82ab3b5bdbdfe626

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