chiefwiggum 1.1.0 → 1.2.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.
Files changed (2) hide show
  1. package/chiefwiggum +37 -2
  2. package/package.json +1 -1
package/chiefwiggum CHANGED
@@ -26,7 +26,9 @@ NC='\033[0m'
26
26
  # CONFIGURATION
27
27
  # =========================================
28
28
  SCRIPT_DIR="$(dirname "$(realpath "$0")")"
29
- TEMPLATES_DIR="${SCRIPT_DIR}/templates"
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
  # =========================================
@@ -375,7 +381,10 @@ generate_from_plan() {
375
381
 
376
382
  # Check templates exist
377
383
  if [ ! -d "$TEMPLATES_DIR" ]; then
378
- echo -e "${RED}Templates directory not found: ${TEMPLATES_DIR}${NC}"
384
+ echo -e "${RED}Templates not found at: ${TEMPLATES_DIR}${NC}"
385
+ echo ""
386
+ echo "Run this to set up templates:"
387
+ echo -e " ${CYAN}npx chiefwiggum@latest${NC}"
379
388
  exit 1
380
389
  fi
381
390
 
@@ -703,6 +712,18 @@ cleanup_stale_processes() {
703
712
  sleep 1
704
713
  }
705
714
 
715
+ # =========================================
716
+ # SETUP TEMPLATES
717
+ # =========================================
718
+ setup_templates() {
719
+ # Copy bundled templates to ~/.chiefwiggum/templates
720
+ if [ -d "$BUNDLED_TEMPLATES" ]; then
721
+ mkdir -p "$CHIEFWIGGUM_HOME"
722
+ cp -r "$BUNDLED_TEMPLATES" "$CHIEFWIGGUM_HOME/"
723
+ echo -e "${GREEN}✓ Templates installed to: ${TEMPLATES_DIR}${NC}"
724
+ fi
725
+ }
726
+
706
727
  # =========================================
707
728
  # INSTALL COMMAND
708
729
  # =========================================
@@ -717,6 +738,8 @@ cmd_install() {
717
738
  local installed_path=$(which chiefwiggum)
718
739
  if [[ "$installed_path" != *"npx"* ]] && [[ "$installed_path" != *".npm/_npx"* ]]; then
719
740
  echo -e "${GREEN}✓ Already installed at: ${installed_path}${NC}"
741
+ # Still set up templates in case they're missing
742
+ setup_templates
720
743
  echo ""
721
744
  echo "Run 'chiefwiggum new' to get started."
722
745
  return 0
@@ -728,11 +751,23 @@ cmd_install() {
728
751
  echo ""
729
752
 
730
753
  if npm install -g chiefwiggum; then
754
+ echo ""
755
+ # Set up templates after install
756
+ # Need to get the installed location
757
+ local installed_dir=$(dirname "$(realpath "$(which chiefwiggum)")")
758
+ if [ -d "${installed_dir}/templates" ]; then
759
+ mkdir -p "$CHIEFWIGGUM_HOME"
760
+ cp -r "${installed_dir}/templates" "$CHIEFWIGGUM_HOME/"
761
+ echo -e "${GREEN}✓ Templates installed to: ${TEMPLATES_DIR}${NC}"
762
+ fi
763
+
731
764
  echo ""
732
765
  echo -e "${GREEN}════════════════════════════════════════${NC}"
733
766
  echo -e "${GREEN} ✓ Installation complete!${NC}"
734
767
  echo -e "${GREEN}════════════════════════════════════════${NC}"
735
768
  echo ""
769
+ echo -e "Templates: ${CYAN}${TEMPLATES_DIR}${NC}"
770
+ echo ""
736
771
  echo "Get started:"
737
772
  echo -e " ${CYAN}chiefwiggum new${NC} # Set up a new project"
738
773
  echo -e " ${CYAN}chiefwiggum loop${NC} # Run the build loop"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chiefwiggum",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Autonomous coding agent CLI. Point it at a plan, watch it build.",
5
5
  "bin": {
6
6
  "chiefwiggum": "./chiefwiggum"