Teardown

CLI

Teardown CLI for React Native development.

The Teardown CLI (@teardown/cli) is a development toolkit for React Native apps. It handles project initialization, native code generation, and running your app on devices and simulators.

⚠️ Early Development - The Teardown SDKs and APIs are under active development. Expect frequent breaking changes. Not recommended for production apps.

Features

  • Project initialization - Bootstrap new React Native projects with best practices
  • Native code generation - Generate iOS and Android native projects from configuration
  • Plugin system - Extend your app with camera, location, biometrics, and more
  • Device management - Build and run on simulators and physical devices
  • Metro integration - Start the bundler with optimized settings

Installation

Install globally:

bun add -g @teardown/cli

Or use directly with npx:

npx @teardown/cli init MyApp

Quick Start

1. Initialize a New Project

teardown init MyApp
cd MyApp

This creates:

  • teardown.config.ts - App configuration
  • src/ - Source code with routes and components
  • Config files for Metro, Babel, and React Native

2. Generate Native Projects

teardown prebuild

Creates ios/ and android/ directories with native code.

3. Run on Device

# Run on iOS simulator
teardown run ios

# Run on Android emulator
teardown run android

Commands Overview

CommandDescription
initInitialize a new project
prebuildGenerate native iOS/Android projects
runBuild and run on device/simulator
devStart the Metro bundler
pluginsList and manage plugins
validateValidate configuration
upgradeUpgrade Teardown packages

Typical Workflow

# 1. Create new project
teardown init MyApp
cd MyApp

# 2. Configure plugins in teardown.config.ts
# (add camera, location, etc.)

# 3. Generate native code
teardown prebuild

# 4. Run on iOS
teardown run ios

# 5. Make changes, auto-reload
# (Metro handles hot reloading)

# 6. Add more native features
# (edit config, run prebuild again)

Requirements

  • Node.js 18+
  • Bun (recommended) or npm
  • Xcode (for iOS development)
  • Android Studio (for Android development)
  • CocoaPods (installed automatically if needed)

Next Steps