1.0.0 • Published 7 months ago
react-native-env-cli v1.0.0
React Native Environment CLI
A command-line interface tool for setting up and validating React Native development environments.
Features
- ✅ Environment validation
- 🔍 Version checking for required tools
- 🛠️ Automatic installation of missing dependencies
- 📱 Virtual device management
- 🔄 Environment variable verification
- 🍺 Homebrew integration
Installation
npm install -g react-native-env-cli
Usage
Run the CLI tool with:
setup-env
The tool will guide you through the following checks:
Version Check: Validates installed versions of required tools:
- Node.js
- npm
- Yarn
- Watchman
- Ruby
- CocoaPods
- Java
- Android Studio
- Xcode (macOS only)
Environment Variables: Verifies the presence and correctness of:
- ANDROID_HOME
- ANDROID_SDK_ROOT
- JAVA_HOME
Virtual Devices: Checks for available:
- Android Emulators
- iOS Simulators (macOS only)
Homebrew: Verifies Homebrew installation (macOS only)
Development
Prerequisites
- Node.js >= 18
- Bun (for development)
- TypeScript
Setup
- Clone the repository
- Install dependencies:
bun install
Available Scripts
bun run dev
- Watch mode for developmentbun run build
- Build the projectbun run test
- Run testsbun run lint
- Lint the codebun run format
- Format the codebun run link-cli
- Link the CLI locally for testing
Testing
The project uses Jest for testing. Run tests with:
bun run test
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
MIT License. See the LICENSE file for more details.
Dependencies
- chalk - Terminal string styling
- commander - Command-line interface
- inquirer - Interactive command line prompts
- envinfo - Environment information
- semver - Semantic version parsing
1.0.0
7 months ago