Skip to content

Commit 66e3325

Browse files
committed
v1.1.1
1 parent f46ac73 commit 66e3325

7 files changed

Lines changed: 116 additions & 31 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ Thumbs.db
2929
REDDIT_POST.md
3030
LINKEDIN_POST.md
3131
LINKEDIN_COMMENT_V*.md
32+
ssc-list-screenshot.png

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,33 @@ All notable changes to server-scripts-cli will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.1.1] - 2026-01-17
9+
10+
### Fixed
11+
- **HIGH**: Generator now supports `examples/demo-scripts/` directory as fallback when `scripts/` doesn't exist ([#codex-high](https://github.com/fidpa/server-scripts-cli/issues))
12+
- Enables testing generator in standalone demo repository without manual setup
13+
- Priority-based directory search: `scripts/` first, then `examples/demo-scripts/`
14+
- **MEDIUM**: Fixed type taxonomy inconsistency - removed `cli-tool` default type, changed to `admin` ([#codex-medium](https://github.com/fidpa/server-scripts-cli/issues))
15+
- Default type changed from `cli-tool` to `admin` (Tier 1 type)
16+
- Updated CLI help text to show valid type examples
17+
- **MEDIUM**: Added auto-migration for deprecated `cli-tool` type → `admin` with warnings ([#codex-medium](https://github.com/fidpa/server-scripts-cli/issues))
18+
- Non-breaking change: existing scripts with `type: cli-tool` auto-migrate
19+
- Warning messages guide users to update YAML frontmatter
20+
- **LOW**: Synchronized version strings across all files to v1.1.1 ([#codex-low](https://github.com/fidpa/server-scripts-cli/issues))
21+
22+
### Changed
23+
- Generator now scans directories in priority order: `scripts/` first, then `examples/demo-scripts/`
24+
- Default type for scripts without frontmatter changed from `cli-tool` to `admin`
25+
- Updated CLI help text (`ssc list --help`) to remove `cli-tool` references
26+
27+
### Deprecated
28+
- Type `cli-tool` is now deprecated - use `deployment: cli-tool` field instead
29+
- See [MANIFEST_SCHEMA.md](docs/MANIFEST_SCHEMA.md#deprecated-types) for migration guide
30+
31+
### Documentation
32+
- Added "Deprecated Types" section to [MANIFEST_SCHEMA.md](docs/MANIFEST_SCHEMA.md)
33+
- Added migration examples and behavior documentation
34+
835
## [1.1.0] - 2026-01-16
936

1037
### Added
@@ -45,5 +72,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4572
- Complete documentation suite
4673
- MIT License
4774

75+
[1.1.1]: https://github.com/fidpa/server-scripts-cli/compare/v1.1.0...v1.1.1
4876
[1.1.0]: https://github.com/fidpa/server-scripts-cli/compare/v1.0.0...v1.1.0
4977
[1.0.0]: https://github.com/fidpa/server-scripts-cli/releases/tag/v1.0.0

CLAUDE.md.rclonelink

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CLAUDE.md

docs/MANIFEST_SCHEMA.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,33 @@ Scripts are organized into a **4-Tier Hierarchy**:
140140
| `library` | Sourced by scripts |
141141
| `helper` | Called by scripts |
142142

143+
### Deprecated Types
144+
145+
The following types are **deprecated** and will be auto-migrated by `generate-manifest.sh`:
146+
147+
| Deprecated Value | Migration Target | Note |
148+
|-----------------|------------------|------|
149+
| `cli-tool` | `admin` | Use `deployment: cli-tool` field instead (see Deployment section) |
150+
151+
**Migration Behavior**: If `generate-manifest.sh` encounters `type: cli-tool` in a script's YAML frontmatter, it will:
152+
1. Auto-migrate to `type: admin`
153+
2. Print a warning with migration instructions
154+
3. Continue processing (non-breaking)
155+
156+
**Example**:
157+
```yaml
158+
# ❌ Old (deprecated)
159+
# ---
160+
# type: cli-tool
161+
# ---
162+
163+
# ✅ New (recommended)
164+
# ---
165+
# type: admin
166+
# deployment: cli-tool # If script is interactive CLI tool
167+
# ---
168+
```
169+
143170
### status
144171

145172
| Value | Description |

generate-manifest.sh

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# ./generate-manifest.sh --verbose # Show progress
1313
#
1414
# Documentation: docs/MANIFEST_SCHEMA.md
15-
# Version: 1.0.0
15+
# Version: 1.1.1
1616
# Created: 2026-01-02
1717

1818
set -uo pipefail
@@ -27,7 +27,7 @@ else
2727
readonly REPO_ROOT="$SCRIPT_DIR"
2828
fi
2929
readonly MANIFEST_FILE="${REPO_ROOT}/manifest.yaml"
30-
readonly VERSION="1.0.0"
30+
readonly VERSION="1.1.1"
3131

3232
# ===== Options =====
3333
DRY_RUN=false
@@ -201,18 +201,27 @@ generate_script_entry() {
201201
if [[ -n "$frontmatter" ]]; then
202202
deployment=$(parse_yaml_field "$frontmatter" "deployment" "manual")
203203
status=$(parse_yaml_field "$frontmatter" "status" "active")
204-
type=$(parse_yaml_field "$frontmatter" "type" "cli-tool")
204+
type=$(parse_yaml_field "$frontmatter" "type" "admin")
205205
requires_root=$(parse_yaml_field "$frontmatter" "requires_root" "false")
206206
service=$(parse_yaml_field "$frontmatter" "service" "none")
207207
else
208208
# Defaults for scripts without front-matter
209209
deployment="manual"
210210
status="active"
211-
type="cli-tool"
211+
type="admin"
212212
requires_root="false"
213213
service="none"
214214
fi
215215

216+
# Auto-migrate deprecated cli-tool type
217+
if [[ "$type" == "cli-tool" ]]; then
218+
local script_file="${script_path##*/}"
219+
print_warning "Script ${script_file}: type 'cli-tool' is deprecated, auto-migrating to 'admin'"
220+
print_info " → Update YAML frontmatter: type: admin"
221+
print_info " → Or use deployment field: deployment: cli-tool"
222+
type="admin"
223+
fi
224+
216225
# Generate YAML entry
217226
cat << EOF
218227
${short_name}:
@@ -240,7 +249,23 @@ generate_manifest() {
240249
local frontmatter_count=0
241250
local script_list=()
242251

243-
print_info "Scanning scripts directory..."
252+
# Detect script directory (priority: scripts/ → examples/demo-scripts/)
253+
readonly SCRIPT_DIRECTORIES=("scripts" "examples/demo-scripts")
254+
local SCAN_DIR=""
255+
256+
for dir in "${SCRIPT_DIRECTORIES[@]}"; do
257+
if [[ -d "${REPO_ROOT}/${dir}" ]]; then
258+
SCAN_DIR="${REPO_ROOT}/${dir}"
259+
print_info "Scanning ${dir}/ directory..."
260+
break
261+
fi
262+
done
263+
264+
if [[ -z "$SCAN_DIR" ]]; then
265+
print_error "No script directories found"
266+
print_info "Expected: scripts/ or examples/demo-scripts/"
267+
return 1
268+
fi
244269

245270
# Find all scripts (excluding hidden, .venv, node_modules, etc.)
246271
while IFS= read -r script_path; do
@@ -253,7 +278,7 @@ generate_manifest() {
253278
fi
254279

255280
print_verbose "Found: ${script_path#${REPO_ROOT}/}"
256-
done < <(find "${REPO_ROOT}/scripts" -type f \( -name "*.sh" -o -name "*.py" \) \
281+
done < <(find "$SCAN_DIR" -type f \( -name "*.sh" -o -name "*.py" \) \
257282
! -name "__init__.py" \
258283
! -path "*/.venv/*" \
259284
! -path "*/venv/*" \
@@ -262,8 +287,8 @@ generate_manifest() {
262287
2>/dev/null | sort)
263288

264289
if [[ $script_count -eq 0 ]]; then
265-
print_warning "No scripts found in ${REPO_ROOT}/scripts/"
266-
print_info "Create scripts/ directory and add some .sh or .py files"
290+
print_warning "No scripts found in ${SCAN_DIR}"
291+
print_info "Add some .sh or .py files to the scripts directory"
267292
return 1
268293
fi
269294

manifest.yaml

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,63 @@
1-
# Server Scripts Manifest - Example
2-
# This demonstrates the YAML schema used by ssc.sh
1+
# Server Scripts Manifest - Auto-generated from YAML Front-Matter
2+
# DO NOT EDIT MANUALLY - Regenerate with: ./generate-manifest.sh
33
#
4-
# Schema Documentation: docs/MANIFEST_SCHEMA.md
5-
# Version: 1.0.0
4+
# Documentation: docs/MANIFEST_SCHEMA.md
5+
# Version: 1.1.1
66

77
metadata:
8-
version: "1.1.0"
9-
generated: "2026-01-16T12:00:00+01:00"
10-
generator: "manual"
8+
version: "1.1.1"
9+
generated: "2026-01-17T20:14:50+01:00"
10+
generator: "generate-manifest.sh"
1111
total_scripts: 4
1212
with_frontmatter: 4
1313

14-
# Categories organize scripts by purpose
14+
# Categories derived from directory structure
1515
categories:
1616
operations:
17-
description: "Maintenance, Validation & Backup Scripts"
17+
description: "Maintenance, Validation & Backup"
1818
path: "scripts/operations/"
1919
monitoring:
2020
description: "Health Check & Monitoring Scripts"
2121
path: "scripts/monitoring/"
22+
setup:
23+
description: "Installation & Setup Scripts"
24+
path: "scripts/setup/"
2225

2326
# Script Registry
24-
# Each script entry contains metadata extracted from YAML front-matter
2527
scripts:
2628
backup-example:
2729
path: "examples/demo-scripts/backup-example.sh"
28-
category: "operations"
30+
category: ""
2931
deployment: scheduled
3032
service: none
3133
status: active
3234
type: admin
3335
requires_root: true
3436

35-
monitoring-example:
36-
path: "examples/demo-scripts/monitoring-example.sh"
37-
category: "monitoring"
37+
deploy-example:
38+
path: "examples/demo-scripts/deploy-example.sh"
39+
category: ""
3840
deployment: manual
3941
service: none
4042
status: active
41-
type: check
42-
requires_root: false
43+
type: deploy
44+
requires_root: true
4345

4446
health-check:
4547
path: "examples/demo-scripts/health-check.sh"
46-
category: "monitoring"
48+
category: ""
4749
deployment: automated
4850
service: health-check.service
4951
status: active
5052
type: check
5153
requires_root: false
5254

53-
deploy-example:
54-
path: "examples/demo-scripts/deploy-example.sh"
55-
category: "operations"
55+
monitoring-example:
56+
path: "examples/demo-scripts/monitoring-example.sh"
57+
category: ""
5658
deployment: manual
5759
service: none
5860
status: active
59-
type: deploy
60-
requires_root: true
61+
type: check
62+
requires_root: false
63+

ssc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ ${BOLD}COMMANDS:${NC}
715715
${BOLD}LIST OPTIONS:${NC}
716716
-c, --category <name> Filter by category (production, operations, etc.)
717717
-s, --status <status> Filter by status (active, deprecated, unknown)
718-
-t, --type <type> Filter by type (cli-tool, library, helper, daemon)
718+
-t, --type <type> Filter by type (admin, report, diagnostic, library, helper, daemon)
719719
-p, --paths Show full paths
720720
-n, --limit <num> Limit output
721721
--search <term> Search by name

0 commit comments

Comments
 (0)