stup 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stup-0.1.0/.gitignore +39 -0
- stup-0.1.0/.python-version +1 -0
- stup-0.1.0/LICENSE +21 -0
- stup-0.1.0/PKG-INFO +176 -0
- stup-0.1.0/README.md +149 -0
- stup-0.1.0/pyproject.toml +58 -0
- stup-0.1.0/src/app/__init__.py +3 -0
- stup-0.1.0/src/app/cli.py +173 -0
- stup-0.1.0/src/app/commands/__init__.py +1 -0
- stup-0.1.0/src/app/commands/activate.py +33 -0
- stup-0.1.0/src/app/commands/add.py +35 -0
- stup-0.1.0/src/app/commands/api.py +178 -0
- stup-0.1.0/src/app/commands/cli_cmd.py +137 -0
- stup-0.1.0/src/app/commands/django_cmd.py +153 -0
- stup-0.1.0/src/app/commands/docs.py +162 -0
- stup-0.1.0/src/app/commands/lang_agent.py +147 -0
- stup-0.1.0/src/app/commands/mean.py +130 -0
- stup-0.1.0/src/app/commands/mern.py +134 -0
- stup-0.1.0/src/app/commands/ml.py +119 -0
- stup-0.1.0/src/app/commands/next_django.py +147 -0
- stup-0.1.0/src/app/commands/notebook.py +116 -0
- stup-0.1.0/src/app/commands/openai_agent.py +112 -0
- stup-0.1.0/src/app/commands/react_fastapi.py +139 -0
- stup-0.1.0/src/app/commands/saas.py +249 -0
- stup-0.1.0/src/app/commands/scraper.py +163 -0
- stup-0.1.0/src/app/commands/test_cmd.py +117 -0
- stup-0.1.0/src/app/commands/uv.py +31 -0
- stup-0.1.0/src/app/utils.py +166 -0
- stup-0.1.0/test-minimal/.python-version +1 -0
- stup-0.1.0/test-minimal/README.md +0 -0
- stup-0.1.0/test-minimal/main.py +6 -0
- stup-0.1.0/test-minimal/pyproject.toml +9 -0
- stup-0.1.0/test-minimal/requirements.txt +5 -0
- stup-0.1.0/test-scaffold/.python-version +1 -0
- stup-0.1.0/test-scaffold/README.md +0 -0
- stup-0.1.0/test-scaffold/agent.py +71 -0
- stup-0.1.0/test-scaffold/main.py +6 -0
- stup-0.1.0/test-scaffold/pyproject.toml +10 -0
- stup-0.1.0/uv.lock +784 -0
stup-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
*.egg-info/
|
|
7
|
+
*.egg
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
.eggs/
|
|
11
|
+
|
|
12
|
+
# Virtual environments
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
ENV/
|
|
16
|
+
|
|
17
|
+
# IDE
|
|
18
|
+
.vscode/
|
|
19
|
+
.idea/
|
|
20
|
+
*.swp
|
|
21
|
+
*.swo
|
|
22
|
+
*~
|
|
23
|
+
|
|
24
|
+
# OS
|
|
25
|
+
.DS_Store
|
|
26
|
+
Thumbs.db
|
|
27
|
+
|
|
28
|
+
# Environment
|
|
29
|
+
.env
|
|
30
|
+
.env.local
|
|
31
|
+
|
|
32
|
+
# Testing
|
|
33
|
+
htmlcov/
|
|
34
|
+
.coverage
|
|
35
|
+
.coverage.*
|
|
36
|
+
.pytest_cache/
|
|
37
|
+
|
|
38
|
+
# Build
|
|
39
|
+
*.whl
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.11.14
|
stup-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 teeon
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
stup-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: stup
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Scaffold production-ready project structures in seconds. Install once, scaffold forever.
|
|
5
|
+
Project-URL: Homepage, https://github.com/muhdaliyan/stup
|
|
6
|
+
Project-URL: Repository, https://github.com/muhdaliyan/stup
|
|
7
|
+
Project-URL: Issues, https://github.com/muhdaliyan/stup/issues
|
|
8
|
+
Author: teeon
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: boilerplate,cli,fullstack,project-template,scaffold,uv
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
21
|
+
Classifier: Topic :: Utilities
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Requires-Dist: requests>=2.33.1
|
|
24
|
+
Requires-Dist: rich>=13.0.0
|
|
25
|
+
Requires-Dist: typer>=0.9.0
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# stup
|
|
29
|
+
|
|
30
|
+
> 🚀 Scaffold production-ready project structures in seconds. Install once, scaffold forever.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install stup
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Foundation Commands
|
|
37
|
+
|
|
38
|
+
### `stup uv`
|
|
39
|
+
|
|
40
|
+
Bootstraps a complete uv Python project. Run this first before any template.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
$ stup uv
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- `uv init` — creates pyproject.toml and project skeleton
|
|
47
|
+
- `uv python pin 3.12` — pins Python version
|
|
48
|
+
- `uv venv` — creates virtual environment
|
|
49
|
+
- Prints activation command (cross-platform)
|
|
50
|
+
|
|
51
|
+
### `stup activate`
|
|
52
|
+
|
|
53
|
+
Smart cross-platform venv activator — detects your shell and prints the right command.
|
|
54
|
+
|
|
55
|
+
- **Windows PowerShell:** `.venv\Scripts\Activate`
|
|
56
|
+
- **Linux/Mac bash/zsh:** `source .venv/bin/activate`
|
|
57
|
+
|
|
58
|
+
### `stup add <packages>`
|
|
59
|
+
|
|
60
|
+
Add packages using `uv` and automatically maintain a clean `requirements.txt`.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
$ stup add requests pandas
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Template Commands
|
|
69
|
+
|
|
70
|
+
Each template builds on top of `stup uv`. Run `stup uv` first, then pick your template.
|
|
71
|
+
|
|
72
|
+
### `stup react-fastapi`
|
|
73
|
+
|
|
74
|
+
| | |
|
|
75
|
+
|---|---|
|
|
76
|
+
| **Description** | Full-stack web app — React frontend + FastAPI backend with Docker Compose and CORS pre-configured |
|
|
77
|
+
| **Stack** | Python + JavaScript (Vite, React, Tailwind, FastAPI, Alembic) |
|
|
78
|
+
| **Installs** | `uv add fastapi uvicorn alembic` \| `npm install react tailwindcss vite` |
|
|
79
|
+
| **Structure** | `frontend/` `backend/` `docker-compose.yml` `.env` |
|
|
80
|
+
|
|
81
|
+
### `stup notebook`
|
|
82
|
+
|
|
83
|
+
| | |
|
|
84
|
+
|---|---|
|
|
85
|
+
| **Description** | Data science workspace with Jupyter notebooks, uv-managed deps, kernel auto-registered |
|
|
86
|
+
| **Stack** | Python + Jupyter |
|
|
87
|
+
| **Installs** | `uv add ipykernel pandas numpy matplotlib` |
|
|
88
|
+
| **Structure** | `notebooks/` `data/raw/` `data/processed/` |
|
|
89
|
+
|
|
90
|
+
### `stup openai-agent`
|
|
91
|
+
|
|
92
|
+
| | |
|
|
93
|
+
|---|---|
|
|
94
|
+
| **Description** | Modern OpenAI agent with function calling (tools), environment config, and helper stubs |
|
|
95
|
+
| **Stack** | Python (OpenAI SDK, python-dotenv) |
|
|
96
|
+
| **Installs** | `uv add openai python-dotenv` |
|
|
97
|
+
| **Structure** | `agent.py` `tools/` `.env` (OPENAI_API_KEY) |
|
|
98
|
+
|
|
99
|
+
### `stup lang-agent`
|
|
100
|
+
|
|
101
|
+
| | |
|
|
102
|
+
|---|---|
|
|
103
|
+
| **Description** | LangGraph AI agent with tool stubs, memory/checkpointing, and Ollama config |
|
|
104
|
+
| **Stack** | Python (LangGraph, LangChain, Ollama) |
|
|
105
|
+
| **Installs** | `uv add langgraph langchain-community` |
|
|
106
|
+
| **Structure** | `agent.py` `tools/` `memory/` `.env` (OLLAMA_BASE_URL) |
|
|
107
|
+
|
|
108
|
+
### `stup django`
|
|
109
|
+
|
|
110
|
+
| | |
|
|
111
|
+
|---|---|
|
|
112
|
+
| **Description** | Production-ready Django + DRF + Celery + Redis + PostgreSQL setup with python-decouple |
|
|
113
|
+
| **Stack** | Python (Django, DRF, Celery, Redis, PostgreSQL) |
|
|
114
|
+
| **Installs** | `uv add django djangorestframework celery redis python-decouple` |
|
|
115
|
+
| **Structure** | `config/` `apps/users/` `apps/api/` `tasks/` `.env` |
|
|
116
|
+
|
|
117
|
+
### `stup ml`
|
|
118
|
+
|
|
119
|
+
| | |
|
|
120
|
+
|---|---|
|
|
121
|
+
| **Description** | ML project scaffold with experiment tracking, model versioning, and MLflow stub |
|
|
122
|
+
| **Stack** | Python (scikit-learn, PyTorch, MLflow) |
|
|
123
|
+
| **Installs** | `uv add scikit-learn torch mlflow` |
|
|
124
|
+
| **Structure** | `data/` `models/` `experiments/runs/` `experiments/configs/` |
|
|
125
|
+
|
|
126
|
+
### `stup scraper`
|
|
127
|
+
|
|
128
|
+
| | |
|
|
129
|
+
|---|---|
|
|
130
|
+
| **Description** | Web scraping project with Playwright, BeautifulSoup, pandas output pipeline and scheduler |
|
|
131
|
+
| **Stack** | Python (Playwright, BeautifulSoup4, pandas) |
|
|
132
|
+
| **Installs** | `uv add playwright beautifulsoup4 pandas schedule` + `playwright install chromium` |
|
|
133
|
+
| **Structure** | `spider.py` `pipeline.py` `data/raw/` `data/cleaned/` |
|
|
134
|
+
|
|
135
|
+
### `stup cli`
|
|
136
|
+
|
|
137
|
+
| | |
|
|
138
|
+
|---|---|
|
|
139
|
+
| **Description** | PyPI-ready Python CLI package with Typer + Rich, entry_points wired in pyproject.toml |
|
|
140
|
+
| **Stack** | Python (Typer, Rich) |
|
|
141
|
+
| **Installs** | `uv add typer rich` |
|
|
142
|
+
| **Structure** | `src/<project>/` `commands/` `pyproject.toml` `README.md` |
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Quick Reference
|
|
147
|
+
|
|
148
|
+
| Command | Stack | Use Case |
|
|
149
|
+
|---------|-------|----------|
|
|
150
|
+
| `stup uv` | Python | Start any Python project |
|
|
151
|
+
| `stup activate` | Python | Activate venv cross-platform |
|
|
152
|
+
| `stup add` | Python | Add deps & sync requirements.txt |
|
|
153
|
+
| `stup react-fastapi` | Py + JS | Full-stack web app |
|
|
154
|
+
| `stup notebook` | Python | Data science / Jupyter |
|
|
155
|
+
| `stup openai-agent` | Python | Modern OpenAI Agent |
|
|
156
|
+
| `stup lang-agent` | Python | LangGraph AI agent |
|
|
157
|
+
| `stup django` | Python | Full Django + Celery API |
|
|
158
|
+
| `stup ml` | Python | ML project + MLflow |
|
|
159
|
+
| `stup scraper` | Python | Web scraping pipeline |
|
|
160
|
+
| `stup cli` | Python | PyPI-ready CLI package |
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Development
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
git clone https://github.com/teeon/stup.git
|
|
168
|
+
cd stup
|
|
169
|
+
uv venv
|
|
170
|
+
uv pip install -e ".[dev]"
|
|
171
|
+
stup --help
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## License
|
|
175
|
+
|
|
176
|
+
MIT
|
stup-0.1.0/README.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# stup
|
|
2
|
+
|
|
3
|
+
> 🚀 Scaffold production-ready project structures in seconds. Install once, scaffold forever.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install stup
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Foundation Commands
|
|
10
|
+
|
|
11
|
+
### `stup uv`
|
|
12
|
+
|
|
13
|
+
Bootstraps a complete uv Python project. Run this first before any template.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
$ stup uv
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- `uv init` — creates pyproject.toml and project skeleton
|
|
20
|
+
- `uv python pin 3.12` — pins Python version
|
|
21
|
+
- `uv venv` — creates virtual environment
|
|
22
|
+
- Prints activation command (cross-platform)
|
|
23
|
+
|
|
24
|
+
### `stup activate`
|
|
25
|
+
|
|
26
|
+
Smart cross-platform venv activator — detects your shell and prints the right command.
|
|
27
|
+
|
|
28
|
+
- **Windows PowerShell:** `.venv\Scripts\Activate`
|
|
29
|
+
- **Linux/Mac bash/zsh:** `source .venv/bin/activate`
|
|
30
|
+
|
|
31
|
+
### `stup add <packages>`
|
|
32
|
+
|
|
33
|
+
Add packages using `uv` and automatically maintain a clean `requirements.txt`.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
$ stup add requests pandas
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Template Commands
|
|
42
|
+
|
|
43
|
+
Each template builds on top of `stup uv`. Run `stup uv` first, then pick your template.
|
|
44
|
+
|
|
45
|
+
### `stup react-fastapi`
|
|
46
|
+
|
|
47
|
+
| | |
|
|
48
|
+
|---|---|
|
|
49
|
+
| **Description** | Full-stack web app — React frontend + FastAPI backend with Docker Compose and CORS pre-configured |
|
|
50
|
+
| **Stack** | Python + JavaScript (Vite, React, Tailwind, FastAPI, Alembic) |
|
|
51
|
+
| **Installs** | `uv add fastapi uvicorn alembic` \| `npm install react tailwindcss vite` |
|
|
52
|
+
| **Structure** | `frontend/` `backend/` `docker-compose.yml` `.env` |
|
|
53
|
+
|
|
54
|
+
### `stup notebook`
|
|
55
|
+
|
|
56
|
+
| | |
|
|
57
|
+
|---|---|
|
|
58
|
+
| **Description** | Data science workspace with Jupyter notebooks, uv-managed deps, kernel auto-registered |
|
|
59
|
+
| **Stack** | Python + Jupyter |
|
|
60
|
+
| **Installs** | `uv add ipykernel pandas numpy matplotlib` |
|
|
61
|
+
| **Structure** | `notebooks/` `data/raw/` `data/processed/` |
|
|
62
|
+
|
|
63
|
+
### `stup openai-agent`
|
|
64
|
+
|
|
65
|
+
| | |
|
|
66
|
+
|---|---|
|
|
67
|
+
| **Description** | Modern OpenAI agent with function calling (tools), environment config, and helper stubs |
|
|
68
|
+
| **Stack** | Python (OpenAI SDK, python-dotenv) |
|
|
69
|
+
| **Installs** | `uv add openai python-dotenv` |
|
|
70
|
+
| **Structure** | `agent.py` `tools/` `.env` (OPENAI_API_KEY) |
|
|
71
|
+
|
|
72
|
+
### `stup lang-agent`
|
|
73
|
+
|
|
74
|
+
| | |
|
|
75
|
+
|---|---|
|
|
76
|
+
| **Description** | LangGraph AI agent with tool stubs, memory/checkpointing, and Ollama config |
|
|
77
|
+
| **Stack** | Python (LangGraph, LangChain, Ollama) |
|
|
78
|
+
| **Installs** | `uv add langgraph langchain-community` |
|
|
79
|
+
| **Structure** | `agent.py` `tools/` `memory/` `.env` (OLLAMA_BASE_URL) |
|
|
80
|
+
|
|
81
|
+
### `stup django`
|
|
82
|
+
|
|
83
|
+
| | |
|
|
84
|
+
|---|---|
|
|
85
|
+
| **Description** | Production-ready Django + DRF + Celery + Redis + PostgreSQL setup with python-decouple |
|
|
86
|
+
| **Stack** | Python (Django, DRF, Celery, Redis, PostgreSQL) |
|
|
87
|
+
| **Installs** | `uv add django djangorestframework celery redis python-decouple` |
|
|
88
|
+
| **Structure** | `config/` `apps/users/` `apps/api/` `tasks/` `.env` |
|
|
89
|
+
|
|
90
|
+
### `stup ml`
|
|
91
|
+
|
|
92
|
+
| | |
|
|
93
|
+
|---|---|
|
|
94
|
+
| **Description** | ML project scaffold with experiment tracking, model versioning, and MLflow stub |
|
|
95
|
+
| **Stack** | Python (scikit-learn, PyTorch, MLflow) |
|
|
96
|
+
| **Installs** | `uv add scikit-learn torch mlflow` |
|
|
97
|
+
| **Structure** | `data/` `models/` `experiments/runs/` `experiments/configs/` |
|
|
98
|
+
|
|
99
|
+
### `stup scraper`
|
|
100
|
+
|
|
101
|
+
| | |
|
|
102
|
+
|---|---|
|
|
103
|
+
| **Description** | Web scraping project with Playwright, BeautifulSoup, pandas output pipeline and scheduler |
|
|
104
|
+
| **Stack** | Python (Playwright, BeautifulSoup4, pandas) |
|
|
105
|
+
| **Installs** | `uv add playwright beautifulsoup4 pandas schedule` + `playwright install chromium` |
|
|
106
|
+
| **Structure** | `spider.py` `pipeline.py` `data/raw/` `data/cleaned/` |
|
|
107
|
+
|
|
108
|
+
### `stup cli`
|
|
109
|
+
|
|
110
|
+
| | |
|
|
111
|
+
|---|---|
|
|
112
|
+
| **Description** | PyPI-ready Python CLI package with Typer + Rich, entry_points wired in pyproject.toml |
|
|
113
|
+
| **Stack** | Python (Typer, Rich) |
|
|
114
|
+
| **Installs** | `uv add typer rich` |
|
|
115
|
+
| **Structure** | `src/<project>/` `commands/` `pyproject.toml` `README.md` |
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Quick Reference
|
|
120
|
+
|
|
121
|
+
| Command | Stack | Use Case |
|
|
122
|
+
|---------|-------|----------|
|
|
123
|
+
| `stup uv` | Python | Start any Python project |
|
|
124
|
+
| `stup activate` | Python | Activate venv cross-platform |
|
|
125
|
+
| `stup add` | Python | Add deps & sync requirements.txt |
|
|
126
|
+
| `stup react-fastapi` | Py + JS | Full-stack web app |
|
|
127
|
+
| `stup notebook` | Python | Data science / Jupyter |
|
|
128
|
+
| `stup openai-agent` | Python | Modern OpenAI Agent |
|
|
129
|
+
| `stup lang-agent` | Python | LangGraph AI agent |
|
|
130
|
+
| `stup django` | Python | Full Django + Celery API |
|
|
131
|
+
| `stup ml` | Python | ML project + MLflow |
|
|
132
|
+
| `stup scraper` | Python | Web scraping pipeline |
|
|
133
|
+
| `stup cli` | Python | PyPI-ready CLI package |
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Development
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
git clone https://github.com/teeon/stup.git
|
|
141
|
+
cd stup
|
|
142
|
+
uv venv
|
|
143
|
+
uv pip install -e ".[dev]"
|
|
144
|
+
stup --help
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## License
|
|
148
|
+
|
|
149
|
+
MIT
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "stup"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Scaffold production-ready project structures in seconds. Install once, scaffold forever."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = {text = "MIT"}
|
|
7
|
+
requires-python = ">=3.11"
|
|
8
|
+
authors = [
|
|
9
|
+
{name = "teeon"},
|
|
10
|
+
]
|
|
11
|
+
keywords = ["cli", "scaffold", "boilerplate", "project-template", "uv", "fullstack"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 4 - Beta",
|
|
14
|
+
"Environment :: Console",
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3.11",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
"Programming Language :: Python :: 3.13",
|
|
21
|
+
"Topic :: Software Development :: Code Generators",
|
|
22
|
+
"Topic :: Utilities",
|
|
23
|
+
]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"typer>=0.9.0",
|
|
26
|
+
"rich>=13.0.0",
|
|
27
|
+
"requests>=2.33.1",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.scripts]
|
|
31
|
+
stup = "app.cli:app"
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
Homepage = "https://github.com/muhdaliyan/stup"
|
|
35
|
+
Repository = "https://github.com/muhdaliyan/stup"
|
|
36
|
+
Issues = "https://github.com/muhdaliyan/stup/issues"
|
|
37
|
+
|
|
38
|
+
[build-system]
|
|
39
|
+
requires = ["hatchling"]
|
|
40
|
+
build-backend = "hatchling.build"
|
|
41
|
+
|
|
42
|
+
[tool.hatch.build.targets.wheel]
|
|
43
|
+
packages = ["src/app"]
|
|
44
|
+
|
|
45
|
+
[tool.pytest.ini_options]
|
|
46
|
+
testpaths = ["tests"]
|
|
47
|
+
|
|
48
|
+
[tool.uv.workspace]
|
|
49
|
+
members = [
|
|
50
|
+
"test-scaffold",
|
|
51
|
+
"test-minimal",
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
[dependency-groups]
|
|
55
|
+
dev = [
|
|
56
|
+
"pytest>=7.0",
|
|
57
|
+
"pytest-cov>=4.0",
|
|
58
|
+
]
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"""stup CLI — Main entry point."""
|
|
2
|
+
|
|
3
|
+
import typer
|
|
4
|
+
from rich.console import Console
|
|
5
|
+
|
|
6
|
+
from app import __version__
|
|
7
|
+
from app.commands import (
|
|
8
|
+
activate,
|
|
9
|
+
add,
|
|
10
|
+
api,
|
|
11
|
+
cli_cmd,
|
|
12
|
+
django_cmd,
|
|
13
|
+
docs,
|
|
14
|
+
lang_agent,
|
|
15
|
+
mean,
|
|
16
|
+
mern,
|
|
17
|
+
ml,
|
|
18
|
+
next_django,
|
|
19
|
+
notebook,
|
|
20
|
+
openai_agent,
|
|
21
|
+
react_fastapi,
|
|
22
|
+
saas,
|
|
23
|
+
scraper,
|
|
24
|
+
test_cmd,
|
|
25
|
+
uv,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
console = Console()
|
|
29
|
+
|
|
30
|
+
app = typer.Typer(
|
|
31
|
+
name="stup",
|
|
32
|
+
help="Scaffold production-ready project structures in seconds.",
|
|
33
|
+
add_completion=False,
|
|
34
|
+
rich_markup_mode="rich",
|
|
35
|
+
no_args_is_help=True,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _version_callback(value: bool) -> None:
|
|
40
|
+
if value:
|
|
41
|
+
console.print(f"[bold cyan]stup[/bold cyan] v{__version__}")
|
|
42
|
+
raise typer.Exit()
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@app.callback()
|
|
46
|
+
def main(
|
|
47
|
+
version: bool = typer.Option(
|
|
48
|
+
False, "--version", "-v", help="Show version and exit.", callback=_version_callback, is_eager=True
|
|
49
|
+
),
|
|
50
|
+
) -> None:
|
|
51
|
+
"""stup — Install once, scaffold forever."""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
# ── Foundation commands ──────────────────────────────────────────────
|
|
55
|
+
|
|
56
|
+
@app.command()
|
|
57
|
+
def uv_cmd() -> None:
|
|
58
|
+
"""[bold cyan]Foundation[/bold cyan] · Bootstrap a complete uv Python project."""
|
|
59
|
+
uv.run_command()
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# Register as "uv" not "uv-cmd"
|
|
63
|
+
uv_cmd.__name__ = "uv" # type: ignore[attr-defined]
|
|
64
|
+
uv_cmd = app.registered_commands[-1]
|
|
65
|
+
uv_cmd.name = "uv"
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
@app.command(name="activate")
|
|
69
|
+
def activate_cmd() -> None:
|
|
70
|
+
"""[bold cyan]Foundation[/bold cyan] · Smart cross-platform venv activator."""
|
|
71
|
+
activate.run_command()
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
@app.command(name="add")
|
|
75
|
+
def add_cmd(packages: list[str]) -> None:
|
|
76
|
+
"""[bold cyan]Foundation[/bold cyan] · Add packages and sync requirements.txt."""
|
|
77
|
+
add.run_command(packages)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# ── Template commands ────────────────────────────────────────────────
|
|
81
|
+
|
|
82
|
+
@app.command(name="react-fastapi")
|
|
83
|
+
def react_fastapi_cmd() -> None:
|
|
84
|
+
"""[bold magenta]Full-stack[/bold magenta] · React + FastAPI with Docker Compose & CORS."""
|
|
85
|
+
react_fastapi.run_command()
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
@app.command(name="notebook")
|
|
89
|
+
def notebook_cmd() -> None:
|
|
90
|
+
"""[bold green]Data Science[/bold green] · Jupyter notebooks with uv-managed deps."""
|
|
91
|
+
notebook.run_command()
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
@app.command(name="mern")
|
|
95
|
+
def mern_cmd() -> None:
|
|
96
|
+
"""[bold magenta]Full-stack[/bold magenta] · MongoDB + Express + React + Node."""
|
|
97
|
+
mern.run_command()
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
@app.command(name="mean")
|
|
101
|
+
def mean_cmd() -> None:
|
|
102
|
+
"""[bold magenta]Full-stack[/bold magenta] · MongoDB + Express + Angular + Node."""
|
|
103
|
+
mean.run_command()
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
@app.command(name="django")
|
|
107
|
+
def django_cmd_fn() -> None:
|
|
108
|
+
"""[bold blue]Backend[/bold blue] · Django + DRF + Celery + Redis + PostgreSQL."""
|
|
109
|
+
django_cmd.run_command()
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
@app.command(name="next-django")
|
|
113
|
+
def next_django_cmd() -> None:
|
|
114
|
+
"""[bold magenta]Full-stack[/bold magenta] · Next.js 14 + Django REST + JWT auth."""
|
|
115
|
+
next_django.run_command()
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
@app.command(name="ml")
|
|
119
|
+
def ml_cmd() -> None:
|
|
120
|
+
"""[bold green]Data Science[/bold green] · ML project with experiment tracking & MLflow."""
|
|
121
|
+
ml.run_command()
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
@app.command(name="lang-agent")
|
|
125
|
+
def lang_agent_cmd() -> None:
|
|
126
|
+
"""[bold yellow]AI[/bold yellow] · LangGraph agent with tool stubs & Ollama config."""
|
|
127
|
+
lang_agent.run_command()
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
@app.command(name="openai-agent")
|
|
131
|
+
def openai_agent_cmd() -> None:
|
|
132
|
+
"""[bold yellow]AI[/bold yellow] · Modern OpenAI agent with function calling."""
|
|
133
|
+
openai_agent.run_command()
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
@app.command(name="scraper")
|
|
137
|
+
def scraper_cmd() -> None:
|
|
138
|
+
"""[bold yellow]Automation[/bold yellow] · Playwright + BeautifulSoup scraping pipeline."""
|
|
139
|
+
scraper.run_command()
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
@app.command(name="cli")
|
|
143
|
+
def cli_cmd_fn() -> None:
|
|
144
|
+
"""[bold blue]Package[/bold blue] · PyPI-ready CLI package with Typer + Rich."""
|
|
145
|
+
cli_cmd.run_command()
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
@app.command(name="api")
|
|
149
|
+
def api_cmd() -> None:
|
|
150
|
+
"""[bold blue]Backend[/bold blue] · Minimal FastAPI microservice with auth middleware."""
|
|
151
|
+
api.run_command()
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
@app.command(name="saas")
|
|
155
|
+
def saas_cmd() -> None:
|
|
156
|
+
"""[bold magenta]Full-stack[/bold magenta] · Full SaaS boilerplate with Stripe & Docker."""
|
|
157
|
+
saas.run_command()
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
@app.command(name="docs")
|
|
161
|
+
def docs_cmd() -> None:
|
|
162
|
+
"""[bold dim]Addon[/bold dim] · Add MkDocs + Material theme to any project."""
|
|
163
|
+
docs.run_command()
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
@app.command(name="test")
|
|
167
|
+
def test_cmd_fn() -> None:
|
|
168
|
+
"""[bold dim]Addon[/bold dim] · Scaffold a full pytest suite with coverage."""
|
|
169
|
+
test_cmd.run_command()
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
if __name__ == "__main__":
|
|
173
|
+
app()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""stup.commands — All CLI command implementations."""
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""stup activate — Smart cross-platform venv activator."""
|
|
2
|
+
|
|
3
|
+
from app.utils import (
|
|
4
|
+
console,
|
|
5
|
+
ensure_venv_exists,
|
|
6
|
+
get_activate_command,
|
|
7
|
+
is_windows,
|
|
8
|
+
print_banner,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def run_command() -> None:
|
|
13
|
+
"""Print the correct venv activation command for the current platform."""
|
|
14
|
+
print_banner("activate", "Smart cross-platform venv activator")
|
|
15
|
+
|
|
16
|
+
ensure_venv_exists()
|
|
17
|
+
|
|
18
|
+
cmd = get_activate_command()
|
|
19
|
+
|
|
20
|
+
console.print()
|
|
21
|
+
if is_windows():
|
|
22
|
+
console.print(" [yellow]→[/yellow] Run this in PowerShell:")
|
|
23
|
+
console.print(f" [bold white]{cmd}[/bold white]")
|
|
24
|
+
console.print()
|
|
25
|
+
console.print(" [dim]Or in CMD:[/dim]")
|
|
26
|
+
console.print(r" [dim].venv\Scripts\activate.bat[/dim]")
|
|
27
|
+
else:
|
|
28
|
+
console.print(" [yellow]→[/yellow] Run this in your terminal:")
|
|
29
|
+
console.print(f" [bold white]{cmd}[/bold white]")
|
|
30
|
+
console.print()
|
|
31
|
+
console.print(" [dim]Or use eval:[/dim]")
|
|
32
|
+
console.print(" [dim]eval $(stup activate)[/dim]")
|
|
33
|
+
console.print()
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""stup add — Thin wrapper over uv add that maintains requirements.txt."""
|
|
2
|
+
|
|
3
|
+
import typer
|
|
4
|
+
from app.utils import (
|
|
5
|
+
check_uv,
|
|
6
|
+
ensure_venv_exists,
|
|
7
|
+
print_banner,
|
|
8
|
+
print_done,
|
|
9
|
+
run,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
def run_command(packages: list[str]) -> None:
|
|
13
|
+
"""Add packages using uv and update requirements.txt."""
|
|
14
|
+
print_banner("add", f"Adding packages: {', '.join(packages)}")
|
|
15
|
+
|
|
16
|
+
check_uv()
|
|
17
|
+
ensure_venv_exists()
|
|
18
|
+
|
|
19
|
+
# Add packages
|
|
20
|
+
pkg_str = " ".join(packages)
|
|
21
|
+
run(f"uv add {pkg_str}")
|
|
22
|
+
|
|
23
|
+
# Update requirements.txt for compatibility (clean format)
|
|
24
|
+
run("uv export --format requirements-txt --no-hashes --no-emit-project --output-file requirements.txt --quiet")
|
|
25
|
+
|
|
26
|
+
# Post-process to remove all 'via' comments for a super clean look
|
|
27
|
+
req_file = "requirements.txt"
|
|
28
|
+
with open(req_file, "r") as f:
|
|
29
|
+
lines = f.readlines()
|
|
30
|
+
with open(req_file, "w") as f:
|
|
31
|
+
for line in lines:
|
|
32
|
+
if not line.strip().startswith("#"):
|
|
33
|
+
f.write(line)
|
|
34
|
+
|
|
35
|
+
print_done()
|