chiefwiggum 1.1.0 → 1.2.1
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/chiefwiggum +50 -4
- package/package.json +1 -1
package/chiefwiggum
CHANGED
|
@@ -9,7 +9,7 @@ set -euo pipefail
|
|
|
9
9
|
# Autonomous coding agent CLI
|
|
10
10
|
###########################################
|
|
11
11
|
|
|
12
|
-
VERSION="1.
|
|
12
|
+
VERSION="1.2.1"
|
|
13
13
|
|
|
14
14
|
# =========================================
|
|
15
15
|
# COLORS
|
|
@@ -26,7 +26,9 @@ NC='\033[0m'
|
|
|
26
26
|
# CONFIGURATION
|
|
27
27
|
# =========================================
|
|
28
28
|
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
|
|
29
|
-
|
|
29
|
+
CHIEFWIGGUM_HOME="${CHIEFWIGGUM_HOME:-$HOME/.chiefwiggum}"
|
|
30
|
+
TEMPLATES_DIR="${CHIEFWIGGUM_HOME}/templates"
|
|
31
|
+
BUNDLED_TEMPLATES="${SCRIPT_DIR}/templates"
|
|
30
32
|
TODO_FILE="${TODO_FILE:-TODO.md}"
|
|
31
33
|
COOLDOWN_SECONDS="${COOLDOWN_SECONDS:-5}"
|
|
32
34
|
|
|
@@ -71,6 +73,10 @@ show_help() {
|
|
|
71
73
|
echo " chiefwiggum loop # Start build loop"
|
|
72
74
|
echo " chiefwiggum # Same as 'loop'"
|
|
73
75
|
echo ""
|
|
76
|
+
echo "Templates:"
|
|
77
|
+
echo -e " ${CYAN}${TEMPLATES_DIR}${NC}"
|
|
78
|
+
echo " Edit these to customize how specs are generated."
|
|
79
|
+
echo ""
|
|
74
80
|
}
|
|
75
81
|
|
|
76
82
|
# =========================================
|
|
@@ -237,8 +243,19 @@ cmd_new() {
|
|
|
237
243
|
case $setup_choice in
|
|
238
244
|
0)
|
|
239
245
|
# From plan file
|
|
246
|
+
echo ""
|
|
247
|
+
# Show available plans
|
|
248
|
+
if [ -d "plans" ] && [ "$(ls -A plans/*.md 2>/dev/null)" ]; then
|
|
249
|
+
echo -e "${BOLD}Available plans:${NC}"
|
|
250
|
+
for f in plans/*.md; do
|
|
251
|
+
echo -e " ${CYAN}${f}${NC}"
|
|
252
|
+
done
|
|
253
|
+
echo ""
|
|
254
|
+
fi
|
|
255
|
+
# Use read -e for tab completion
|
|
240
256
|
local plan_path
|
|
241
|
-
|
|
257
|
+
read -e -p "Path to plan file [plans/plan.md]: " plan_path
|
|
258
|
+
plan_path="${plan_path:-plans/plan.md}"
|
|
242
259
|
if [ ! -f "$plan_path" ]; then
|
|
243
260
|
echo -e "${RED}Plan file not found: ${plan_path}${NC}"
|
|
244
261
|
exit 1
|
|
@@ -375,7 +392,10 @@ generate_from_plan() {
|
|
|
375
392
|
|
|
376
393
|
# Check templates exist
|
|
377
394
|
if [ ! -d "$TEMPLATES_DIR" ]; then
|
|
378
|
-
echo -e "${RED}Templates
|
|
395
|
+
echo -e "${RED}Templates not found at: ${TEMPLATES_DIR}${NC}"
|
|
396
|
+
echo ""
|
|
397
|
+
echo "Run this to set up templates:"
|
|
398
|
+
echo -e " ${CYAN}npx chiefwiggum@latest${NC}"
|
|
379
399
|
exit 1
|
|
380
400
|
fi
|
|
381
401
|
|
|
@@ -703,6 +723,18 @@ cleanup_stale_processes() {
|
|
|
703
723
|
sleep 1
|
|
704
724
|
}
|
|
705
725
|
|
|
726
|
+
# =========================================
|
|
727
|
+
# SETUP TEMPLATES
|
|
728
|
+
# =========================================
|
|
729
|
+
setup_templates() {
|
|
730
|
+
# Copy bundled templates to ~/.chiefwiggum/templates
|
|
731
|
+
if [ -d "$BUNDLED_TEMPLATES" ]; then
|
|
732
|
+
mkdir -p "$CHIEFWIGGUM_HOME"
|
|
733
|
+
cp -r "$BUNDLED_TEMPLATES" "$CHIEFWIGGUM_HOME/"
|
|
734
|
+
echo -e "${GREEN}✓ Templates installed to: ${TEMPLATES_DIR}${NC}"
|
|
735
|
+
fi
|
|
736
|
+
}
|
|
737
|
+
|
|
706
738
|
# =========================================
|
|
707
739
|
# INSTALL COMMAND
|
|
708
740
|
# =========================================
|
|
@@ -717,6 +749,8 @@ cmd_install() {
|
|
|
717
749
|
local installed_path=$(which chiefwiggum)
|
|
718
750
|
if [[ "$installed_path" != *"npx"* ]] && [[ "$installed_path" != *".npm/_npx"* ]]; then
|
|
719
751
|
echo -e "${GREEN}✓ Already installed at: ${installed_path}${NC}"
|
|
752
|
+
# Still set up templates in case they're missing
|
|
753
|
+
setup_templates
|
|
720
754
|
echo ""
|
|
721
755
|
echo "Run 'chiefwiggum new' to get started."
|
|
722
756
|
return 0
|
|
@@ -728,11 +762,23 @@ cmd_install() {
|
|
|
728
762
|
echo ""
|
|
729
763
|
|
|
730
764
|
if npm install -g chiefwiggum; then
|
|
765
|
+
echo ""
|
|
766
|
+
# Set up templates after install
|
|
767
|
+
# Need to get the installed location
|
|
768
|
+
local installed_dir=$(dirname "$(realpath "$(which chiefwiggum)")")
|
|
769
|
+
if [ -d "${installed_dir}/templates" ]; then
|
|
770
|
+
mkdir -p "$CHIEFWIGGUM_HOME"
|
|
771
|
+
cp -r "${installed_dir}/templates" "$CHIEFWIGGUM_HOME/"
|
|
772
|
+
echo -e "${GREEN}✓ Templates installed to: ${TEMPLATES_DIR}${NC}"
|
|
773
|
+
fi
|
|
774
|
+
|
|
731
775
|
echo ""
|
|
732
776
|
echo -e "${GREEN}════════════════════════════════════════${NC}"
|
|
733
777
|
echo -e "${GREEN} ✓ Installation complete!${NC}"
|
|
734
778
|
echo -e "${GREEN}════════════════════════════════════════${NC}"
|
|
735
779
|
echo ""
|
|
780
|
+
echo -e "Templates: ${CYAN}${TEMPLATES_DIR}${NC}"
|
|
781
|
+
echo ""
|
|
736
782
|
echo "Get started:"
|
|
737
783
|
echo -e " ${CYAN}chiefwiggum new${NC} # Set up a new project"
|
|
738
784
|
echo -e " ${CYAN}chiefwiggum loop${NC} # Run the build loop"
|