A powerful Python scaffolding toolkit for rapid project creation with intelligent template system, modular add-ons, and beautiful CLI interface.
Project description
๐ DhruvKit
A powerful Python scaffolding toolkit for rapid project creation with intelligent template system, modular add-ons, and beautiful CLI interface.
๐ฏ Create production-ready Python projects in seconds
pip install dhruvkit && dk new myproject --template fastapi --license mit
Get Started โข View Features โข Documentation
โจ Features
- ๐จ Beautiful CLI Interface - Rich terminal output with colors, panels, and progress indicators
- ๐ฆ Smart Templates - Pre-configured templates for FastAPI, Flask, and basic Python projects
- ๐งฉ Modular Add-ons - Mix and match features like MongoDB, Firebase, and security middleware
- ๐ License Support - Generates projects with multiple license options (MIT, Apache, GPL, BSD, Unlicense, CC0)
- โก Intelligent Merging - Automatically combines multiple add-ons without conflicts
- ๐ฏ Zero configuration - Ready to run immediately
- ๐ Auto Documentation - Generates comprehensive README and usage guides
๐ Note: DhruvKit itself is licensed under GPL v2.0. Generated projects may use a different license.
๐ Quick Start
Installation
pip install dhruvkit
๐ก Tip: You can use
dkas a shorthand fordhruvkitin all commands!
โก Recommended Flow
# Create a full-featured app with MongoDB, Firebase, and security in one command
dhruvkit new myapp --template fastapi --mongodb --firebase --secure
# Set up and run
cd myapp
pip install -r requirements.txt
uvicorn src.main:app --reload
๐ That's it! You now have a production-ready FastAPI app with MongoDB, Firebase auth, and security middleware.
Install from source
git clone https://github.com/dhruvgarg001/dhruvkit.git
cd dhruvkit
pip install -e .
Optional: Install with runtime dependencies
Optional: Install extras if you want to test templates locally.
# For testing FastAPI template generation
pip install dhruvkit[fastapi]
# For testing Flask template generation
pip install dhruvkit[flask]
# For testing Firebase integration
pip install dhruvkit[firebase]
# For testing MongoDB integration
pip install dhruvkit[mongodb]
# Install all extras
pip install dhruvkit[fastapi,flask,mongodb,firebase]
More Examples
# Basic FastAPI project
dk new myapp --template fastapi
# Flask project with MIT license
dk new myapp -t flask --license mit
# Initialize in current directory
dk init --template basic
# Add a license later
dk add --license apache
๐ Usage
Commands
new - Create a new project
dhruvkit new <project_name> [--template TEMPLATE] [--license LICENSE] [addons...]
Examples:
dhruvkit new blog --template fastapi
dk new api -t fastapi --mongodb --firebase # Using short aliases
dhruvkit new myapp --template flask --license apache
init - Initialize in current directory
dhruvkit init [--template TEMPLATE] [--license LICENSE] [addons...]
Examples:
dhruvkit init --template fastapi
dhruvkit init --template fastapi --mongodb --secure
add - Add license to existing project
dhruvkit add --license LICENSE
Examples:
dhruvkit add --license mit
dhruvkit add --license apache
docs - View documentation
dhruvkit docs [command]
Available Templates
| Template | Description | Add-ons Available |
|---|---|---|
basic |
Minimal Python project | None |
flask |
Flask web application | None |
fastapi |
FastAPI application | mongodb, firebase, secure |
FastAPI Add-ons
--mongodb - MongoDB Atlas Integration
- Complete database connection management
- Collection utilities and indexing
- Lifespan event handling
- Usage documentation
--firebase - Firebase Admin SDK
- Firebase authentication support
- Firestore database access
- Real-time database support
- Comprehensive integration guide
--secure - Security Middleware
- CORS configuration
- Host checking middleware
- Security headers (CSP, X-Frame-Options, X-Content-Type-Options)
- Production-ready security setup
Mix & Match Add-ons
DhruvKit intelligently combines multiple add-ons:
# MongoDB + Firebase
dhruvkit new myapp --template fastapi --mongodb --firebase
# All three add-ons together
dhruvkit new myapp --template fastapi --mongodb --firebase --secure
The generated code automatically merges:
- โ Import statements
- โ Configuration files (.env, settings.py)
- โ Dependencies (requirements.txt)
- โ README documentation
- โ Application initialization
Supported Licenses
mit- MIT Licenseapache- Apache License 2.0gpl- GNU General Public License v3.0bsd- BSD 3-Clause Licenseunlicense- The Unlicensecc/cc0- Creative Commons Zero v1.0
๐๏ธ Project Structure
A typical FastAPI project with add-ons:
myapp/
โโโ src/
โ โโโ database_functions/ # MongoDB utilities (if --mongodb)
โ โ โโโ __init__.py
โ โ โโโ MongoDBConfig.py
โ โโโ main.py # FastAPI application
โ โโโ dbconfig.py # Database initialization (if --mongodb)
โ โโโ settings.py # Configuration
โโโ docs/ # Auto-generated documentation
โ โโโ mongodb_usage.md
โ โโโ firebase_usage.md
โ โโโ security_guide.md
โโโ .env # Environment variables
โโโ .gitignore
โโโ requirements.txt
โโโ LICENSE # If --license specified
โโโ README.md # Project documentation
๐ฏ Why DhruvKit?
Before DhruvKit
# Manual setup required
mkdir myapp && cd myapp
python -m venv .venv
touch main.py settings.py .env .gitignore
# ... write boilerplate code
# ... set up MongoDB connection
# ... configure Firebase
# ... add security middleware
# ... write documentation
With DhruvKit
dhruvkit new myapp --template fastapi --mongodb --firebase --secure
cd myapp && pip install -r requirements.txt
uvicorn src.main:app --reload
# ๐ Ready to code!
๐ง Development
Project Structure
dhruvkit/
โโโ src/
โ โโโ dhruvkit/
โ โโโ commands/ # Command implementations
โ โ โโโ new.py
โ โ โโโ init.py
โ โ โโโ add.py
โ โ โโโ docs.py
โ โโโ templates/ # Project templates
โ โ โโโ basic.py
โ โ โโโ flask.py
โ โ โโโ fastapi.py
โ โโโ license_templates/ # License files
โ โโโ cli.py # CLI entry point
โ โโโ licenses.py # License handler
โ โโโ utils.py # Shared utilities
โโโ tests/
โโโ pyproject.toml
โโโ README.md
Contributing
Contributions are welcome! Feel free to:
- ๐ Report bugs
- ๐ก Suggest new features
- ๐ง Submit pull requests
- ๐ Improve documentation
๐ License
This project is licensed under the GNU General Public License v2.0 - see the LICENSE file for details.
๐ Acknowledgments
- Built with Rich for beautiful terminal output
- Uses python-decouple for environment management
๐ฌ Contact
Created by Dhruv Garg
Made with โค๏ธ and Python
Project details
Release history Release notifications | RSS feed
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 dhruvkit-0.1.1.tar.gz.
File metadata
- Download URL: dhruvkit-0.1.1.tar.gz
- Upload date:
- Size: 48.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bec46dcf045e8fd2838c321b0a59125426413494baaafba127448a64e28316a
|
|
| MD5 |
d8b24a590490b55d4785626bd15f120c
|
|
| BLAKE2b-256 |
7689721bda9aed852783c94d38305ac7f761ae43fa4af172cd6f7d172b17af03
|
Provenance
The following attestation bundles were made for dhruvkit-0.1.1.tar.gz:
Publisher:
publish.yml on DhruvGarg001/dhruvkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dhruvkit-0.1.1.tar.gz -
Subject digest:
8bec46dcf045e8fd2838c321b0a59125426413494baaafba127448a64e28316a - Sigstore transparency entry: 959079811
- Sigstore integration time:
-
Permalink:
DhruvGarg001/dhruvkit@2a9e4cf6cf9f4eba468d92f99d5b8ed1dea7ab99 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/DhruvGarg001
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a9e4cf6cf9f4eba468d92f99d5b8ed1dea7ab99 -
Trigger Event:
release
-
Statement type:
File details
Details for the file dhruvkit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dhruvkit-0.1.1-py3-none-any.whl
- Upload date:
- Size: 58.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89565ed2adafa496243d5132f37de6ba182cc50d38b82e6b3b370ec6301b1af6
|
|
| MD5 |
0942b0526cea5dda210556f42f3b640c
|
|
| BLAKE2b-256 |
e9f0fdf379180c49ba4f8746d5ab3417f2909ea8060190ef5bf6a18aa5c077fc
|
Provenance
The following attestation bundles were made for dhruvkit-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on DhruvGarg001/dhruvkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dhruvkit-0.1.1-py3-none-any.whl -
Subject digest:
89565ed2adafa496243d5132f37de6ba182cc50d38b82e6b3b370ec6301b1af6 - Sigstore transparency entry: 959079871
- Sigstore integration time:
-
Permalink:
DhruvGarg001/dhruvkit@2a9e4cf6cf9f4eba468d92f99d5b8ed1dea7ab99 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/DhruvGarg001
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a9e4cf6cf9f4eba468d92f99d5b8ed1dea7ab99 -
Trigger Event:
release
-
Statement type: