@atlashub/smartstack-cli 1.26.0 → 1.28.0
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/.documentation/commands.html +8 -8
- package/.documentation/efcore.html +13 -13
- package/.documentation/index.html +7 -7
- package/.documentation/installation.html +299 -129
- package/README.md +27 -49
- package/dist/index.js +130 -34
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
- package/scripts/health-check.sh +167 -0
- package/scripts/postinstall.js +18 -0
- package/templates/agents/gitflow/init.md +14 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlashub/smartstack-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.0",
|
|
4
4
|
"description": "SmartStack Claude Code automation toolkit - GitFlow, APEX, EF Core migrations, prompts and more",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SmartStack",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"dist",
|
|
21
21
|
"templates",
|
|
22
22
|
"config",
|
|
23
|
+
"scripts",
|
|
23
24
|
".documentation"
|
|
24
25
|
],
|
|
25
26
|
"engines": {
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
"ai-tools"
|
|
52
53
|
],
|
|
53
54
|
"scripts": {
|
|
55
|
+
"postinstall": "node scripts/postinstall.js || true",
|
|
54
56
|
"dev": "tsup --watch",
|
|
55
57
|
"build": "npx tsup",
|
|
56
58
|
"lint": "eslint src --ext .ts",
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# SmartStack Health Check Script
|
|
3
|
+
#
|
|
4
|
+
# Usage: ./scripts/health-check.sh
|
|
5
|
+
#
|
|
6
|
+
# Exit codes:
|
|
7
|
+
# 0 - All checks passed
|
|
8
|
+
# 1 - Some checks failed
|
|
9
|
+
#
|
|
10
|
+
# This script can be used in CI/CD pipelines to verify SmartStack setup.
|
|
11
|
+
|
|
12
|
+
set -e
|
|
13
|
+
|
|
14
|
+
# Colors
|
|
15
|
+
RED='\033[0;31m'
|
|
16
|
+
GREEN='\033[0;32m'
|
|
17
|
+
YELLOW='\033[1;33m'
|
|
18
|
+
BLUE='\033[0;34m'
|
|
19
|
+
NC='\033[0m' # No Color
|
|
20
|
+
|
|
21
|
+
ERRORS=0
|
|
22
|
+
WARNINGS=0
|
|
23
|
+
|
|
24
|
+
log_ok() {
|
|
25
|
+
echo -e "${GREEN}✓${NC} $1"
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
log_warn() {
|
|
29
|
+
echo -e "${YELLOW}⚠${NC} $1"
|
|
30
|
+
((WARNINGS++))
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
log_error() {
|
|
34
|
+
echo -e "${RED}✗${NC} $1"
|
|
35
|
+
((ERRORS++))
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
log_info() {
|
|
39
|
+
echo -e "${BLUE}ℹ${NC} $1"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
echo ""
|
|
43
|
+
echo "╔══════════════════════════════════════════════╗"
|
|
44
|
+
echo "║ SmartStack Health Check ║"
|
|
45
|
+
echo "╚══════════════════════════════════════════════╝"
|
|
46
|
+
echo ""
|
|
47
|
+
|
|
48
|
+
# Check Node.js
|
|
49
|
+
echo "Checking dependencies..."
|
|
50
|
+
|
|
51
|
+
if command -v node &> /dev/null; then
|
|
52
|
+
NODE_VERSION=$(node --version)
|
|
53
|
+
NODE_MAJOR=$(echo "$NODE_VERSION" | cut -d'.' -f1 | tr -d 'v')
|
|
54
|
+
if [ "$NODE_MAJOR" -ge 18 ]; then
|
|
55
|
+
log_ok "Node.js $NODE_VERSION"
|
|
56
|
+
else
|
|
57
|
+
log_error "Node.js $NODE_VERSION (requires 18+)"
|
|
58
|
+
fi
|
|
59
|
+
else
|
|
60
|
+
log_error "Node.js not found"
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
# Check npm
|
|
64
|
+
if command -v npm &> /dev/null; then
|
|
65
|
+
log_ok "npm $(npm --version)"
|
|
66
|
+
else
|
|
67
|
+
log_error "npm not found"
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
# Check Git
|
|
71
|
+
if command -v git &> /dev/null; then
|
|
72
|
+
log_ok "Git $(git --version | cut -d' ' -f3)"
|
|
73
|
+
else
|
|
74
|
+
log_error "Git not found"
|
|
75
|
+
fi
|
|
76
|
+
|
|
77
|
+
# Check .NET SDK
|
|
78
|
+
if command -v dotnet &> /dev/null; then
|
|
79
|
+
log_ok ".NET SDK $(dotnet --version)"
|
|
80
|
+
else
|
|
81
|
+
log_warn ".NET SDK not found (optional for non-.NET projects)"
|
|
82
|
+
fi
|
|
83
|
+
|
|
84
|
+
echo ""
|
|
85
|
+
echo "Checking Claude Code..."
|
|
86
|
+
|
|
87
|
+
# Check Claude Code CLI
|
|
88
|
+
if command -v claude &> /dev/null; then
|
|
89
|
+
log_ok "Claude Code CLI installed"
|
|
90
|
+
|
|
91
|
+
# Check MCP servers
|
|
92
|
+
echo ""
|
|
93
|
+
echo "Checking MCP servers..."
|
|
94
|
+
|
|
95
|
+
if claude mcp list 2>/dev/null | grep -qi "smartstack"; then
|
|
96
|
+
log_ok "SmartStack MCP available"
|
|
97
|
+
else
|
|
98
|
+
log_error "SmartStack MCP not installed"
|
|
99
|
+
log_info " Install: npm install -g @atlashub/smartstack-mcp && claude mcp add smartstack -- npx @atlashub/smartstack-mcp"
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
if claude mcp list 2>/dev/null | grep -qi "context7"; then
|
|
103
|
+
log_ok "Context7 MCP available"
|
|
104
|
+
else
|
|
105
|
+
log_error "Context7 MCP not installed"
|
|
106
|
+
log_info " Install: claude mcp add context7 -- npx @upstash/context7-mcp"
|
|
107
|
+
fi
|
|
108
|
+
else
|
|
109
|
+
log_error "Claude Code CLI not found"
|
|
110
|
+
log_info " Install: npm install -g @anthropic-ai/claude-code"
|
|
111
|
+
fi
|
|
112
|
+
|
|
113
|
+
echo ""
|
|
114
|
+
echo "Checking SmartStack CLI..."
|
|
115
|
+
|
|
116
|
+
# Check SmartStack CLI
|
|
117
|
+
if command -v smartstack &> /dev/null; then
|
|
118
|
+
log_ok "SmartStack CLI installed"
|
|
119
|
+
|
|
120
|
+
# Check templates installation
|
|
121
|
+
if [ -d "$HOME/.claude/commands" ] && [ -f "$HOME/.claude/commands/gitflow.md" ]; then
|
|
122
|
+
log_ok "SmartStack commands installed"
|
|
123
|
+
else
|
|
124
|
+
log_warn "SmartStack commands not installed"
|
|
125
|
+
log_info " Run: smartstack install"
|
|
126
|
+
fi
|
|
127
|
+
else
|
|
128
|
+
log_error "SmartStack CLI not found"
|
|
129
|
+
log_info " Install: npm install -g @atlashub/smartstack-cli"
|
|
130
|
+
fi
|
|
131
|
+
|
|
132
|
+
# Check local Ralph config
|
|
133
|
+
echo ""
|
|
134
|
+
echo "Checking local project..."
|
|
135
|
+
|
|
136
|
+
if [ -f ".ralph/ralph.config.yaml" ]; then
|
|
137
|
+
log_ok "Ralph configured in this project"
|
|
138
|
+
else
|
|
139
|
+
log_warn "Ralph not configured in this project"
|
|
140
|
+
log_info " Run: smartstack ralph init"
|
|
141
|
+
fi
|
|
142
|
+
|
|
143
|
+
if [ -d ".git" ]; then
|
|
144
|
+
BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
|
|
145
|
+
log_ok "Git repository (branch: $BRANCH)"
|
|
146
|
+
else
|
|
147
|
+
log_warn "Not a Git repository"
|
|
148
|
+
fi
|
|
149
|
+
|
|
150
|
+
# Summary
|
|
151
|
+
echo ""
|
|
152
|
+
echo "════════════════════════════════════════════════"
|
|
153
|
+
|
|
154
|
+
if [ $ERRORS -eq 0 ]; then
|
|
155
|
+
if [ $WARNINGS -eq 0 ]; then
|
|
156
|
+
echo -e "${GREEN}All checks passed!${NC}"
|
|
157
|
+
echo "SmartStack is ready to use."
|
|
158
|
+
else
|
|
159
|
+
echo -e "${YELLOW}$WARNINGS warning(s)${NC}"
|
|
160
|
+
echo "SmartStack is usable but some features may be limited."
|
|
161
|
+
fi
|
|
162
|
+
exit 0
|
|
163
|
+
else
|
|
164
|
+
echo -e "${RED}$ERRORS error(s), $WARNINGS warning(s)${NC}"
|
|
165
|
+
echo "Please fix the errors above before using SmartStack."
|
|
166
|
+
exit 1
|
|
167
|
+
fi
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Simple postinstall script - displays PATH fix for Windows
|
|
3
|
+
|
|
4
|
+
const isGlobal = process.env.npm_config_global === 'true';
|
|
5
|
+
const isWindows = process.platform === 'win32';
|
|
6
|
+
|
|
7
|
+
if (isGlobal && isWindows) {
|
|
8
|
+
const prefix = process.env.npm_config_prefix || '';
|
|
9
|
+
console.log(`
|
|
10
|
+
\x1b[32m✅ SmartStack CLI installed!\x1b[0m
|
|
11
|
+
|
|
12
|
+
\x1b[33mIf 'ss' command is not found, run this in PowerShell:\x1b[0m
|
|
13
|
+
|
|
14
|
+
\x1b[36m$env:PATH += ";${prefix || '$(npm config get prefix)'}"\x1b[0m
|
|
15
|
+
|
|
16
|
+
Then: \x1b[36mss --version\x1b[0m
|
|
17
|
+
`);
|
|
18
|
+
}
|
|
@@ -129,24 +129,26 @@ WAIT for user response. If "Modify", go back to STEP 2.
|
|
|
129
129
|
|
|
130
130
|
ONLY after user confirms "Yes, create":
|
|
131
131
|
|
|
132
|
+
**IMPORTANT:** Use absolute paths for ALL operations. The `cd` command does not persist between Bash calls.
|
|
133
|
+
|
|
132
134
|
```bash
|
|
135
|
+
# Set the project base path (use forward slashes even on Windows)
|
|
133
136
|
PROJECT_BASE="{TARGET_FOLDER}/{PROJECT_NAME}"
|
|
134
|
-
mkdir -p "$PROJECT_BASE"
|
|
135
|
-
cd "$PROJECT_BASE"
|
|
136
137
|
|
|
137
|
-
#
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
# Create project directory and clone as bare repository
|
|
139
|
+
mkdir -p "$PROJECT_BASE" && \
|
|
140
|
+
git clone --bare "{URL}" "$PROJECT_BASE/.bare" && \
|
|
141
|
+
echo "gitdir: ./.bare" > "$PROJECT_BASE/.git"
|
|
140
142
|
|
|
141
|
-
# Create worktree directories
|
|
142
|
-
mkdir -p 01-Main 02-Develop features releases hotfixes
|
|
143
|
+
# Create worktree directories (use absolute paths)
|
|
144
|
+
mkdir -p "$PROJECT_BASE/01-Main" "$PROJECT_BASE/02-Develop" "$PROJECT_BASE/features" "$PROJECT_BASE/releases" "$PROJECT_BASE/hotfixes"
|
|
143
145
|
|
|
144
|
-
# Setup worktrees
|
|
145
|
-
git worktree add 01-Main main
|
|
146
|
-
git worktree add 02-Develop develop
|
|
146
|
+
# Setup worktrees (must cd first, chain with &&)
|
|
147
|
+
cd "$PROJECT_BASE" && git worktree add 01-Main main
|
|
148
|
+
cd "$PROJECT_BASE" && git worktree add 02-Develop develop
|
|
147
149
|
|
|
148
|
-
# Create config
|
|
149
|
-
mkdir -p 02-Develop/.claude/gitflow
|
|
150
|
+
# Create config directory
|
|
151
|
+
mkdir -p "$PROJECT_BASE/02-Develop/.claude/gitflow"
|
|
150
152
|
```
|
|
151
153
|
|
|
152
154
|
### STEP 6: OUTPUT
|