Skip to main content

CLI tool for FastAPI scaffolding with router, models, database, and templates.

Project description

Shafikul CLI

Shafikul CLI is a command-line tool to scaffold FastAPI projects quickly.
It helps you generate routers, models, database connections, HTML templates, full complete application with proper folder structure and auto updates for main.py and .env file.


Features

  • ✅ Create FastAPI routers, models, and database modules
  • ✅ Auto-generate main.py with imports and DB setup
  • ✅ Auto-generate or update .env file
  • ✅ Create HTML templates (index.html or custom names)
  • ✅ Interactive CLI (numeric and text options)
  • ✅ Colored console output
  • ✅ Version commands (--version, -v, -V)
  • ✅ About commands (--about, -a, -A)

Installation

Install from PyPI:

pip install shafikul_cli

Or Locally (editable):

git clone https://github.com/build-with-shafikul/shafikul_cli.git
cd shafikul_cli
pip install -e .

CLI help

shafikul_cli --help

Show version

shafikul_cli --version

About CLI

shafikul_cli --about

Create resources

shafikul_cli create app

Interactive Option

1: router
2: models
3: database
4: html
5: structure


You can select by number or by name Example for HTML template:
shafikul create app html
Enter file name default [index.html]: home.html

Database creation also auto updates main.py and .env

Project Structure

project_root/
│   .env
│   .gitignore
│   alembic.ini
│   main.py
│   README.md
│   requirements.txt
│   test.db
│   
├───app
│      database.py
│      models.py
│           
├───asset
│   ├───css
│   ├───images
│   └───js
├───migrations
│      env.py
│      README
│         ├───versions
│         b6bbf47f6a8a_create_users_table.py
│           
├───router
│       users.py
│       __init__.py
│       
├───static
│   └───images
│           logo.png
│           
├───templates
│       index.html
│       notfound.html
│       
└───utility
        helper_function.py

Development

If you want to contribute:
Fork the repo ↗
Create a feature branch: git checkout -b feature-name
Commit your changes: git commit -m "Add feature"
Push to the branch: git push origin feature-name
Open a Pull Request

License

MIT License

Author

Md Shafikul Islam GitHub ↗

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

shafikul_cli-2.0.1.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

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

shafikul_cli-2.0.1-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file shafikul_cli-2.0.1.tar.gz.

File metadata

  • Download URL: shafikul_cli-2.0.1.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for shafikul_cli-2.0.1.tar.gz
Algorithm Hash digest
SHA256 250bd0f37ea58396c632a546424e4fa89d06a922f19cfe45ccafd17b5f124301
MD5 1922fbf395be2c76311ff4177dc2147f
BLAKE2b-256 cac4a893930f680da8c6cc2dc836cdaa8a027ee27f39eaf1e645161a3ae5d105

See more details on using hashes here.

Provenance

The following attestation bundles were made for shafikul_cli-2.0.1.tar.gz:

Publisher: workflow.yml on build-with-shafikul/shafikul_cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file shafikul_cli-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: shafikul_cli-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for shafikul_cli-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4f3e6b2258b50cb13505e0a2c6959b2c1c2c0184d716f5a35006125af123f5c8
MD5 fb31e3129d0386b9e184fac3bd5ad264
BLAKE2b-256 5766bd6476aa80cabfdb71d8e2120228a98f61a5ce7408b54c0a8499115a46ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for shafikul_cli-2.0.1-py3-none-any.whl:

Publisher: workflow.yml on build-with-shafikul/shafikul_cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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