devcreate 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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ankit Sharma
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,32 @@
1
+ Metadata-Version: 2.4
2
+ Name: devcreate
3
+ Version: 0.1.0
4
+ Summary: Auto-generate Docker, K8s, and CI configs
5
+ Author: Ankit Sharma
6
+ Requires-Python: >=3.8
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Dynamic: license-file
10
+
11
+ # DevAutoGen
12
+
13
+ Auto-generates:
14
+ - Dockerfile
15
+ - docker-compose.yml
16
+ - Kubernetes deployment & service
17
+ - GitHub Actions CI
18
+
19
+ ## Usage
20
+ Copy this project directory to your main project directory:
21
+ Run
22
+
23
+ ```bash
24
+ python main.py
25
+ ```
26
+ You have to manually modify the files generated for you projects requirements to deploy, these files only are the templates.
27
+
28
+ # V0.1
29
+ The following languages support added for file generation:
30
+ - C
31
+ - C++
32
+ - Java
@@ -0,0 +1,22 @@
1
+ # DevAutoGen
2
+
3
+ Auto-generates:
4
+ - Dockerfile
5
+ - docker-compose.yml
6
+ - Kubernetes deployment & service
7
+ - GitHub Actions CI
8
+
9
+ ## Usage
10
+ Copy this project directory to your main project directory:
11
+ Run
12
+
13
+ ```bash
14
+ python main.py
15
+ ```
16
+ You have to manually modify the files generated for you projects requirements to deploy, these files only are the templates.
17
+
18
+ # V0.1
19
+ The following languages support added for file generation:
20
+ - C
21
+ - C++
22
+ - Java
@@ -0,0 +1,12 @@
1
+ [project]
2
+ name = "devcreate"
3
+ version = "0.1.0"
4
+ description = "Auto-generate Docker, K8s, and CI configs"
5
+ authors = [
6
+ {name = "Ankit Sharma"}
7
+ ]
8
+ readme = "README.md"
9
+ requires-python = ">=3.8"
10
+
11
+ [project.scripts]
12
+ devcreate = "DevCreate.main:main"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ # DevCreate Package
@@ -0,0 +1,18 @@
1
+ import os
2
+
3
+ def detect_project():
4
+ if os.path.exists("package.json"):
5
+ return "node"
6
+ elif os.path.exists("requirements.txt"):
7
+ return "python"
8
+ elif os.path.exists("composer.json"):
9
+ return "php"
10
+ elif os.path.exists("go.mod"):
11
+ return "go"
12
+ elif any(f.endswith(".c") for f in os.listdir(".")):
13
+ return "c"
14
+ elif any(f.endswith(".cpp") for f in os.listdir(".")):
15
+ return "cpp"
16
+ elif os.path.exists("pom.xml") or any(f.endswith(".java") for f in os.listdir(".")):
17
+ return "java"
18
+ return None
@@ -0,0 +1,32 @@
1
+ Metadata-Version: 2.4
2
+ Name: devcreate
3
+ Version: 0.1.0
4
+ Summary: Auto-generate Docker, K8s, and CI configs
5
+ Author: Ankit Sharma
6
+ Requires-Python: >=3.8
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Dynamic: license-file
10
+
11
+ # DevAutoGen
12
+
13
+ Auto-generates:
14
+ - Dockerfile
15
+ - docker-compose.yml
16
+ - Kubernetes deployment & service
17
+ - GitHub Actions CI
18
+
19
+ ## Usage
20
+ Copy this project directory to your main project directory:
21
+ Run
22
+
23
+ ```bash
24
+ python main.py
25
+ ```
26
+ You have to manually modify the files generated for you projects requirements to deploy, these files only are the templates.
27
+
28
+ # V0.1
29
+ The following languages support added for file generation:
30
+ - C
31
+ - C++
32
+ - Java
@@ -0,0 +1,12 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/__init__.py
5
+ src/detector.py
6
+ src/generator.py
7
+ src/main.py
8
+ src/devcreate.egg-info/PKG-INFO
9
+ src/devcreate.egg-info/SOURCES.txt
10
+ src/devcreate.egg-info/dependency_links.txt
11
+ src/devcreate.egg-info/entry_points.txt
12
+ src/devcreate.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ devcreate = DevCreate.main:main
@@ -0,0 +1,4 @@
1
+ __init__
2
+ detector
3
+ generator
4
+ main
@@ -0,0 +1,97 @@
1
+ import os
2
+
3
+ def write_file(filename, content):
4
+ os.makedirs(os.path.dirname(filename), exist_ok=True) if "/" in filename else None
5
+ with open(filename, "w") as f:
6
+ f.write(content)
7
+
8
+ def generate_all(project_type):
9
+ port = "8080"
10
+
11
+ if project_type == "node":
12
+ port = "3000"
13
+ base = "node:18"
14
+ run_cmd = '["npm","start"]'
15
+ elif project_type == "python":
16
+ port = "8000"
17
+ base = "python:3.10-slim"
18
+ run_cmd = '["python","app.py"]'
19
+ elif project_type == "java":
20
+ base = "openjdk:17"
21
+ run_cmd = '["java","-jar","app.jar"]'
22
+ elif project_type in ["c","cpp"]:
23
+ base = "gcc:latest"
24
+ run_cmd = '["./app"]'
25
+ else:
26
+ base = "alpine"
27
+ run_cmd = '["sh"]'
28
+
29
+ dockerfile = f"""FROM {base}
30
+ WORKDIR /app
31
+ COPY . .
32
+ RUN if [ -f requirements.txt ]; then pip install -r requirements.txt; fi || true
33
+ RUN if [ -f package.json ]; then npm install; fi || true
34
+ RUN if ls *.c 1> /dev/null 2>&1; then gcc *.c -o app; fi || true
35
+ RUN if ls *.cpp 1> /dev/null 2>&1; then g++ *.cpp -o app; fi || true
36
+ EXPOSE {port}
37
+ CMD {run_cmd}
38
+ """
39
+
40
+ compose = f"""version: '3'
41
+ services:
42
+ app:
43
+ build: .
44
+ ports:
45
+ - "{port}:{port}"
46
+ """
47
+
48
+ deployment = f"""apiVersion: apps/v1
49
+ kind: Deployment
50
+ metadata:
51
+ name: app-deployment
52
+ spec:
53
+ replicas: 2
54
+ selector:
55
+ matchLabels:
56
+ app: myapp
57
+ template:
58
+ metadata:
59
+ labels:
60
+ app: myapp
61
+ spec:
62
+ containers:
63
+ - name: app
64
+ image: myapp:latest
65
+ ports:
66
+ - containerPort: {port}
67
+ """
68
+
69
+ service = f"""apiVersion: v1
70
+ kind: Service
71
+ metadata:
72
+ name: app-service
73
+ spec:
74
+ type: NodePort
75
+ selector:
76
+ app: myapp
77
+ ports:
78
+ - port: 80
79
+ targetPort: {port}
80
+ """
81
+
82
+ github = """name: CI
83
+ on: [push]
84
+ jobs:
85
+ build:
86
+ runs-on: ubuntu-latest
87
+ steps:
88
+ - uses: actions/checkout@v3
89
+ - name: Build Docker Image
90
+ run: docker build -t myapp .
91
+ """
92
+
93
+ write_file("Dockerfile", dockerfile)
94
+ write_file("docker-compose.yml", compose)
95
+ write_file("deployment.yaml", deployment)
96
+ write_file("service.yaml", service)
97
+ write_file(".github/workflows/ci.yml", github)
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ from src.detector import detect_project
4
+ from src.generator import generate_all
5
+
6
+ def main():
7
+ print("🔍 Scanning project...")
8
+ project_type = detect_project()
9
+
10
+ if not project_type:
11
+ print("❌ Could not detect project type.")
12
+ return
13
+
14
+ print(f"✅ Detected project type: {project_type}")
15
+ generate_all(project_type)
16
+ print("🚀 Files generated successfully!")
17
+
18
+ if __name__ == "__main__":
19
+ main()