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

Uploaded Python 3

File details

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

File metadata

  • Download URL: shafikul_cli-2.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 540331087a19ee0d8de7e2f703ecb2683954f0723c5a0845a7cdd01cc75c17e7
MD5 51e0eb2f4052e5f7b466d883fe62a8c6
BLAKE2b-256 803a47e2094db26c0ef441fb46eb42e8174078cc303597d697a15257f7ee27da

See more details on using hashes here.

Provenance

The following attestation bundles were made for shafikul_cli-2.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: shafikul_cli-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 23.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ad4e902d648c22f24d645cdfe8ef4a324bb8aca901a3eda9a8e9eb3d81b5b40e
MD5 adbd7627c33c2baf5722e3622654b0a6
BLAKE2b-256 47e32197bb782e47d9571bd35cfb497ae9a4df698b5f624e78db8baf5d6d5dc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for shafikul_cli-2.0.2-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