A collection of powerful shell scripts for system administration and management tasks.
Want to use syscraft disk snapshot ~ from anywhere? Here's the fastest way:
# 1. Build and install the CLI
make install-local
# 2. That's it! Now you can use:
syscraft disk snapshot ~
syscraft env list
syscraft cron listThe CLI automatically finds your shell scripts and provides a unified interface to all tools.
SysCraft provides three essential tools for Unix/Linux system administrators:
- DiskDiver: Track disk usage over time with snapshots and cleanup suggestions
- EnvSculpt: Manage environment variables across shell configurations
- CronCrafter: Visualize and edit cron jobs interactively
Track disk usage changes over time with automated snapshots and cleanup recommendations.
Features:
- Take disk usage snapshots at specified paths
- View usage history with ASCII charts
- Get cleanup suggestions for large/old files
- Automated snapshots via cron
Usage:
./diskdiver.sh snapshot [path] # Take snapshot (default: current dir)
./diskdiver.sh history [path] # Show usage trends
./diskdiver.sh clean [date] # Suggest cleanup from snapshot
./diskdiver.sh help # Show helpSetup auto-snapshots:
# Add to crontab for hourly snapshots
crontab -e
# Add: 0 * * * * /path/to/diskdiver.sh snapshot /path/to/monitorCentralized environment variable management across multiple shell configurations.
Features:
- List all environment variables with sources
- Add, edit, and delete variables
- Sync changes to shell config files
- Export to .env or JSON format
Usage:
./envsculpt.sh list # List all env vars
./envsculpt.sh add [name] [value] # Add new variable
./envsculpt.sh edit [name] # Edit existing variable
./envsculpt.sh delete [name] # Delete variable
./envsculpt.sh sync # Apply changes to shell configs
./envsculpt.sh export [format] # Export to .env or JSON
./envsculpt.sh help # Show helpInteractive cron job management with validation and simulation.
Features:
- List all cron jobs in table format
- Edit jobs with interactive prompts
- Validate cron syntax
- Simulate job run times
Usage:
./croncrafter.sh list # List all cron jobs
./croncrafter.sh edit [job_id] # Edit specific job
./croncrafter.sh simulate [job_id] # Simulate next runs
./croncrafter.sh help # Show help- OS: Unix/Linux/macOS
- Shell: Bash
- Dependencies:
du(disk usage)whiptail(optional, for better UI)jq(optional, for JSON export)
- Clone or download the scripts
- Make them executable:
chmod +x *.sh - Run from any directory or add to your PATH
The Go CLI provides a unified interface to all three tools with better command organization and help.
-
Install Go dependencies:
make deps
-
Build and install the CLI:
make install-local
This will install the CLI to
~/.local/binand automatically add it to your PATH. -
Usage (from anywhere in your system):
syscraft # Show main help syscraft disk # DiskDiver commands syscraft env # EnvSculpt commands syscraft cron # CronCrafter commands
Alternative installation methods:
- Quick build:
./build.sh(builds locally) - Global install:
make install(requires sudo, installs to/usr/local/bin) - Manual PATH: If
~/.local/binisn't in your PATH, addexport PATH="$HOME/.local/bin:$PATH"to~/.zshrc
Monitor disk usage in your home directory:
./diskdiver.sh snapshot ~
./diskdiver.sh history ~Manage environment variables:
./envsculpt.sh add JAVA_HOME /usr/lib/jvm/java-11
./envsculpt.sh syncEdit a cron job:
./croncrafter.sh list
./croncrafter.sh edit 0DiskDiver operations:
syscraft disk snapshot ~ # Take snapshot of home directory
syscraft disk history ~ # Show usage history
syscraft disk clean # Suggest cleanupEnvironment variable management:
syscraft env list # List all variables
syscraft env add JAVA_HOME /usr/lib/jvm/java-11
syscraft env sync # Apply changes
syscraft env export json # Export to JSONCron job management:
syscraft cron list # List all cron jobs
syscraft cron edit 0 # Edit job with ID 0
syscraft cron simulate 0 # Simulate job runsThe Go CLI is fully functional and tested:
- โ CLI built and installed globally
- โ All commands working from anywhere in the system
- โ Scripts automatically discovered and executed
- โ
No more
./prefix needed
You can now run syscraft disk snapshot ~ from any directory!
- DiskDiver snapshots:
~/.diskdiver/snapshots/ - EnvSculpt config:
~/.envsculpt - CronCrafter: Uses system crontab
Feel free to submit issues, feature requests, or pull requests to improve these tools.
Open source - use freely for personal and professional system administration tasks.
SysCraft: Crafting better system management, one script at a time. ๐