@stackweld/cli 0.2.2 → 0.2.4
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/LICENSE +21 -0
- package/dist/commands/completion.js +49 -8
- package/dist/commands/init.d.ts +2 -1
- package/dist/commands/init.js +424 -75
- package/dist/index.js +415 -181
- package/package.json +23 -15
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Orlando Fernandez / XPlus Technologies LLC
|
|
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.
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
* stackweld completion — Generate shell completions.
|
|
3
3
|
*/
|
|
4
4
|
import { Command } from "commander";
|
|
5
|
+
const ALL_COMMANDS = "init create generate list info save delete clone export import import-url share compare browse doctor up down status logs scaffold template config completion ai score analyze env preview health migrate learn deploy lint benchmark cost plugin version";
|
|
5
6
|
const BASH_COMPLETION = `
|
|
6
7
|
# stackweld bash completion
|
|
7
8
|
_stackweld_completions() {
|
|
8
9
|
local cur="\${COMP_WORDS[COMP_CWORD]}"
|
|
9
|
-
local commands="
|
|
10
|
+
local commands="${ALL_COMMANDS}"
|
|
10
11
|
|
|
11
12
|
if [ "\${COMP_CWORD}" -eq 1 ]; then
|
|
12
13
|
COMPREPLY=( $(compgen -W "\${commands}" -- "\${cur}") )
|
|
@@ -20,23 +21,43 @@ const ZSH_COMPLETION = `
|
|
|
20
21
|
_stackweld() {
|
|
21
22
|
local -a commands
|
|
22
23
|
commands=(
|
|
23
|
-
'init:Create a new
|
|
24
|
+
'init:Create a new project interactively'
|
|
24
25
|
'create:Scaffold a project from a stack or template'
|
|
26
|
+
'generate:Create a fully scaffolded project'
|
|
25
27
|
'list:List all saved stacks'
|
|
26
28
|
'info:Show details about a stack or technology'
|
|
27
29
|
'save:Save a version snapshot of a stack'
|
|
30
|
+
'delete:Delete a saved stack'
|
|
31
|
+
'clone:Duplicate a saved stack'
|
|
28
32
|
'export:Export a stack definition to YAML or JSON'
|
|
29
33
|
'import:Import a stack definition from a file'
|
|
34
|
+
'import-url:Import a stack from a share URL'
|
|
35
|
+
'share:Generate a shareable URL for a stack'
|
|
36
|
+
'compare:Compare two saved stacks'
|
|
30
37
|
'browse:Browse the technology catalog and templates'
|
|
31
38
|
'doctor:Check system requirements and environment'
|
|
32
|
-
'delete:Delete a saved stack'
|
|
33
|
-
'version:Manage stack versions'
|
|
34
39
|
'up:Start Docker services'
|
|
35
40
|
'down:Stop Docker services'
|
|
36
41
|
'status:Show status of running services'
|
|
37
42
|
'logs:Show logs from Docker services'
|
|
38
43
|
'scaffold:Generate project files from a stack'
|
|
44
|
+
'template:Manage templates'
|
|
45
|
+
'config:Manage user preferences'
|
|
39
46
|
'completion:Generate shell completions'
|
|
47
|
+
'ai:AI-powered stack recommendations'
|
|
48
|
+
'score:Show compatibility score between technologies'
|
|
49
|
+
'analyze:Detect the technology stack of a project'
|
|
50
|
+
'env:Sync .env files and check for dangerous values'
|
|
51
|
+
'preview:Preview docker-compose.yml for a stack'
|
|
52
|
+
'health:Check project health and best practices'
|
|
53
|
+
'migrate:Generate a migration plan between technologies'
|
|
54
|
+
'learn:Show learning resources for a technology'
|
|
55
|
+
'deploy:Generate infrastructure-as-code files'
|
|
56
|
+
'lint:Validate a stack against team standards'
|
|
57
|
+
'benchmark:Show performance profile for a stack'
|
|
58
|
+
'cost:Estimate monthly hosting costs for a stack'
|
|
59
|
+
'plugin:Manage Stackweld plugins'
|
|
60
|
+
'version:Manage stack versions'
|
|
40
61
|
)
|
|
41
62
|
|
|
42
63
|
_describe 'command' commands
|
|
@@ -46,23 +67,43 @@ _stackweld
|
|
|
46
67
|
`.trim();
|
|
47
68
|
const FISH_COMPLETION = `
|
|
48
69
|
# stackweld fish completions
|
|
49
|
-
complete -c stackweld -n "__fish_use_subcommand" -a init -d "Create a new
|
|
50
|
-
complete -c stackweld -n "__fish_use_subcommand" -a create -d "Scaffold a project"
|
|
70
|
+
complete -c stackweld -n "__fish_use_subcommand" -a init -d "Create a new project interactively"
|
|
71
|
+
complete -c stackweld -n "__fish_use_subcommand" -a create -d "Scaffold a project from a stack or template"
|
|
72
|
+
complete -c stackweld -n "__fish_use_subcommand" -a generate -d "Create a fully scaffolded project"
|
|
51
73
|
complete -c stackweld -n "__fish_use_subcommand" -a list -d "List all saved stacks"
|
|
52
74
|
complete -c stackweld -n "__fish_use_subcommand" -a info -d "Show details about a stack or technology"
|
|
53
75
|
complete -c stackweld -n "__fish_use_subcommand" -a save -d "Save a version snapshot"
|
|
76
|
+
complete -c stackweld -n "__fish_use_subcommand" -a delete -d "Delete a saved stack"
|
|
77
|
+
complete -c stackweld -n "__fish_use_subcommand" -a clone -d "Duplicate a saved stack"
|
|
54
78
|
complete -c stackweld -n "__fish_use_subcommand" -a export -d "Export a stack definition"
|
|
55
79
|
complete -c stackweld -n "__fish_use_subcommand" -a import -d "Import a stack definition"
|
|
80
|
+
complete -c stackweld -n "__fish_use_subcommand" -a import-url -d "Import from a share URL"
|
|
81
|
+
complete -c stackweld -n "__fish_use_subcommand" -a share -d "Share a stack via URL"
|
|
82
|
+
complete -c stackweld -n "__fish_use_subcommand" -a compare -d "Compare two stacks"
|
|
56
83
|
complete -c stackweld -n "__fish_use_subcommand" -a browse -d "Browse the technology catalog"
|
|
57
84
|
complete -c stackweld -n "__fish_use_subcommand" -a doctor -d "Check system requirements"
|
|
58
|
-
complete -c stackweld -n "__fish_use_subcommand" -a delete -d "Delete a saved stack"
|
|
59
|
-
complete -c stackweld -n "__fish_use_subcommand" -a version -d "Manage stack versions"
|
|
60
85
|
complete -c stackweld -n "__fish_use_subcommand" -a up -d "Start Docker services"
|
|
61
86
|
complete -c stackweld -n "__fish_use_subcommand" -a down -d "Stop Docker services"
|
|
62
87
|
complete -c stackweld -n "__fish_use_subcommand" -a status -d "Show status of running services"
|
|
63
88
|
complete -c stackweld -n "__fish_use_subcommand" -a logs -d "Show logs from Docker services"
|
|
64
89
|
complete -c stackweld -n "__fish_use_subcommand" -a scaffold -d "Generate project files"
|
|
90
|
+
complete -c stackweld -n "__fish_use_subcommand" -a template -d "Manage templates"
|
|
91
|
+
complete -c stackweld -n "__fish_use_subcommand" -a config -d "Manage user preferences"
|
|
65
92
|
complete -c stackweld -n "__fish_use_subcommand" -a completion -d "Generate shell completions"
|
|
93
|
+
complete -c stackweld -n "__fish_use_subcommand" -a ai -d "AI-powered stack recommendations"
|
|
94
|
+
complete -c stackweld -n "__fish_use_subcommand" -a score -d "Compatibility score between technologies"
|
|
95
|
+
complete -c stackweld -n "__fish_use_subcommand" -a analyze -d "Detect project technology stack"
|
|
96
|
+
complete -c stackweld -n "__fish_use_subcommand" -a env -d "Sync .env files"
|
|
97
|
+
complete -c stackweld -n "__fish_use_subcommand" -a preview -d "Preview docker-compose.yml"
|
|
98
|
+
complete -c stackweld -n "__fish_use_subcommand" -a health -d "Check project health"
|
|
99
|
+
complete -c stackweld -n "__fish_use_subcommand" -a migrate -d "Migration plan between technologies"
|
|
100
|
+
complete -c stackweld -n "__fish_use_subcommand" -a learn -d "Learning resources for a technology"
|
|
101
|
+
complete -c stackweld -n "__fish_use_subcommand" -a deploy -d "Generate infrastructure-as-code"
|
|
102
|
+
complete -c stackweld -n "__fish_use_subcommand" -a lint -d "Validate against team standards"
|
|
103
|
+
complete -c stackweld -n "__fish_use_subcommand" -a benchmark -d "Performance profile for a stack"
|
|
104
|
+
complete -c stackweld -n "__fish_use_subcommand" -a cost -d "Estimate hosting costs"
|
|
105
|
+
complete -c stackweld -n "__fish_use_subcommand" -a plugin -d "Manage plugins"
|
|
106
|
+
complete -c stackweld -n "__fish_use_subcommand" -a version -d "Manage stack versions"
|
|
66
107
|
`.trim();
|
|
67
108
|
export const completionCommand = new Command("completion")
|
|
68
109
|
.description("Generate shell completion scripts")
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* stackweld init —
|
|
2
|
+
* stackweld init — Interactive project creation wizard.
|
|
3
|
+
* Creates the stack definition AND generates the full project.
|
|
3
4
|
*/
|
|
4
5
|
import { Command } from "commander";
|
|
5
6
|
export declare const initCommand: Command;
|