A collection of developer scripts and shell utilities to boost productivity and streamline development workflows.
Part of the OSA (Open Source Automation) ecosystem by VirtualizeLLC.
OSA Scripts provides a modular collection of zsh aliases, functions, and plugins designed to enhance your development experience across various tools and platforms. Each script is carefully crafted to automate common tasks, reduce repetitive typing, and improve overall productivity.
- Profile-Based Loading: Scripts are loaded conditionally based on your OSA profile configuration
- Modular Architecture: Each script focuses on specific tools or workflows (Git, Node.js, Docker, React Native, etc.)
- macOS Optimized: Includes Mac-specific utilities for Xcode, Android development, eGPU management, and more
- Version Manager Support: Integrations for nvm, fnm, rbenv, pyenv, jenv, and direnv
- Developer Aliases: Time-saving shortcuts for npm, yarn, git, and common development tasks
These scripts work with the OSA configuration system.
- Use OSA: Install and run
osa setupto automatically configure your environment - Or Manual Setup: Source
entry.zshin your shell profile and generate a~/.osa-configfile
Scripts are loaded based on boolean flags in ~/.osa-config. Key configuration values:
# Core components
OSA_CONFIG_COMPONENTS_GIT=true # Git aliases
OSA_CONFIG_COMPONENTS_NODE=true # Node.js tools
OSA_CONFIG_COMPONENTS_HOMEBREW=true # Homebrew utilities
# Development tools
OSA_CONFIG_RUNTIMES_NODE_ENABLED=true # Node runtime management
OSA_CONFIG_SNIPPETS_OSASNIPPETS_REACT_NATIVE=true # React Native tools
OSA_CONFIG_SNIPPETS_OSASNIPPETS_ANDROID=true # Android developmentSee the OSA repository for complete configuration options.
Key scripts designed to boost developer productivity:
rmAsync - Asynchronous Bulk File Deletion
- Problem Solved: Unblocks developers instantly when deleting massive directories (node_modules, build artifacts, etc)
- How It Works: Moves files to a staging area and deletes them in the background, returning control immediately
- Usage:
rmAsync node_modulesorrmAsync src/**/*.tmp build/* - Benefits: No filesystem blocking on large deletions; instant command return; automatic cleanup
- Perfect For: React/Node projects, build systems, dependency management
xcwo - Smart Xcode Workspace Opener
- Problem Solved: Quick access to Xcode workspace without remembering directory structure
- How It Works: Automatically finds and opens
.xcworkspacein current or ios/ subdirectory - Usage:
xcwo - Benefits: Saves time in React Native development workflows
purgeallbuilds - Clear Xcode Cache
- Aliases: Instantly clears all Xcode derived data to fix mysterious build issues
- Usage:
purgeallbuilds
chrome-cors & chrome-cors-https - CORS-Disabled Chrome Instances
- Problem Solved: Launch Chrome without CORS restrictions for local development
- Usage:
chrome-corsorchrome-cors-https - Perfect For: API testing, frontend development, HTTPS localhost testing
rn-fix - Complete React Native Reset
- Clears: Node modules, watchman, temp files, cache
- Usage:
rn-fix - Saves Time: 5-10 minutes of manual cleanup per fix
rnios / rnra - iOS/Android Launch Shortcuts
- Usage:
rnios(iOS) orrnra(Android) - Benefit: Fewer keystrokes, faster iteration
react-native / rn - Shorthand aliases
- Auto-detects lock files (yarn.lock, package-lock.json) for correct package manager
- Usage:
rn run-ios,rn run-android
osa copilot audit-auto-approve - Audit GitHub Copilot Auto-Approve Tasks
- Problem Solved: Ensures VSCode Copilot autoApproveTasks only contain safe patterns and blocks dangerous commands
- Security Guards: Blocks rm -rf, directory traversal (..), privilege escalation (sudo), system operations, and more
- How It Works: Scans VSCode user settings (~/.vscode/settings.json) and workspace settings (.vscode/settings.json) for risky auto-approve patterns
- Usage:
osa copilot audit-auto-approve [--allow-prefix <prefixes>] [--settings-file <path>] [--scan-prefixes] [--fail-on-risk] [--json] - Options:
--allow-prefix: Optional comma-separated allowed prefixes for safe Gradle tasks (auto-scans if not provided)--settings-file: Optional path to specific VSCode settings.json (searches user & workspace by default)--scan-prefixes: Auto-scan and report health of all prefixes found--fail-on-risk: Exit with error if risky patterns found--json: Output results in JSON format
- Risky Patterns Blocked: rm -rf (with dangerous paths), directory traversal, sudo, system commands, eval/exec, dangerous globs
- Safe rm -rf targets: node_modules, build, dist, .next, .cache, temp directories
- Perfect For: Security auditing, CI/CD pipelines, team policy enforcement
- Faster Command Execution: Aliases reduce typing and memorization overhead
- Consistent Workflows: Standardized commands across team members
- Environment Automation: Automatic tool initialization (version managers, path setup)
- Error Reduction: Pre-configured commands reduce syntax errors
- Quick Navigation: Smart directory shortcuts and git navigation helpers
This is part of the OSA project. For contributions, issues, or feature requests, please visit the main OSA repository.
See the main OSA repository for license information.