Common issues and solutions for Server Scripts CLI.
Error:
✗ yq is required but not installed
Solution:
# Snap (Recommended)
sudo snap install yq
# Or download binary
VERSION=v4.40.5
BINARY=yq_linux_amd64
wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY} -O yq
chmod +x yq
sudo mv yq /usr/local/bin/Verify:
yq --version
# Expected: yq (https://github.com/mikefarah/yq/) version v4.x.xError:
✗ Unsupported yq detected (expected mikefarah/yq v4+)
Cause: You have the Python yq wrapper instead of mikefarah's yq.
Solution:
# Remove Python yq
pip uninstall yq
# Install mikefarah/yq
sudo snap install yqError:
bash: ./ssc.sh: Permission denied
Solution:
chmod +x ssc.sh generate-manifest.shError:
✗ Manifest not found: manifest.yaml
Solution:
# Generate manifest
./generate-manifest.sh
# Verify
ls -lh manifest.yamlError:
✗ YAML syntax error - check manifest manually
Solution:
# Validate YAML manually
yq eval '.' manifest.yaml
# Regenerate from scratch
./generate-manifest.shProblem: ssc list shows fewer scripts than expected.
Causes & Solutions:
-
Missing Front-Matter:
# Add to your scripts # --- # deployment: manual # status: active # type: cli-tool # requires_root: false # ---
-
Scripts in Ignored Directories:
- Check:
.venv/,venv/,node_modules/,__pycache__/are excluded - Move scripts to
scripts/directory
- Check:
-
Wrong File Extension:
- Only
.shand.pyfiles are discovered - Rename:
script→script.sh
- Only
-
Regenerate Manifest:
./generate-manifest.sh --verbose
Error:
✗ Script not found: my-script
Solution:
# Search for similar names
ssc list --search my
# Regenerate manifest
./generate-manifest.sh
# Verify
ssc list --paths | grep my-scriptError:
✗ Script file not found: /path/to/script.sh
→ Manifest may be outdated - run: ssc generate
Solution:
# Regenerate manifest
./generate-manifest.sh
# Or fix path in script's locationError:
→ Script requires root privileges - using sudo
Solution:
# Run with sudo
sudo ssc run backup-example
# Or use sudo interactively
ssc run backup-example
# (ssc will auto-exec with sudo)Error:
⚠ Script is marked as DEPRECATED
✗ Use --force to run anyway
Solution:
# Force run deprecated script
ssc run --force old-scriptError:
⚠ Service not found
Causes:
- Service name typo in front-matter
- Service not installed on system
- Service name doesn't include
.servicesuffix
Solution:
# Check systemd services
systemctl list-units --type=service | grep backup
# Fix front-matter
# service: backup.service # Include .service suffixWarning:
⚠ No services found in manifest
Solution:
- Most scripts don't have associated services
- This is normal if you only have manual CLI scripts
- Add
service: <name>.serviceto front-matter for systemd-managed scripts
Error:
✗ Missing: scripts/old-script.sh (old-script)
✗ 5 missing files found
Solution:
# Regenerate manifest to remove stale entries
./generate-manifest.sh
# Or restore missing filesWarning:
⚠ 12 scripts have unknown status (missing front-matter)
Solution: Add YAML front-matter to scripts:
#!/bin/bash
# ---
# deployment: manual
# service: none
# status: active
# type: cli-tool
# requires_root: false
# ---Cause: Large manifest with many scripts.
Solution:
# Use filters to reduce output
ssc list --category operations
ssc list --status active --limit 50Cause: Many scripts in repository.
Solution:
- Normal for 500+ scripts (takes ~10 seconds)
- Use
--dry-runto preview without writing - Exclude large directories in
findcommand if needed
Enable verbose output:
# Manifest generation
./generate-manifest.sh --verbose
# Check yq availability
command -v yq && yq --version
# Validate manifest
yq eval '.' manifest.yaml | head -50
# List with full paths
ssc list --pathsIf issues persist:
-
Check Requirements:
bash --version # 4.0+ yq --version # v4.x.x
-
Validate Environment:
./generate-manifest.sh --dry-run --verbose ssc validate
-
File a Bug Report:
- GitHub Issues: https://github.com/fidpa/server-scripts-cli/issues
- Include:
ssc --version, error message, OS details