A collection of system administration and development workflow scripts for macOS/Linux environments.
system-scripts/
βββ backups/ # Repository, task, and workspace backups
β βββ src/ # TypeScript backup implementations
β βββ __tests__/ # Jest unit tests
β βββ code/ # GitHub repository backup wrappers
β βββ todoist/ # Todoist backup wrapper
β βββ notion/ # Notion workspace Markdown export wrapper
β βββ standard-notes/ # Standard Notes plaintext backup wrapper
β βββ google-calendar/ # Google Calendar export wrapper
β βββ google-tasks/ # Google Tasks export wrapper
β βββ run-all.sh # Run all backups
βββ configuration/ # Machine-wide runtime tool settings
βββ git-scripts/ # Git repository utilities
βββ media-scripts/ # Photo library organization utilities
βββ tmux/ # Enhanced tmux session management
βββ README.md # This file
Comprehensive backup module for code repositories, Todoist tasks, Notion workspaces, browser bookmarks, Standard Notes, Google Calendars, and Google Tasks.
Code backups:
- Automated git operations (pull, push, status checking)
- Selective repository filtering
- Detailed logging and error handling
- Progress tracking and reporting
Todoist backup:
- Retrieves active tasks, projects, and labels via the Todoist REST API
- Creates timestamped zip archives
Notion export:
- Exports accessible pages and databases as Markdown
- Uses nested folders that mirror the workspace structure
- Creates timestamped zip archives
Brave bookmarks export:
- Converts Brave bookmarks to Netscape Bookmark File Format HTML
- Preserves folder hierarchy and basic metadata
- Creates dated HTML and JSON copies in the home directory
Chrome bookmarks export:
- Converts Google Chrome bookmarks to Netscape Bookmark File Format HTML
- Preserves folder hierarchy and basic metadata
- Creates dated HTML and JSON copies in the home directory
Standard Notes export:
- Backs up Standard Notes Plaintext Backups as Markdown
- Cleans filenames to lowercase kebab-case and removes identifier suffixes
- Preserves folder hierarchy and creates a dated zip archive
Google Calendar export:
- Exports all accessible calendars and their events via the Google Calendar API
- Expands recurring events into instances; optionally includes deleted events
- Creates timestamped zip archives
Google Tasks export:
- Exports all task lists and tasks via the Google Tasks API
- Includes completed, deleted, and hidden tasks (configurable)
- Creates timestamped zip archives
Key Features:
- β Intelligent repository detection
- β Git status validation before operations
- β Comprehensive logging system
- β Error handling and recovery
- β Progress indicators and reporting
- β Single command to run all backups
Utilities for managing multiple git repositories:
clone-all.sh- Clone all non-archived GitHub repos into~/Projectssync-all.sh- Find all git repos in a path and update their default branch
Typical workflow:
./git-scripts/clone-all.sh # clone missing repos
./git-scripts/sync-all.sh ~/Projects # pull latest for all repos
./backups/code/code-backup-local.sh # create a zip backupKey Features:
- β GitHub Clone: Fetches repo list from GitHub and clones missing projects
- β Automatic Detection: Identifies default branch (main/master/HEAD)
- β Safe Updates: Skips repositories with uncommitted changes
- β Recursive Discovery: Finds all git repos within a given path
- β Clean Fetch: Prunes deleted remote branches during fetch
Tools for organizing exported photo libraries:
flatten-photos.sh- Flatten nested Google Photos takeout folders, remove empty directories, and delete supplemental.jsonmetadata
Typical workflow:
./media-scripts/flatten-photos.sh --dry-run "$HOME/Pictures/Mobile Photos"
./media-scripts/flatten-photos.sh "$HOME/Pictures/Mobile Photos"Key Features:
- β Moves all nested files into a single target directory
- β Skips duplicate content using SHA-256 hashes
- β Resolves remaining filename collisions automatically
- β Removes duplicate content already present in the target directory
- β Removes empty subdirectories after flattening
- β
Deletes Google Photos supplemental
.jsonmetadata by default - β Dry-run mode for safe previews
Applies consistent package-manager cooldown settings on a machine:
runtime-configurations.shβ 7-day minimum release age for Bundler, npm, pip, and uv
Key Features:
- β
Creates or updates config files under
$HOME - β Only raises values below the target; never downgrades existing settings
- β
Writes
.bakbackups when updating files in place - β Idempotent: safe to run repeatedly
Enhanced tmux session management following bash and tmux best practices:
Core Scripts:
setup-main.sh- General-purpose session with system monitoringsetup-dev.sh- Development-focused session with project toolssession-manager.sh- Comprehensive session managertmux-utils.sh- Shared utility functions
Key Features:
- β Bash Best Practices: Strict error handling, proper quoting, logging
- β Tmux Best Practices: Session management, window organization, split panes
- β Creative Workflows: Split panes, specialized windows, tool integration
- β Development Tools: Git, Docker, testing, database, and monitoring windows
- β Error Handling: Comprehensive validation and colored output
- β Logging: Timestamped logs with session-specific files
# Run all backups (code-local, code-gitlab, todoist, notion, bookmarks,
# standard-notes, google-calendar, google-tasks)
npm run backup:all
npm run backups
# Run individual backups
npm run backup:code-local
npm run backup:code-gitlab
npm run backup:todoist
npm run backup:notion
npm run backup:brave-bookmarks
npm run backup:chrome-bookmarks
npm run backup:standard-notes
npm run backup:google-calendar
npm run backup:google-tasksnpm test- home - Welcome screen with quick commands
- docs - Documentation workspace
- projects - Projects directory
- monitor - System monitoring (htop)
- tools - Development tools workspace
- dev-home - Development welcome screen
- project - Active project with split panes (code + logs)
- git - Git/version control workspace
- docker - Docker containers management
- test - Testing and CI workspace
- db - Database and backend tools
- logs - Logs and monitoring
- bash 4.0+ (for enhanced features)
- tmux (for session management)
- git (for code backup)
- macOS/Linux environment
All scripts include comprehensive logging:
~/.tmux-session-*.log- Tmux session logsbackups/logs/- Backup operation logs- Colored output for better visibility
- Timestamped entries with context
- Modify window layouts in the respective setup scripts
- Add custom commands and working directories
- Customize status bar appearance
- Add new specialized windows
- Configure tokens and options in
.env - Adjust backup schedules and options
- Customize logging and reporting
- Backups Documentation
- Configuration Documentation
- Git Scripts Documentation
- Media Scripts Documentation
- Tmux Scripts Documentation
When modifying scripts:
- Follow bash best practices (
set -euo pipefail, proper quoting) - Maintain comprehensive error handling
- Update documentation and logging
- Test with different scenarios
- Keep consistent code style
See LICENSE file for details.