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.pywith imports and DB setup - ✅ Auto-generate or update
.envfile - ✅ Create HTML templates (
index.htmlor 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
540331087a19ee0d8de7e2f703ecb2683954f0723c5a0845a7cdd01cc75c17e7
|
|
| MD5 |
51e0eb2f4052e5f7b466d883fe62a8c6
|
|
| BLAKE2b-256 |
803a47e2094db26c0ef441fb46eb42e8174078cc303597d697a15257f7ee27da
|
Provenance
The following attestation bundles were made for shafikul_cli-2.0.2.tar.gz:
Publisher:
workflow.yml on build-with-shafikul/shafikul_cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shafikul_cli-2.0.2.tar.gz -
Subject digest:
540331087a19ee0d8de7e2f703ecb2683954f0723c5a0845a7cdd01cc75c17e7 - Sigstore transparency entry: 1439841665
- Sigstore integration time:
-
Permalink:
build-with-shafikul/shafikul_cli@0041c2a4414096b71c107a5e2ecaa305f9441a6c -
Branch / Tag:
refs/tags/v2.0.2 - Owner: https://github.com/build-with-shafikul
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@0041c2a4414096b71c107a5e2ecaa305f9441a6c -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad4e902d648c22f24d645cdfe8ef4a324bb8aca901a3eda9a8e9eb3d81b5b40e
|
|
| MD5 |
adbd7627c33c2baf5722e3622654b0a6
|
|
| BLAKE2b-256 |
47e32197bb782e47d9571bd35cfb497ae9a4df698b5f624e78db8baf5d6d5dc7
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shafikul_cli-2.0.2-py3-none-any.whl -
Subject digest:
ad4e902d648c22f24d645cdfe8ef4a324bb8aca901a3eda9a8e9eb3d81b5b40e - Sigstore transparency entry: 1439841676
- Sigstore integration time:
-
Permalink:
build-with-shafikul/shafikul_cli@0041c2a4414096b71c107a5e2ecaa305f9441a6c -
Branch / Tag:
refs/tags/v2.0.2 - Owner: https://github.com/build-with-shafikul
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@0041c2a4414096b71c107a5e2ecaa305f9441a6c -
Trigger Event:
push
-
Statement type: