jekyll-theme-zer0 0.22.20 → 0.22.22

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.
@@ -0,0 +1,189 @@
1
+ #!/usr/bin/env bash
2
+ # scripts/lib/install/wizard_interactive.sh
3
+ #
4
+ # Non-AI interactive wizard. Prompts the user for site config + profile,
5
+ # then dispatches to `install init` with the chosen options.
6
+ #
7
+ # Complementary to ai/wizard.sh (which uses OpenAI). This one is fully
8
+ # offline and works in any environment.
9
+ #
10
+ # Public API:
11
+ # wizard_interactive_run <target_dir> <repo_root> [--auto-accept]
12
+ #
13
+ # Bash 3.2-compatible.
14
+
15
+ # shellcheck disable=SC2034
16
+ WIZARD_INTERACTIVE_LIB_VERSION="1.0.0"
17
+
18
+ # Prompt with a default value. Returns the user's input on stdout.
19
+ # args: prompt default
20
+ _wiz_prompt() {
21
+ local prompt="$1" default="$2" reply
22
+ if [[ -n "$default" ]]; then
23
+ printf " %s [%s]: " "$prompt" "$default" >&2
24
+ else
25
+ printf " %s: " "$prompt" >&2
26
+ fi
27
+ read -r reply || reply=""
28
+ [[ -z "$reply" ]] && reply="$default"
29
+ printf '%s\n' "$reply"
30
+ }
31
+
32
+ # Prompt for a yes/no answer. Returns 0 for yes, 1 for no.
33
+ # args: prompt default(y|n)
34
+ _wiz_confirm() {
35
+ local prompt="$1" default="${2:-n}" reply hint
36
+ case "$default" in
37
+ y|Y) hint="[Y/n]" ;;
38
+ *) hint="[y/N]" ;;
39
+ esac
40
+ printf " %s %s: " "$prompt" "$hint" >&2
41
+ read -r reply || reply=""
42
+ [[ -z "$reply" ]] && reply="$default"
43
+ case "$reply" in
44
+ y|Y|yes|YES) return 0 ;;
45
+ *) return 1 ;;
46
+ esac
47
+ }
48
+
49
+ # Pick from a numbered list. Returns the chosen value on stdout.
50
+ # args: prompt default option1 option2 ...
51
+ _wiz_choose() {
52
+ local prompt="$1" default="$2"
53
+ shift 2
54
+ local options=("$@")
55
+ local i=1 opt
56
+ echo " $prompt" >&2
57
+ for opt in "${options[@]}"; do
58
+ if [[ "$opt" = "$default" ]]; then
59
+ printf " %d) %s (default)\n" "$i" "$opt" >&2
60
+ else
61
+ printf " %d) %s\n" "$i" "$opt" >&2
62
+ fi
63
+ i=$((i+1))
64
+ done
65
+ printf " Choice [%s]: " "$default" >&2
66
+ local reply
67
+ read -r reply || reply=""
68
+ [[ -z "$reply" ]] && { printf '%s\n' "$default"; return; }
69
+ # Numeric or by-name
70
+ case "$reply" in
71
+ ''|*[!0-9]*)
72
+ # by name; verify it exists
73
+ for opt in "${options[@]}"; do
74
+ [[ "$opt" = "$reply" ]] && { printf '%s\n' "$reply"; return; }
75
+ done
76
+ printf '%s\n' "$default" ;;
77
+ *)
78
+ local idx=$((reply))
79
+ if (( idx >= 1 && idx <= ${#options[@]} )); then
80
+ printf '%s\n' "${options[$((idx-1))]}"
81
+ else
82
+ printf '%s\n' "$default"
83
+ fi ;;
84
+ esac
85
+ }
86
+
87
+ # Public entrypoint.
88
+ wizard_interactive_run() {
89
+ local target_dir="$1" repo_root="$2"
90
+ shift 2 || true
91
+ local auto_accept=0
92
+ while [[ $# -gt 0 ]]; do
93
+ case "$1" in
94
+ --auto-accept) auto_accept=1 ;;
95
+ *) log_warning "wizard_interactive_run: ignoring unknown flag: $1" ;;
96
+ esac
97
+ shift
98
+ done
99
+
100
+ log_info "🧙 Interactive wizard (non-AI)"
101
+ log_info " This wizard collects site settings and runs 'install init'."
102
+ log_info " Press Enter to accept defaults shown in [brackets]."
103
+ echo
104
+
105
+ # Discover available profiles dynamically if loader is present.
106
+ local default_profile="full"
107
+ local profiles_csv="minimal full fork github remote"
108
+ if declare -F list_profile_names >/dev/null 2>&1; then
109
+ local discovered
110
+ discovered="$(list_profile_names "$repo_root" 2>/dev/null | tr '\n' ' ')"
111
+ [[ -n "$discovered" ]] && profiles_csv="$discovered"
112
+ fi
113
+ # shellcheck disable=SC2206
114
+ local profile_options=( $profiles_csv )
115
+
116
+ log_info "── Site basics ──────────────────────────"
117
+ local site_name site_desc author email
118
+ site_name="$(_wiz_prompt "Site name" "$(basename "$target_dir")")"
119
+ site_desc="$(_wiz_prompt "Description" "A Jekyll site powered by zer0-mistakes")"
120
+ author="$(_wiz_prompt "Author name" "${USER:-author}")"
121
+ email="$(_wiz_prompt "Author email" "${USER:-author}@example.com")"
122
+ echo
123
+
124
+ log_info "── Profile ──────────────────────────────"
125
+ local profile
126
+ profile="$(_wiz_choose "Choose an install profile:" "$default_profile" "${profile_options[@]}")"
127
+ echo
128
+
129
+ log_info "── Optional integrations ────────────────"
130
+ local want_agents=0 want_docker=0
131
+ _wiz_confirm "Install AI agent guidance files?" "y" && want_agents=1
132
+ _wiz_confirm "Add docker-prod deploy target?" "n" && want_docker=1
133
+ echo
134
+
135
+ log_info "── Summary ──────────────────────────────"
136
+ log_info " Target dir: $target_dir"
137
+ log_info " Site name: $site_name"
138
+ log_info " Description: $site_desc"
139
+ log_info " Author: $author <$email>"
140
+ log_info " Profile: $profile"
141
+ log_info " Agents: $([ "$want_agents" = "1" ] && echo yes || echo no)"
142
+ log_info " docker-prod: $([ "$want_docker" = "1" ] && echo yes || echo no)"
143
+ echo
144
+
145
+ if [[ "$auto_accept" != "1" ]]; then
146
+ if ! _wiz_confirm "Proceed with these settings?" "y"; then
147
+ log_warning "Wizard cancelled."
148
+ return 0
149
+ fi
150
+ fi
151
+
152
+ # Export for any downstream consumers (legacy install.sh reads SITE_NAME etc.)
153
+ export SITE_NAME="$site_name"
154
+ export SITE_DESCRIPTION="$site_desc"
155
+ export AUTHOR_NAME="$author"
156
+ export AUTHOR_EMAIL="$email"
157
+
158
+ # Dispatch
159
+ local install_bin="$repo_root/scripts/bin/install"
160
+ if [[ ! -x "$install_bin" ]]; then
161
+ log_error "Cannot find $install_bin"
162
+ return 1
163
+ fi
164
+
165
+ log_info "Running: install init --profile $profile $target_dir"
166
+ "$install_bin" init --profile "$profile" --skip-doctor "$target_dir" || {
167
+ log_error "init failed"
168
+ return 1
169
+ }
170
+
171
+ if [[ "$want_agents" = "1" ]]; then
172
+ echo
173
+ log_info "Running: install agents $target_dir"
174
+ "$install_bin" agents "$target_dir" || log_warning "agents install reported issues"
175
+ fi
176
+
177
+ if [[ "$want_docker" = "1" ]]; then
178
+ echo
179
+ log_info "Running: install deploy docker-prod $target_dir"
180
+ "$install_bin" deploy docker-prod "$target_dir" || log_warning "docker-prod install reported issues"
181
+ fi
182
+
183
+ echo
184
+ log_success "Wizard complete!"
185
+ log_info "Next steps:"
186
+ log_info " cd $target_dir"
187
+ log_info " docker compose up # or: bundle exec jekyll serve"
188
+ return 0
189
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-zer0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.20
4
+ version: 0.22.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amr Abdel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-19 00:00:00.000000000 Z
11
+ date: 2026-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -96,6 +96,7 @@ files:
96
96
  - _data/posts_organization.yml
97
97
  - _data/prerequisites.yml
98
98
  - _data/prompts.yml
99
+ - _data/roadmap.yml
99
100
  - _data/statistics_config.yml
100
101
  - _data/theme_backgrounds.yml
101
102
  - _data/ui-text.yml
@@ -354,6 +355,7 @@ files:
354
355
  - scripts/README.md
355
356
  - scripts/analyze-commits.sh
356
357
  - scripts/bin/build
358
+ - scripts/bin/install
357
359
  - scripts/bin/release
358
360
  - scripts/bin/test
359
361
  - scripts/build
@@ -366,6 +368,8 @@ files:
366
368
  - scripts/fix-markdown-format.sh
367
369
  - scripts/fork-cleanup.sh
368
370
  - scripts/generate-preview-images.sh
371
+ - scripts/generate-roadmap.rb
372
+ - scripts/generate-roadmap.sh
369
373
  - scripts/github-setup.sh
370
374
  - scripts/init_setup.sh
371
375
  - scripts/install-preview-generator.sh
@@ -375,6 +379,27 @@ files:
375
379
  - scripts/lib/frontmatter.sh
376
380
  - scripts/lib/gem.sh
377
381
  - scripts/lib/git.sh
382
+ - scripts/lib/install/README.md
383
+ - scripts/lib/install/agents.sh
384
+ - scripts/lib/install/ai/diagnose.sh
385
+ - scripts/lib/install/ai/openai.sh
386
+ - scripts/lib/install/ai/suggest.sh
387
+ - scripts/lib/install/ai/wizard.sh
388
+ - scripts/lib/install/config.sh
389
+ - scripts/lib/install/deploy/README.md
390
+ - scripts/lib/install/deploy/azure-swa.sh
391
+ - scripts/lib/install/deploy/docker-prod.sh
392
+ - scripts/lib/install/deploy/github-pages.sh
393
+ - scripts/lib/install/deploy/registry.sh
394
+ - scripts/lib/install/doctor.sh
395
+ - scripts/lib/install/fs.sh
396
+ - scripts/lib/install/logging.sh
397
+ - scripts/lib/install/pages.sh
398
+ - scripts/lib/install/platform.sh
399
+ - scripts/lib/install/profile.sh
400
+ - scripts/lib/install/template.sh
401
+ - scripts/lib/install/upgrade.sh
402
+ - scripts/lib/install/wizard_interactive.sh
378
403
  - scripts/lib/migrate.sh
379
404
  - scripts/lib/preview_generator.py
380
405
  - scripts/lib/template.sh