A rapid prototyping tool for generating containerized backend + frontend CRUD stacks from CSV/SQLite files.
Project description
Sirius-CLI
A rapid prototyping CLI tool designed to take multiple CSV files, Excel spreadsheets, a SQLite database, or a JSON configuration file as inputs, automatically infer their structural schemas and relationships, and generate:
- A production-grade, container-ready FastAPI backend (with SQLAlchemy models, Pydantic v2 validation schemas, and automated Alembic migrations).
- A modular, responsive, multi-page React 18 (TypeScript, Vite, Tailwind CSS) CRUD frontend with dynamic relational selectors and a beautiful Dashboard.
📚 Read the Official Technical Documentation Here
Prerequisites
Before using Sirius-CLI, ensure you have the following installed:
| Requirement | Minimum Version | Purpose |
|---|---|---|
| Python | 3.9+ | Runtime for the CLI tool itself |
| pip | Latest | Installing sirius-cli from PyPI |
| Node.js | 16+ | Running the generated React frontend (npm install, npm run dev) |
| Docker (optional) | 20+ | Running the full stack via docker compose up |
Key Capabilities
- Automatic Relationship Mapping: Automatically extracts foreign keys from databases and resolves CSV/Excel associations using naming heuristics (linking
[table]_idfields), navigating irregular English plurals effortlessly. - Auto-Seeding: Automatically seeds the generated database with the entries inside the source CSV/Excel files during migration (if using SQLite).
- Relational Integrity: Generates dropdowns in the UI for foreign keys and displays badges that navigate to parent entities.
- Native Form Validation: Injects strict HTML5
required,min,max, andtype="email"validation constraints into the generated frontend by directly inferring them from the source data (via SQLitePRAGMAsor Pandas null-checks). - Enterprise Data Grid: The generated tables feature server-side searching (
?search=), server-side column sorting (?order_by=), and dual data export buttons (CSV and Excel.xlsx). - Dashboard Analytics: A built-in Recharts dashboard showing live dataset distribution and entity insights.
- Multiple Database Engines: Target
SQLitefor rapid local prototyping, or generatePostgreSQLandMySQLready projects out of the box using--pgand--mysql. - Iterative Updates: Use
sirius-init updateto safely inject new tables or columns into an existing scaffolded project.
Installation
Install the package directly from PyPI:
pip install sirius-cli
(For local development: clone the repository and run pip install -e .)
Usage: Creating a New Project (sirius-init init)
1. Generating from CSVs or Excel
# From CSVs
sirius-init init store_system --csv examples/users.csv --csv examples/orders.csv --theme violet
# From Excel
sirius-init init store_system --excel examples/products.xlsx --theme amber
2. Target Production Databases
By default, the stack uses an embedded SQLite file (app.db). You can target Postgres or MySQL instead:
sirius-init init billing_system --config schema.json --pg
(The generated docker-compose.yml and database.py will expect a DATABASE_URL environment variable).
3. Generating from JSON Configuration
Specify database schemas, relationships, and colors in a JSON file:
{
"project_name": "billing_system",
"theme": "emerald",
"entities": {
"customers": {
"columns": [
{ "name": "id", "type": "Integer", "is_pk": true },
{ "name": "name", "type": "String" },
{ "name": "email", "type": "String" },
{ "name": "is_active", "type": "Boolean" }
]
},
"invoices": {
"columns": [
{ "name": "id", "type": "Integer", "is_pk": true },
{ "name": "ref_no", "type": "String" },
{ "name": "amount", "type": "Float" },
{ "name": "customer_id", "type": "Integer", "foreign_key": "customers.id" },
{ "name": "created_at", "type": "DateTime" }
]
}
}
}
Then run:
sirius-init init billing_system --config examples/billing-config.json
4. Generating with JWT Authentication
Pass the --auth flag to scaffold a secure project. This generates an app_users table, a beautiful Login screen, and protects all FastAPI routes with JWT Bearer tokens automatically.
sirius-init init secure_system --csv examples/users.csv --auth --admin-user "superadmin" --admin-pass "securepass123"
Security Note: If you omit
--admin-pass, a secure random password will be auto-generated and printed to your terminal. The generated project also readsSECRET_KEYfrom environment variables — be sure to set this in production.
Usage: Instant Preview (sirius-init preview)
Want to see how your app looks before generating hundreds of files? Use the preview command to instantly spin up an in-memory database, dynamic API, and Vue 3 frontend in your browser!
sirius-init preview --csv examples/users.csv --port 8765
Usage: Updating an Existing Project (sirius-init update)
If your data requirements change (e.g., adding a reviews table to your store), you don't need to start from scratch. Use the update command to merge new schemas into an existing project.
sirius-init update ./store_system --csv examples/new_reviews.csv
Sirius-CLI will:
- Regenerate your SQLAlchemy models and Pydantic schemas.
- Regenerate your frontend routing and CRUD views.
- Automatically run
alembic revision --autogenerateandalembic upgrade headto apply the database migrations seamlessly.
All CLI Flags
sirius-init init / sirius-init update / sirius-init preview
| Flag | Short | Default | Description |
|---|---|---|---|
--csv |
Path to a CSV file (repeatable) | ||
--excel |
Path to an Excel .xlsx/.xls file (repeatable) | ||
--db |
Path to a SQLite .db file | ||
--config |
-c |
Path to a JSON config file | |
--theme |
-t |
blue |
Frontend color theme (blue, indigo, emerald, amber, rose, sky, violet) |
--out |
-o |
. |
Output directory (only for init) |
--port |
-p |
8000 |
Backend port (used in Dockerfile, docker-compose, .env) |
--api-url |
http://localhost:<port> |
Override the frontend VITE_API_URL | |
--no-seed |
false |
Skip seeding the DB from source CSV/Excel files | |
--auth |
false |
Generate JWT authentication logic and a React Login screen | |
--admin-user |
admin |
The default admin username to seed if --auth is enabled |
|
--admin-pass |
(auto-generated) | The admin password to seed if --auth is enabled |
|
--pg |
false |
Generate Postgres connection pool and drivers | |
--mysql |
false |
Generate MySQL connection pool and drivers |
Running the Scaffolded Stack
Using Docker Compose
cd <project_name>
docker compose up --build
Running Locally
- Start Backend:
cd <project_name> pip install -r backend/requirements.txt uvicorn backend.main:app --reload --port 8000
- Start Frontend (requires Node.js 16+):
cd <project_name>/frontend npm install npm run dev
Openhttp://localhost:5173/in your browser.
OS Compatibility
| OS | Supported Versions |
|---|---|
| Windows | 10, 11 |
| macOS | 12 (Monterey)+ |
| Linux | Ubuntu 20.04+, Fedora 36+, Debian 11+ |
| WSL2 | Fully supported |
Python: Requires 3.9 or higher.
Contributing
We welcome contributions! Please see our CONTRIBUTING.md for details on how to set up your local development environment and run tests.
Note: All incoming Pull Requests must pass strict PEP8 formatting and linting via black and flake8, and type-checking via mypy. We recommend installing our pre-commit hooks.
License & Commercial Use
Sirius-CLI is open-source and released under the GNU AGPLv3 License.
This is a strong copyleft license that ensures the project remains free and open. By using this software, you agree that any modifications or larger works incorporating this tool that are distributed or provided as a network service (SaaS) must also be open-sourced under the same AGPLv3 license.
Dual Licensing for Enterprise If your organization wishes to use Sirius-CLI in proprietary, closed-source software without being subject to the open-source requirements of the AGPLv3, a Commercial License is available for purchase. Please contact the maintainer for more details on enterprise licensing.
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 sirius_cli-0.3.2.tar.gz.
File metadata
- Download URL: sirius_cli-0.3.2.tar.gz
- Upload date:
- Size: 81.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ab54b2f1999a9b4a8f1fad770f2e3352581202fa9eb852c99dd4159181e37f4
|
|
| MD5 |
6d63f5cff92930a88bd6bc808067f3f6
|
|
| BLAKE2b-256 |
351f3f816d4312e2a56084cd26bf4a462e3ff808b29f325f7114b30775c0f6a0
|
Provenance
The following attestation bundles were made for sirius_cli-0.3.2.tar.gz:
Publisher:
publish.yml on amineaith3/sirius-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sirius_cli-0.3.2.tar.gz -
Subject digest:
8ab54b2f1999a9b4a8f1fad770f2e3352581202fa9eb852c99dd4159181e37f4 - Sigstore transparency entry: 2153935337
- Sigstore integration time:
-
Permalink:
amineaith3/sirius-cli@8d6f0711f2427a31d113c200e929bbe15bb6ba8a -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/amineaith3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8d6f0711f2427a31d113c200e929bbe15bb6ba8a -
Trigger Event:
push
-
Statement type:
File details
Details for the file sirius_cli-0.3.2-py3-none-any.whl.
File metadata
- Download URL: sirius_cli-0.3.2-py3-none-any.whl
- Upload date:
- Size: 74.4 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 |
efc7fd06714439ac85f8c5042634a85737e1c3a3390abc4a4ae4a1201e7316c5
|
|
| MD5 |
eccd27a5d0e6bfc551c55dc9eea0a6b3
|
|
| BLAKE2b-256 |
e76015776f1ed75543f8c6a7889928e71531601b2512e0eb2e34e0ace1b79c02
|
Provenance
The following attestation bundles were made for sirius_cli-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on amineaith3/sirius-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sirius_cli-0.3.2-py3-none-any.whl -
Subject digest:
efc7fd06714439ac85f8c5042634a85737e1c3a3390abc4a4ae4a1201e7316c5 - Sigstore transparency entry: 2153935663
- Sigstore integration time:
-
Permalink:
amineaith3/sirius-cli@8d6f0711f2427a31d113c200e929bbe15bb6ba8a -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/amineaith3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8d6f0711f2427a31d113c200e929bbe15bb6ba8a -
Trigger Event:
push
-
Statement type: