@dawitworku/projectcli 0.1.0 → 0.1.2

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.
package/src/registry.js CHANGED
@@ -94,6 +94,36 @@ const REGISTRY = {
94
94
  },
95
95
  notes: "Vite + Svelte (JS)",
96
96
  },
97
+ "Vite (Preact)": {
98
+ id: "js.vite.preact",
99
+ label: "Vite (Preact)",
100
+ commands: (ctx) => {
101
+ const projectName = getProjectName(ctx);
102
+ const pm = getPackageManager(ctx);
103
+ return [
104
+ pmExec(pm, "create-vite@latest", [
105
+ projectName,
106
+ "--template",
107
+ "preact",
108
+ ]),
109
+ pmInstall(pm, { cwdFromProjectRoot: true }),
110
+ ];
111
+ },
112
+ notes: "Vite + Preact (JS)",
113
+ },
114
+ "Vite (Lit)": {
115
+ id: "js.vite.lit",
116
+ label: "Vite (Lit)",
117
+ commands: (ctx) => {
118
+ const projectName = getProjectName(ctx);
119
+ const pm = getPackageManager(ctx);
120
+ return [
121
+ pmExec(pm, "create-vite@latest", [projectName, "--template", "lit"]),
122
+ pmInstall(pm, { cwdFromProjectRoot: true }),
123
+ ];
124
+ },
125
+ notes: "Vite + Lit (JS)",
126
+ },
97
127
  "Next.js": {
98
128
  id: "js.nextjs",
99
129
  label: "Next.js",
@@ -110,7 +140,6 @@ const REGISTRY = {
110
140
  commands: (ctx) => {
111
141
  const projectName = getProjectName(ctx);
112
142
  const pm = getPackageManager(ctx);
113
- // Astro docs recommend npm/pnpm/yarn create astro@latest; using the underlying package works too.
114
143
  return [pmExec(pm, "create-astro@latest", [projectName])];
115
144
  },
116
145
  notes: "Astro site (wizard)",
@@ -148,6 +177,63 @@ const REGISTRY = {
148
177
  },
149
178
  notes: "Nuxt via nuxi init",
150
179
  },
180
+ "Express (Generator)": {
181
+ id: "js.express",
182
+ label: "Express",
183
+ commands: (ctx) => {
184
+ const projectName = getProjectName(ctx);
185
+ const pm = getPackageManager(ctx);
186
+ return [
187
+ pmExec(pm, "express-generator", [projectName]),
188
+ pmInstall(pm, { cwdFromProjectRoot: true }),
189
+ ];
190
+ },
191
+ notes: "Scaffolds basic Express app",
192
+ },
193
+ "Fastify (CLI)": {
194
+ id: "js.fastify",
195
+ label: "Fastify",
196
+ commands: (ctx) => {
197
+ const projectName = getProjectName(ctx);
198
+ const pm = getPackageManager(ctx);
199
+ return [
200
+ pmExec(pm, "fastify-cli", ["generate", projectName]),
201
+ pmInstall(pm, { cwdFromProjectRoot: true }),
202
+ ];
203
+ },
204
+ notes: "Scaffolds Fastify app",
205
+ },
206
+ "React Native (Expo)": {
207
+ id: "js.expo",
208
+ label: "React Native (Expo)",
209
+ commands: (ctx) => {
210
+ const projectName = getProjectName(ctx);
211
+ const pm = getPackageManager(ctx);
212
+ // create-expo-app
213
+ return [pmExec(pm, "create-expo-app@latest", [projectName])];
214
+ },
215
+ notes: "Expo for React Native",
216
+ },
217
+ "Electron (Forge)": {
218
+ id: "js.electron",
219
+ label: "Electron (Forge)",
220
+ commands: (ctx) => {
221
+ const projectName = getProjectName(ctx);
222
+ const pm = getPackageManager(ctx);
223
+ return [pmExec(pm, "create-electron-app@latest", [projectName])];
224
+ },
225
+ notes: "Electron Forge template",
226
+ },
227
+ "Qwik City": {
228
+ id: "js.qwik",
229
+ label: "Qwik City",
230
+ commands: (ctx) => {
231
+ const projectName = getProjectName(ctx);
232
+ const pm = getPackageManager(ctx);
233
+ return [pmExec(pm, "create-qwik@latest", ["basic", projectName])];
234
+ },
235
+ notes: "Qwik framework",
236
+ },
151
237
  "Node.js (basic)": {
152
238
  id: "js.node.basic",
153
239
  label: "Node.js (basic)",
@@ -388,6 +474,29 @@ const REGISTRY = {
388
474
  ],
389
475
  notes: "Writes files only (no pip install).",
390
476
  },
477
+ Pyramid: {
478
+ id: "py.pyramid",
479
+ label: "Pyramid",
480
+ commands: (ctx) => {
481
+ const projectName = getProjectName(ctx);
482
+ return [
483
+ // Pyramid cookiecutter is common, but basic scaffold:
484
+ { type: "mkdir", path: "." },
485
+ {
486
+ type: "writeFile",
487
+ path: "requirements.txt",
488
+ content: "pyramid\nwaitress\n",
489
+ },
490
+ {
491
+ type: "writeFile",
492
+ path: "app.py",
493
+ content:
494
+ "from wsgiref.simple_server import make_server\nfrom pyramid.config import Configurator\nfrom pyramid.response import Response\n\ndef hello_world(request):\n return Response('Hello World!')\n\nif __name__ == '__main__':\n with Configurator() as config:\n config.add_route('hello', '/')\n config.add_view(hello_world, route_name='hello')\n app = config.make_wsgi_app()\n server = make_server('0.0.0.0', 6543, app)\n server.serve_forever()\n",
495
+ },
496
+ ];
497
+ },
498
+ notes: "Pyramid basic app",
499
+ },
391
500
  },
392
501
 
393
502
  Rust: {
@@ -419,6 +528,35 @@ const REGISTRY = {
419
528
  },
420
529
  notes: "Uses cargo new --lib",
421
530
  },
531
+ "Tauri (App)": {
532
+ id: "rs.tauri",
533
+ label: "Tauri (App)",
534
+ commands: (ctx) => {
535
+ const projectName = getProjectName(ctx);
536
+ const pm = getPackageManager(ctx); // usually npm for tauri frontend
537
+ // Using create-tauri-app via pmExec
538
+ // cargo create-tauri-app is also an option but node way is common if JS frontend
539
+ return [pmExec(pm, "create-tauri-app@latest", [projectName])];
540
+ },
541
+ notes: "Cross-platform desktop app",
542
+ },
543
+ "Leptos (CSR)": {
544
+ id: "rs.leptos",
545
+ label: "Leptos (CSR)",
546
+ commands: (ctx) => {
547
+ const projectName = getProjectName(ctx);
548
+ return [
549
+ {
550
+ program: "cargo",
551
+ args: ["init", "--name", projectName],
552
+ cwdFromProjectRoot: true,
553
+ },
554
+ // In reality, one would use cargo-leptos or a template.
555
+ // Just a stub for now.
556
+ ];
557
+ },
558
+ notes: "Init basic Rust project (Leptos needs template usually)",
559
+ },
422
560
  },
423
561
 
424
562
  Go: {
@@ -459,6 +597,92 @@ const REGISTRY = {
459
597
  },
460
598
  notes: "Writes main.go + runs go mod init",
461
599
  },
600
+ "Buffalo (Web)": {
601
+ id: "go.buffalo",
602
+ label: "Buffalo (Web)",
603
+ commands: (ctx) => {
604
+ const projectName = getProjectName(ctx);
605
+ return [
606
+ {
607
+ program: "buffalo",
608
+ args: ["new", projectName],
609
+ },
610
+ ];
611
+ },
612
+ notes: "Requires 'buffalo' CLI installed",
613
+ },
614
+ "Fiber (Skeleton)": {
615
+ id: "go.fiber",
616
+ label: "Fiber (Skeleton)",
617
+ commands: (_ctx) => [
618
+ { type: "mkdir", path: "." },
619
+ {
620
+ type: "writeFile",
621
+ path: "main.go",
622
+ content: `package main
623
+
624
+ import "github.com/gofiber/fiber/v2"
625
+
626
+ func main() {
627
+ app := fiber.New()
628
+
629
+ app.Get("/", func(c *fiber.Ctx) error {
630
+ return c.SendString("Hello, World!")
631
+ })
632
+
633
+ app.Listen(":3000")
634
+ }
635
+ `,
636
+ },
637
+ {
638
+ program: "go",
639
+ args: ["mod", "init", "fiber-app"],
640
+ cwdFromProjectRoot: true,
641
+ },
642
+ {
643
+ program: "go",
644
+ args: ["get", "github.com/gofiber/fiber/v2"],
645
+ cwdFromProjectRoot: true,
646
+ },
647
+ ],
648
+ notes: "Basic Fiber setup",
649
+ },
650
+ },
651
+
652
+ "C++": {
653
+ "CMake (Basic)": {
654
+ id: "cpp.cmake",
655
+ label: "CMake (Basic)",
656
+ commands: (ctx) => {
657
+ const projectName = getProjectName(ctx);
658
+ return [
659
+ { type: "mkdir", path: "src" },
660
+ {
661
+ type: "writeFile",
662
+ path: "CMakeLists.txt",
663
+ content: `cmake_minimum_required(VERSION 3.10)
664
+ project(${projectName})
665
+
666
+ set(CMAKE_CXX_STANDARD 17)
667
+
668
+ add_executable(${projectName} src/main.cpp)
669
+ `,
670
+ },
671
+ {
672
+ type: "writeFile",
673
+ path: "src/main.cpp",
674
+ content: `#include <iostream>
675
+
676
+ int main() {
677
+ std::cout << "Hello, World!" << std::endl;
678
+ return 0;
679
+ }
680
+ `,
681
+ },
682
+ ];
683
+ },
684
+ notes: "Standard CMake structure",
685
+ },
462
686
  },
463
687
 
464
688
  "C#": {
@@ -491,6 +715,180 @@ const REGISTRY = {
491
715
  notes: "Requires dotnet SDK",
492
716
  },
493
717
  },
718
+
719
+ Ruby: {
720
+ Rails: {
721
+ id: "rb.rails",
722
+ label: "Rails",
723
+ commands: (ctx) => {
724
+ const projectName = getProjectName(ctx);
725
+ return [
726
+ {
727
+ program: "rails",
728
+ args: ["new", projectName],
729
+ },
730
+ ];
731
+ },
732
+ notes: "Requires rails gem installed",
733
+ },
734
+ "Bundler (gem)": {
735
+ id: "rb.bundler",
736
+ label: "Bundler (new gem)",
737
+ commands: (ctx) => {
738
+ const projectName = getProjectName(ctx);
739
+ return [
740
+ {
741
+ program: "bundle",
742
+ args: ["gem", projectName],
743
+ },
744
+ ];
745
+ },
746
+ notes: "Creates a new gem with bundler",
747
+ },
748
+ },
749
+
750
+ PHP: {
751
+ Laravel: {
752
+ id: "php.laravel",
753
+ label: "Laravel",
754
+ commands: (ctx) => {
755
+ const projectName = getProjectName(ctx);
756
+ return [
757
+ {
758
+ program: "composer",
759
+ args: ["create-project", "laravel/laravel", projectName],
760
+ },
761
+ ];
762
+ },
763
+ notes: "Uses composer create-project",
764
+ },
765
+ Symfony: {
766
+ id: "php.symfony",
767
+ label: "Symfony",
768
+ commands: (ctx) => {
769
+ const projectName = getProjectName(ctx);
770
+ return [
771
+ {
772
+ program: "composer",
773
+ args: ["create-project", "symfony/skeleton", projectName],
774
+ },
775
+ ];
776
+ },
777
+ notes: "Uses composer create-project",
778
+ },
779
+ },
780
+
781
+ "Java/Kotlin": {
782
+ "Spring Boot (Maven)": {
783
+ id: "java.springboot.maven",
784
+ label: "Spring Boot (Maven)",
785
+ commands: (ctx) => {
786
+ // Simple archetype or just hints. Spring Init is complex.
787
+ // Let's use maven quickstart for now as basic.
788
+ const projectName = getProjectName(ctx);
789
+ return [
790
+ {
791
+ program: "mvn",
792
+ args: [
793
+ "archetype:generate",
794
+ "-DgroupId=com.example",
795
+ `-DartifactId=${projectName}`,
796
+ "-DarchetypeArtifactId=maven-archetype-quickstart",
797
+ "-DinteractiveMode=false",
798
+ ],
799
+ },
800
+ ];
801
+ },
802
+ notes: "Basic Maven Quickstart",
803
+ },
804
+ "Gradle (Basic)": {
805
+ id: "java.gradle.basic",
806
+ label: "Gradle (Basic)",
807
+ commands: (ctx) => {
808
+ const projectName = getProjectName(ctx);
809
+ return [
810
+ { type: "mkdir", path: projectName },
811
+ {
812
+ program: "gradle",
813
+ args: [
814
+ "init",
815
+ "--type",
816
+ "basic",
817
+ "--dsl",
818
+ "kotlin",
819
+ "--project-name",
820
+ projectName,
821
+ ],
822
+ cwd: projectName, // This property needs to be supported in runSteps, handled via chdir logic usually?
823
+ // current runSteps implementation supports cwdFromProjectRoot but not arbitrary cwd change easily maybe?
824
+ // runSteps implementation check:
825
+ // It uses `cwdFromProjectRoot` or defaults to current process.cwd().
826
+ // Better to just run gradle init inside the folder.
827
+ },
828
+ ];
829
+ },
830
+ notes: "Gradle init",
831
+ },
832
+ Quarkus: {
833
+ id: "java.quarkus",
834
+ label: "Quarkus",
835
+ commands: (ctx) => {
836
+ const projectName = getProjectName(ctx);
837
+ return [
838
+ {
839
+ program: "mvn",
840
+ args: [
841
+ "io.quarkus.platform:quarkus-maven-plugin:create",
842
+ `-DprojectGroupId=org.acme`,
843
+ `-DprojectArtifactId=${projectName}`,
844
+ ],
845
+ },
846
+ ];
847
+ },
848
+ notes: "Quarkus app (Maven)",
849
+ },
850
+ },
851
+
852
+ Others: {
853
+ "HTML/CSS": {
854
+ id: "other.html",
855
+ label: "HTML/CSS (Vanilla)",
856
+ commands: (ctx) => {
857
+ return [
858
+ { type: "mkdir", path: "." },
859
+ {
860
+ type: "writeFile",
861
+ path: "index.html",
862
+ content:
863
+ '<!DOCTYPE html>\\n<html lang="en">\\n<head>\\n <meta charset="UTF-8">\\n <title>My App</title>\\n</head>\\n<body>\\n <h1>Hello World</h1>\\n</body>\\n</html>',
864
+ },
865
+ {
866
+ type: "writeFile",
867
+ path: "style.css",
868
+ content: "body { font-family: sans-serif; }",
869
+ },
870
+ ];
871
+ },
872
+ notes: "Just static files",
873
+ },
874
+ },
875
+
876
+ Dart: {
877
+ "Console Application": {
878
+ id: "dart.console",
879
+ label: "Console Application",
880
+ commands: (ctx) => {
881
+ const projectName = getProjectName(ctx);
882
+ return [
883
+ {
884
+ program: "dart",
885
+ args: ["create", "-t", "console", projectName],
886
+ },
887
+ ];
888
+ },
889
+ notes: "Requires Dart SDK",
890
+ },
891
+ },
494
892
  };
495
893
 
496
894
  function getLanguages() {