krickstart 1.2.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.
- krickstart-1.2.0/LICENSE +21 -0
- krickstart-1.2.0/PKG-INFO +249 -0
- krickstart-1.2.0/README.md +209 -0
- krickstart-1.2.0/devspeed/__init__.py +15 -0
- krickstart-1.2.0/devspeed/cli.py +21 -0
- krickstart-1.2.0/devspeed/config.py +29 -0
- krickstart-1.2.0/devspeed/core/__init__.py +29 -0
- krickstart-1.2.0/devspeed/core/compose_generator.py +3 -0
- krickstart-1.2.0/devspeed/errors.py +29 -0
- krickstart-1.2.0/devspeed/plugin.py +25 -0
- krickstart-1.2.0/devspeed/plugins/__init__.py +21 -0
- krickstart-1.2.0/devspeed/plugins/base.py +7 -0
- krickstart-1.2.0/devspeed/plugins/registry.py +29 -0
- krickstart-1.2.0/devspeed/stacks/__init__.py +21 -0
- krickstart-1.2.0/devspeed/stacks/common.py +66 -0
- krickstart-1.2.0/devspeed/stacks/django_postgres.py +168 -0
- krickstart-1.2.0/devspeed/stacks/express_mongodb.py +128 -0
- krickstart-1.2.0/devspeed/stacks/fastapi_postgres.py +140 -0
- krickstart-1.2.0/devspeed/stacks/flask_postgres.py +139 -0
- krickstart-1.2.0/devspeed/stacks/go_gin_postgres.py +161 -0
- krickstart-1.2.0/devspeed/stacks/laravel_mysql.py +134 -0
- krickstart-1.2.0/devspeed/stacks/nextjs_postgres.py +163 -0
- krickstart-1.2.0/devspeed/stacks/node_postgres_redis.py +171 -0
- krickstart-1.2.0/devspeed/stacks/spring_boot_mysql.py +133 -0
- krickstart-1.2.0/devspeed/stacks/spring_boot_postgres.py +110 -0
- krickstart-1.2.0/krickstart.egg-info/PKG-INFO +249 -0
- krickstart-1.2.0/krickstart.egg-info/SOURCES.txt +34 -0
- krickstart-1.2.0/krickstart.egg-info/dependency_links.txt +1 -0
- krickstart-1.2.0/krickstart.egg-info/entry_points.txt +15 -0
- krickstart-1.2.0/krickstart.egg-info/requires.txt +13 -0
- krickstart-1.2.0/krickstart.egg-info/top_level.txt +1 -0
- krickstart-1.2.0/pyproject.toml +85 -0
- krickstart-1.2.0/setup.cfg +4 -0
- krickstart-1.2.0/tests/test_cli.py +236 -0
- krickstart-1.2.0/tests/test_compose_generator.py +316 -0
- krickstart-1.2.0/tests/test_plugin.py +89 -0
krickstart-1.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nidhal Zitouni
|
|
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.
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: krickstart
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: Lightning-fast local dev environment manager powered by Docker Compose
|
|
5
|
+
Author-email: Nidhal Zitouni <zitouninidhal@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/ZitouniNidhal/Krickstart
|
|
8
|
+
Project-URL: Documentation, https://github.com/ZitouniNidhal/Krickstart#readme
|
|
9
|
+
Project-URL: Repository, https://github.com/ZitouniNidhal/Krickstart.git
|
|
10
|
+
Project-URL: Issues, https://github.com/ZitouniNidhal/Krickstart/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/ZitouniNidhal/Krickstart/blob/master/ROADMAP.md
|
|
12
|
+
Keywords: developer-tools,docker,docker-compose,dev-environment,dx,local-development,krickstart
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
23
|
+
Classifier: Topic :: Utilities
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: pydantic>=2.0
|
|
28
|
+
Requires-Dist: pyyaml>=6.0
|
|
29
|
+
Requires-Dist: rich>=13.0
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: black>=24.0; extra == "dev"
|
|
32
|
+
Requires-Dist: build>=1.2; extra == "dev"
|
|
33
|
+
Requires-Dist: mypy>=1.10; extra == "dev"
|
|
34
|
+
Requires-Dist: pip-audit>=2.7; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
36
|
+
Requires-Dist: pytest-cov>=5.0; extra == "dev"
|
|
37
|
+
Requires-Dist: ruff>=0.6; extra == "dev"
|
|
38
|
+
Requires-Dist: types-PyYAML>=6.0.12; extra == "dev"
|
|
39
|
+
Dynamic: license-file
|
|
40
|
+
|
|
41
|
+
# ⚡ Krickstart
|
|
42
|
+
|
|
43
|
+
**Spin up a reproducible local development environment in seconds.**
|
|
44
|
+
|
|
45
|
+
[](https://github.com/ZitouniNidhal/Krickstart/actions)
|
|
46
|
+
[](https://pypi.org/project/krickstart/)
|
|
47
|
+
[](LICENSE)
|
|
48
|
+
[](https://pypi.org/project/krickstart/)
|
|
49
|
+
[](https://github.com/psf/black)
|
|
50
|
+
[](https://github.com/astral-sh/ruff)
|
|
51
|
+
[](CONTRIBUTING.md)
|
|
52
|
+
|
|
53
|
+
`krickstart` is an opinionated, high-performance CLI tool that turns a concise `krickstart.yaml` recipe into a fully operational, reproducible Docker Compose environment. It eliminates the "it works on my machine" struggle by automating starter templates, database wiring, environment contracts, and connection URL generation.
|
|
54
|
+
|
|
55
|
+
**Stop debugging ports, volumes, and health checks. Start building.**
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
krickstart.yaml ➔ krickstart up ➔ 🚀 Ready-to-code Stack (App + Database + URLs)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 🏛️ Architecture Overview
|
|
64
|
+
|
|
65
|
+
`krickstart` sits as a declarative translation layer between your team's configuration contract and Docker Compose
|
|
66
|
+
|
|
67
|
+
```mermaid
|
|
68
|
+
flowchart TD
|
|
69
|
+
subgraph User Workspace
|
|
70
|
+
YAML["krickstart.yaml\n(Team Contract)"]
|
|
71
|
+
CLI["krickstart CLI\n(create / doctor / up / down)"]
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
subgraph Core Engine
|
|
75
|
+
REG["Plugin Registry\n(Built-in + Entry Points)"]
|
|
76
|
+
VAL["Schema & Port Validator\n(Conflict Detection)"]
|
|
77
|
+
GEN["Compose Generator\n(Atomic Writes & Locks)"]
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
subgraph Generated Outputs
|
|
81
|
+
DC["docker-compose.krickstart.yml\n(Services, Volumes, Healthchecks)"]
|
|
82
|
+
ENV[".env.krickstart\n(DATABASE_URL, REDIS_URL)"]
|
|
83
|
+
EX[".env.example\n(Masked Team Template)"]
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
subgraph Runtime
|
|
87
|
+
DOCKER["Docker Engine / Compose v2\n(127.0.0.1 Isolated Containers)"]
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
YAML --> CLI
|
|
91
|
+
CLI --> VAL
|
|
92
|
+
CLI --> REG
|
|
93
|
+
REG --> GEN
|
|
94
|
+
VAL --> GEN
|
|
95
|
+
GEN --> DC
|
|
96
|
+
GEN --> ENV
|
|
97
|
+
GEN --> EX
|
|
98
|
+
DC --> DOCKER
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 📊 Krickstart vs. Alternatives
|
|
104
|
+
|
|
105
|
+
| Capability | ⚡ Krickstart | Docker Compose | VS Code Dev Containers | Tilt | Nix / devenv |
|
|
106
|
+
| :--- | :---: | :---: | :---: | :---: | :---: |
|
|
107
|
+
| **Instant Starters** | ✅ Built-in Stacks | ❌ Manual Setup | ⚠️ Template repos | ❌ Manual Tiltfile | ⚠️ Custom flake |
|
|
108
|
+
| **Configuration Complexity** | 🟢 Low (~15 lines YAML) | 🔴 High (verbose Compose) | 🟡 Medium (`devcontainer.json`) | 🔴 High (Starlark/Tiltfile) | 🔴 High (Nix language) |
|
|
109
|
+
| **Auto-Wiring (`.env` / URLs)** | ✅ Automated | ❌ Manual `.env` | ⚠️ Partial | ❌ Manual | ⚠️ Environment vars only |
|
|
110
|
+
| **Editor Agnostic** | ✅ Any editor/IDE | ✅ Any editor/IDE | ❌ Optimized for VS Code | ✅ Any editor/IDE | ✅ Any editor/IDE |
|
|
111
|
+
| **Learning Curve** | 🚀 2 minutes | ⏳ Days | ⏳ Hours | ⏳ Days (K8s required) | ⏳ Weeks (Nix syntax) |
|
|
112
|
+
| **Host Port Conflict Checks** | ✅ `doctor` pre-flight | ❌ Fails on startup | ❌ Manual | ⚠️ Port-forwarding | ❌ Fails on startup |
|
|
113
|
+
| **Localhost Isolation (127.0.0.1)** | ✅ Default | ❌ Defaults to `0.0.0.0` | ⚠️ Container internal | ⚠️ Varies | N/A (Host processes) |
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## 🚀 Quick Start
|
|
118
|
+
|
|
119
|
+
### Prerequisites
|
|
120
|
+
- **Python 3.10+**
|
|
121
|
+
- **Docker Desktop** or Docker Engine with Docker Compose v2
|
|
122
|
+
|
|
123
|
+
### Installation
|
|
124
|
+
|
|
125
|
+
Install via your preferred Python tool manager:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Recommended (isolated CLI application)
|
|
129
|
+
pipx install krickstart
|
|
130
|
+
# or with uv:
|
|
131
|
+
uv tool install krickstart
|
|
132
|
+
|
|
133
|
+
# Or with standard pip
|
|
134
|
+
pip install krickstart
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### 30-Second Setup
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# 1. Interactively choose a stack (e.g. FastAPI + PostgreSQL)
|
|
141
|
+
krickstart create
|
|
142
|
+
|
|
143
|
+
# 2. Check local environment and port availability
|
|
144
|
+
krickstart doctor
|
|
145
|
+
|
|
146
|
+
# 3. Launch isolated environment
|
|
147
|
+
krickstart up
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Scripted / CI Workflow
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
krickstart init fastapi-postgres --name billing-api
|
|
154
|
+
krickstart doctor
|
|
155
|
+
krickstart up
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## 📦 Maintained Stacks
|
|
161
|
+
|
|
162
|
+
All maintained stacks feature health checks, volume persistence, and loopback security (`127.0.0.1` binding):
|
|
163
|
+
|
|
164
|
+
| Stack | Description | Included Services |
|
|
165
|
+
| :--- | :--- | :--- |
|
|
166
|
+
| `fastapi-postgres` | Python FastAPI REST API | FastAPI (Python 3.12), PostgreSQL 16 |
|
|
167
|
+
| `django-postgres` | Django Web Framework | Django (Python 3.12), PostgreSQL 16 |
|
|
168
|
+
| `flask-postgres` | Flask Microframework | Flask, PostgreSQL 16 |
|
|
169
|
+
| `node-postgres-redis` | Node.js Express API | Express (Node 22), PostgreSQL 16, Redis 7 |
|
|
170
|
+
| `nextjs-postgres` | Next.js App Router | Next.js, PostgreSQL 16 |
|
|
171
|
+
| `go-gin-postgres` | Go Gin REST API | Go Gin, PostgreSQL 16 |
|
|
172
|
+
| `spring-boot-postgres` | Java Spring Boot | Spring Boot (JDK 21), PostgreSQL 16 |
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## 🛠️ CLI Command Reference
|
|
177
|
+
|
|
178
|
+
| Command | Description |
|
|
179
|
+
| :--- | :--- |
|
|
180
|
+
| `krickstart list` | Show all available stack templates and descriptions |
|
|
181
|
+
| `krickstart init <stack>` | Generate `krickstart.yaml` and starter files for a chosen stack |
|
|
182
|
+
| `krickstart create` | Interactive terminal wizard to pick and initialize a stack |
|
|
183
|
+
| `krickstart validate` | Validate schema and ensure stack plugin can render without errors |
|
|
184
|
+
| `krickstart doctor` | Health-check Docker, Compose v2, YAML syntax, and detect port conflicts |
|
|
185
|
+
| `krickstart doctor --fix` | Automatically repair missing safe assets (e.g., regenerate `.env.example`) |
|
|
186
|
+
| `krickstart up` | Render Compose files and start containers in detached mode |
|
|
187
|
+
| `krickstart up --dry-run` | Preview generated YAML and `.env` files without writing or starting Docker |
|
|
188
|
+
| `krickstart down` | Gracefully stop containers (preserves database volumes) |
|
|
189
|
+
| `krickstart status` | Display container runtime health and port mappings (`docker compose ps`) |
|
|
190
|
+
| `krickstart logs [service]` | View or follow service logs (`--follow` supported) |
|
|
191
|
+
| `krickstart export` | Export standalone `docker-compose.yml` and `.env` for production or CI |
|
|
192
|
+
| `krickstart cleanup` | Stop containers, remove named volumes, and clean up generated files |
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## 🔒 Security Best Practices
|
|
197
|
+
|
|
198
|
+
1. **Loopback Isolation (`127.0.0.1`)**: `krickstart` binds container ports to `127.0.0.1` by default rather than `0.0.0.0`, protecting databases and internal APIs from exposure on public Wi-Fi or local networks.
|
|
199
|
+
2. **Masked Examples**: Generated `.env.example` templates automatically redact credentials so teammates can safely commit environment templates to git without leaking passwords.
|
|
200
|
+
3. **Never Commit Generated Files**:
|
|
201
|
+
Add to your `.gitignore`:
|
|
202
|
+
```gitignore
|
|
203
|
+
docker-compose.krickstart.yml
|
|
204
|
+
.env.krickstart
|
|
205
|
+
.env
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## 🔌 Plugin System & Extensibility
|
|
211
|
+
|
|
212
|
+
`krickstart` provides an open plugin interface using Python entry points. Organizations can package internal corporate stacks and publish them as private or public packages.
|
|
213
|
+
|
|
214
|
+
Third-party packages expose plugins via the `krickstart.stacks` entry point group in `pyproject.toml`:
|
|
215
|
+
|
|
216
|
+
```toml
|
|
217
|
+
[project.entry-points."krickstart.stacks"]
|
|
218
|
+
company-microservice = "my_company_stacks.microservice:MicroservicePlugin"
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Plugins implement the `StackPlugin` interface (`name`, `description`, `default_config`, `compose_yaml`, `env_file`, `post_up_hints`). See [docs/plugin-authoring.md](docs/plugin-authoring.md) for complete details.
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## 🤝 Contributing
|
|
226
|
+
|
|
227
|
+
We love contributions! Whether it's a new stack template, a bug fix, or documentation improvement, please check out our [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
|
|
228
|
+
|
|
229
|
+
**Ways to help:**
|
|
230
|
+
- 🌟 **Star the repo** to show your support.
|
|
231
|
+
- 🐛 **Report bugs** or request features in the Issues tab.
|
|
232
|
+
- 🛠️ **Build a plugin** and share your custom stack with the community.
|
|
233
|
+
- 📝 **Improve docs** to help other developers get started faster.
|
|
234
|
+
|
|
235
|
+
## 📖 Guides
|
|
236
|
+
For detailed instructions, explore our documentation:
|
|
237
|
+
- [🚀 Getting Started](./docs/getting-started.md) - From installation to your first stack.
|
|
238
|
+
- [🛠️ Custom Stacks](./docs/custom-stacks.md) - How to extend devspeed with your own templates.
|
|
239
|
+
- [🔍 Troubleshooting](./docs/troubleshooting.md) - Solving common Docker and config issues.
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# Run local test suite and quality gates:
|
|
244
|
+
python scripts/dev.py check
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## 📄 License
|
|
248
|
+
|
|
249
|
+
This project is licensed under the [MIT License](LICENSE).
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# ⚡ Krickstart
|
|
2
|
+
|
|
3
|
+
**Spin up a reproducible local development environment in seconds.**
|
|
4
|
+
|
|
5
|
+
[](https://github.com/ZitouniNidhal/Krickstart/actions)
|
|
6
|
+
[](https://pypi.org/project/krickstart/)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
[](https://pypi.org/project/krickstart/)
|
|
9
|
+
[](https://github.com/psf/black)
|
|
10
|
+
[](https://github.com/astral-sh/ruff)
|
|
11
|
+
[](CONTRIBUTING.md)
|
|
12
|
+
|
|
13
|
+
`krickstart` is an opinionated, high-performance CLI tool that turns a concise `krickstart.yaml` recipe into a fully operational, reproducible Docker Compose environment. It eliminates the "it works on my machine" struggle by automating starter templates, database wiring, environment contracts, and connection URL generation.
|
|
14
|
+
|
|
15
|
+
**Stop debugging ports, volumes, and health checks. Start building.**
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
krickstart.yaml ➔ krickstart up ➔ 🚀 Ready-to-code Stack (App + Database + URLs)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 🏛️ Architecture Overview
|
|
24
|
+
|
|
25
|
+
`krickstart` sits as a declarative translation layer between your team's configuration contract and Docker Compose
|
|
26
|
+
|
|
27
|
+
```mermaid
|
|
28
|
+
flowchart TD
|
|
29
|
+
subgraph User Workspace
|
|
30
|
+
YAML["krickstart.yaml\n(Team Contract)"]
|
|
31
|
+
CLI["krickstart CLI\n(create / doctor / up / down)"]
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
subgraph Core Engine
|
|
35
|
+
REG["Plugin Registry\n(Built-in + Entry Points)"]
|
|
36
|
+
VAL["Schema & Port Validator\n(Conflict Detection)"]
|
|
37
|
+
GEN["Compose Generator\n(Atomic Writes & Locks)"]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
subgraph Generated Outputs
|
|
41
|
+
DC["docker-compose.krickstart.yml\n(Services, Volumes, Healthchecks)"]
|
|
42
|
+
ENV[".env.krickstart\n(DATABASE_URL, REDIS_URL)"]
|
|
43
|
+
EX[".env.example\n(Masked Team Template)"]
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
subgraph Runtime
|
|
47
|
+
DOCKER["Docker Engine / Compose v2\n(127.0.0.1 Isolated Containers)"]
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
YAML --> CLI
|
|
51
|
+
CLI --> VAL
|
|
52
|
+
CLI --> REG
|
|
53
|
+
REG --> GEN
|
|
54
|
+
VAL --> GEN
|
|
55
|
+
GEN --> DC
|
|
56
|
+
GEN --> ENV
|
|
57
|
+
GEN --> EX
|
|
58
|
+
DC --> DOCKER
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 📊 Krickstart vs. Alternatives
|
|
64
|
+
|
|
65
|
+
| Capability | ⚡ Krickstart | Docker Compose | VS Code Dev Containers | Tilt | Nix / devenv |
|
|
66
|
+
| :--- | :---: | :---: | :---: | :---: | :---: |
|
|
67
|
+
| **Instant Starters** | ✅ Built-in Stacks | ❌ Manual Setup | ⚠️ Template repos | ❌ Manual Tiltfile | ⚠️ Custom flake |
|
|
68
|
+
| **Configuration Complexity** | 🟢 Low (~15 lines YAML) | 🔴 High (verbose Compose) | 🟡 Medium (`devcontainer.json`) | 🔴 High (Starlark/Tiltfile) | 🔴 High (Nix language) |
|
|
69
|
+
| **Auto-Wiring (`.env` / URLs)** | ✅ Automated | ❌ Manual `.env` | ⚠️ Partial | ❌ Manual | ⚠️ Environment vars only |
|
|
70
|
+
| **Editor Agnostic** | ✅ Any editor/IDE | ✅ Any editor/IDE | ❌ Optimized for VS Code | ✅ Any editor/IDE | ✅ Any editor/IDE |
|
|
71
|
+
| **Learning Curve** | 🚀 2 minutes | ⏳ Days | ⏳ Hours | ⏳ Days (K8s required) | ⏳ Weeks (Nix syntax) |
|
|
72
|
+
| **Host Port Conflict Checks** | ✅ `doctor` pre-flight | ❌ Fails on startup | ❌ Manual | ⚠️ Port-forwarding | ❌ Fails on startup |
|
|
73
|
+
| **Localhost Isolation (127.0.0.1)** | ✅ Default | ❌ Defaults to `0.0.0.0` | ⚠️ Container internal | ⚠️ Varies | N/A (Host processes) |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 🚀 Quick Start
|
|
78
|
+
|
|
79
|
+
### Prerequisites
|
|
80
|
+
- **Python 3.10+**
|
|
81
|
+
- **Docker Desktop** or Docker Engine with Docker Compose v2
|
|
82
|
+
|
|
83
|
+
### Installation
|
|
84
|
+
|
|
85
|
+
Install via your preferred Python tool manager:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Recommended (isolated CLI application)
|
|
89
|
+
pipx install krickstart
|
|
90
|
+
# or with uv:
|
|
91
|
+
uv tool install krickstart
|
|
92
|
+
|
|
93
|
+
# Or with standard pip
|
|
94
|
+
pip install krickstart
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 30-Second Setup
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# 1. Interactively choose a stack (e.g. FastAPI + PostgreSQL)
|
|
101
|
+
krickstart create
|
|
102
|
+
|
|
103
|
+
# 2. Check local environment and port availability
|
|
104
|
+
krickstart doctor
|
|
105
|
+
|
|
106
|
+
# 3. Launch isolated environment
|
|
107
|
+
krickstart up
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Scripted / CI Workflow
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
krickstart init fastapi-postgres --name billing-api
|
|
114
|
+
krickstart doctor
|
|
115
|
+
krickstart up
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 📦 Maintained Stacks
|
|
121
|
+
|
|
122
|
+
All maintained stacks feature health checks, volume persistence, and loopback security (`127.0.0.1` binding):
|
|
123
|
+
|
|
124
|
+
| Stack | Description | Included Services |
|
|
125
|
+
| :--- | :--- | :--- |
|
|
126
|
+
| `fastapi-postgres` | Python FastAPI REST API | FastAPI (Python 3.12), PostgreSQL 16 |
|
|
127
|
+
| `django-postgres` | Django Web Framework | Django (Python 3.12), PostgreSQL 16 |
|
|
128
|
+
| `flask-postgres` | Flask Microframework | Flask, PostgreSQL 16 |
|
|
129
|
+
| `node-postgres-redis` | Node.js Express API | Express (Node 22), PostgreSQL 16, Redis 7 |
|
|
130
|
+
| `nextjs-postgres` | Next.js App Router | Next.js, PostgreSQL 16 |
|
|
131
|
+
| `go-gin-postgres` | Go Gin REST API | Go Gin, PostgreSQL 16 |
|
|
132
|
+
| `spring-boot-postgres` | Java Spring Boot | Spring Boot (JDK 21), PostgreSQL 16 |
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 🛠️ CLI Command Reference
|
|
137
|
+
|
|
138
|
+
| Command | Description |
|
|
139
|
+
| :--- | :--- |
|
|
140
|
+
| `krickstart list` | Show all available stack templates and descriptions |
|
|
141
|
+
| `krickstart init <stack>` | Generate `krickstart.yaml` and starter files for a chosen stack |
|
|
142
|
+
| `krickstart create` | Interactive terminal wizard to pick and initialize a stack |
|
|
143
|
+
| `krickstart validate` | Validate schema and ensure stack plugin can render without errors |
|
|
144
|
+
| `krickstart doctor` | Health-check Docker, Compose v2, YAML syntax, and detect port conflicts |
|
|
145
|
+
| `krickstart doctor --fix` | Automatically repair missing safe assets (e.g., regenerate `.env.example`) |
|
|
146
|
+
| `krickstart up` | Render Compose files and start containers in detached mode |
|
|
147
|
+
| `krickstart up --dry-run` | Preview generated YAML and `.env` files without writing or starting Docker |
|
|
148
|
+
| `krickstart down` | Gracefully stop containers (preserves database volumes) |
|
|
149
|
+
| `krickstart status` | Display container runtime health and port mappings (`docker compose ps`) |
|
|
150
|
+
| `krickstart logs [service]` | View or follow service logs (`--follow` supported) |
|
|
151
|
+
| `krickstart export` | Export standalone `docker-compose.yml` and `.env` for production or CI |
|
|
152
|
+
| `krickstart cleanup` | Stop containers, remove named volumes, and clean up generated files |
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## 🔒 Security Best Practices
|
|
157
|
+
|
|
158
|
+
1. **Loopback Isolation (`127.0.0.1`)**: `krickstart` binds container ports to `127.0.0.1` by default rather than `0.0.0.0`, protecting databases and internal APIs from exposure on public Wi-Fi or local networks.
|
|
159
|
+
2. **Masked Examples**: Generated `.env.example` templates automatically redact credentials so teammates can safely commit environment templates to git without leaking passwords.
|
|
160
|
+
3. **Never Commit Generated Files**:
|
|
161
|
+
Add to your `.gitignore`:
|
|
162
|
+
```gitignore
|
|
163
|
+
docker-compose.krickstart.yml
|
|
164
|
+
.env.krickstart
|
|
165
|
+
.env
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## 🔌 Plugin System & Extensibility
|
|
171
|
+
|
|
172
|
+
`krickstart` provides an open plugin interface using Python entry points. Organizations can package internal corporate stacks and publish them as private or public packages.
|
|
173
|
+
|
|
174
|
+
Third-party packages expose plugins via the `krickstart.stacks` entry point group in `pyproject.toml`:
|
|
175
|
+
|
|
176
|
+
```toml
|
|
177
|
+
[project.entry-points."krickstart.stacks"]
|
|
178
|
+
company-microservice = "my_company_stacks.microservice:MicroservicePlugin"
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Plugins implement the `StackPlugin` interface (`name`, `description`, `default_config`, `compose_yaml`, `env_file`, `post_up_hints`). See [docs/plugin-authoring.md](docs/plugin-authoring.md) for complete details.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## 🤝 Contributing
|
|
186
|
+
|
|
187
|
+
We love contributions! Whether it's a new stack template, a bug fix, or documentation improvement, please check out our [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
|
|
188
|
+
|
|
189
|
+
**Ways to help:**
|
|
190
|
+
- 🌟 **Star the repo** to show your support.
|
|
191
|
+
- 🐛 **Report bugs** or request features in the Issues tab.
|
|
192
|
+
- 🛠️ **Build a plugin** and share your custom stack with the community.
|
|
193
|
+
- 📝 **Improve docs** to help other developers get started faster.
|
|
194
|
+
|
|
195
|
+
## 📖 Guides
|
|
196
|
+
For detailed instructions, explore our documentation:
|
|
197
|
+
- [🚀 Getting Started](./docs/getting-started.md) - From installation to your first stack.
|
|
198
|
+
- [🛠️ Custom Stacks](./docs/custom-stacks.md) - How to extend devspeed with your own templates.
|
|
199
|
+
- [🔍 Troubleshooting](./docs/troubleshooting.md) - Solving common Docker and config issues.
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
# Run local test suite and quality gates:
|
|
204
|
+
python scripts/dev.py check
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## 📄 License
|
|
208
|
+
|
|
209
|
+
This project is licensed under the [MIT License](LICENSE).
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""Legacy compatibility package alias for Slipway."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import warnings
|
|
6
|
+
|
|
7
|
+
from slipway import PLUGIN_API_VERSION, StackPlugin, __version__
|
|
8
|
+
|
|
9
|
+
warnings.warn(
|
|
10
|
+
"'devspeed' has been renamed to 'slipway'. Please update imports to 'slipway'.",
|
|
11
|
+
DeprecationWarning,
|
|
12
|
+
stacklevel=2,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
__all__ = ["PLUGIN_API_VERSION", "StackPlugin", "__version__"]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Backward-compatibility aliases for devspeed.cli."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from slipway.cli import (
|
|
6
|
+
GENERATED_COMPOSE,
|
|
7
|
+
GENERATED_ENV,
|
|
8
|
+
GENERATED_ENV_EXAMPLE,
|
|
9
|
+
build_parser,
|
|
10
|
+
deprecated_alias_main,
|
|
11
|
+
)
|
|
12
|
+
from slipway.cli import deprecated_alias_main as main
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"GENERATED_COMPOSE",
|
|
16
|
+
"GENERATED_ENV",
|
|
17
|
+
"GENERATED_ENV_EXAMPLE",
|
|
18
|
+
"build_parser",
|
|
19
|
+
"deprecated_alias_main",
|
|
20
|
+
"main",
|
|
21
|
+
]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Backward-compatibility aliases for devspeed.config."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from slipway.config import (
|
|
6
|
+
CONFIG_FILENAME,
|
|
7
|
+
LEGACY_CONFIG_FILENAME,
|
|
8
|
+
DevspeedConfig,
|
|
9
|
+
LifecycleConfig,
|
|
10
|
+
ServiceConfig,
|
|
11
|
+
SlipwayConfig,
|
|
12
|
+
config_path,
|
|
13
|
+
load_config,
|
|
14
|
+
save_config,
|
|
15
|
+
validate_config,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
__all__ = [
|
|
19
|
+
"CONFIG_FILENAME",
|
|
20
|
+
"LEGACY_CONFIG_FILENAME",
|
|
21
|
+
"DevspeedConfig",
|
|
22
|
+
"LifecycleConfig",
|
|
23
|
+
"ServiceConfig",
|
|
24
|
+
"SlipwayConfig",
|
|
25
|
+
"config_path",
|
|
26
|
+
"load_config",
|
|
27
|
+
"save_config",
|
|
28
|
+
"validate_config",
|
|
29
|
+
]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Core generation services for DevSpeed (legacy alias)."""
|
|
2
|
+
|
|
3
|
+
from slipway.core.compose_generator import (
|
|
4
|
+
DEFAULT_COMPOSE_FILENAME,
|
|
5
|
+
DEFAULT_ENV_FILENAME,
|
|
6
|
+
ComposeGenerationError,
|
|
7
|
+
ComposeGenerator,
|
|
8
|
+
ConfigValidationError,
|
|
9
|
+
GeneratedArtifacts,
|
|
10
|
+
GeneratorSettings,
|
|
11
|
+
OutputFileExistsError,
|
|
12
|
+
PluginResolutionError,
|
|
13
|
+
PortConflictError,
|
|
14
|
+
WriteResult,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
"DEFAULT_COMPOSE_FILENAME",
|
|
19
|
+
"DEFAULT_ENV_FILENAME",
|
|
20
|
+
"ComposeGenerationError",
|
|
21
|
+
"ComposeGenerator",
|
|
22
|
+
"ConfigValidationError",
|
|
23
|
+
"GeneratedArtifacts",
|
|
24
|
+
"GeneratorSettings",
|
|
25
|
+
"OutputFileExistsError",
|
|
26
|
+
"PluginResolutionError",
|
|
27
|
+
"PortConflictError",
|
|
28
|
+
"WriteResult",
|
|
29
|
+
]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Backward-compatibility aliases for devspeed.errors."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from slipway.errors import (
|
|
6
|
+
CommandFailedError,
|
|
7
|
+
ComposeNotFoundError,
|
|
8
|
+
ConfigNotFoundError,
|
|
9
|
+
ConfigValidationError,
|
|
10
|
+
DevspeedError,
|
|
11
|
+
DockerNotFoundError,
|
|
12
|
+
DockerNotRunningError,
|
|
13
|
+
PortConflictError,
|
|
14
|
+
SlipwayError,
|
|
15
|
+
UnknownStackError,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
__all__ = [
|
|
19
|
+
"CommandFailedError",
|
|
20
|
+
"ComposeNotFoundError",
|
|
21
|
+
"ConfigNotFoundError",
|
|
22
|
+
"ConfigValidationError",
|
|
23
|
+
"DevspeedError",
|
|
24
|
+
"DockerNotFoundError",
|
|
25
|
+
"DockerNotRunningError",
|
|
26
|
+
"PortConflictError",
|
|
27
|
+
"SlipwayError",
|
|
28
|
+
"UnknownStackError",
|
|
29
|
+
]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Backward-compatibility aliases for devspeed.plugin."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from slipway.plugin import (
|
|
6
|
+
ENTRY_POINT_GROUP,
|
|
7
|
+
PLUGIN_API_VERSION,
|
|
8
|
+
PluginError,
|
|
9
|
+
PluginRegistry,
|
|
10
|
+
StackPlugin,
|
|
11
|
+
builtin_registry,
|
|
12
|
+
discover_pypi_stack_packages,
|
|
13
|
+
pypi_package_metadata,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"ENTRY_POINT_GROUP",
|
|
18
|
+
"PLUGIN_API_VERSION",
|
|
19
|
+
"PluginError",
|
|
20
|
+
"PluginRegistry",
|
|
21
|
+
"StackPlugin",
|
|
22
|
+
"builtin_registry",
|
|
23
|
+
"discover_pypi_stack_packages",
|
|
24
|
+
"pypi_package_metadata",
|
|
25
|
+
]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Public plugin API for DevSpeed."""
|
|
2
|
+
|
|
3
|
+
from devspeed.plugins.base import PLUGIN_API_VERSION, PluginError, StackPlugin
|
|
4
|
+
from devspeed.plugins.registry import (
|
|
5
|
+
ENTRY_POINT_GROUP,
|
|
6
|
+
PluginRegistry,
|
|
7
|
+
builtin_registry,
|
|
8
|
+
discover_pypi_stack_packages,
|
|
9
|
+
pypi_package_metadata,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"ENTRY_POINT_GROUP",
|
|
14
|
+
"PLUGIN_API_VERSION",
|
|
15
|
+
"PluginError",
|
|
16
|
+
"PluginRegistry",
|
|
17
|
+
"StackPlugin",
|
|
18
|
+
"builtin_registry",
|
|
19
|
+
"discover_pypi_stack_packages",
|
|
20
|
+
"pypi_package_metadata",
|
|
21
|
+
]
|