Skip to content

mikehardy/cli

This branch is 153 commits behind react-native-community/cli:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0bcdb73 · May 9, 2024
May 8, 2024
Dec 22, 2022
Feb 7, 2022
May 8, 2024
Apr 5, 2019
Apr 12, 2024
Mar 29, 2024
May 9, 2024
May 8, 2024
Sep 28, 2018
Jul 11, 2022
Oct 30, 2023
Jan 31, 2019
Mar 23, 2023
May 8, 2019
Apr 22, 2022
Dec 20, 2023
Mar 29, 2024
Sep 28, 2018
Mar 29, 2024
Jul 17, 2023
Nov 3, 2020
May 9, 2024
Apr 4, 2024
Sep 9, 2019
Apr 17, 2024

Repository files navigation

React Native CLI

Command line tools that ship with react-native in form of the @react-native-community/cli package.

It exposes react-native binary, so you can call yarn react-native or npx react-native directly from your project.

Build Status Version MIT License PRs Welcome Lean Core Extracted

Note: CLI has been extracted from core react-native as a part of "Lean Core" effort. Please read this blog post for more details.

Contents

Compatibility

Our release cycle is independent of react-native. We follow semver and here is the compatibility table:

@react-native-community/cli react-native
^14.0.0 ^0.75.0
^13.0.0 ^0.74.0
^12.0.0 ^0.73.0
^11.0.0 ^0.72.0
^10.0.0 ^0.71.0
^9.0.0 ^0.70.0
^8.0.0 ^0.69.0
^7.0.0 ^0.68.0
^6.0.0 ^0.65.0,^0.66.0,^0.67.0
^5.0.0 ^0.64.0
^4.0.0 ^0.62.0,^0.63.0
^3.0.0 ^0.61.0
^2.0.0 ^0.60.0
^1.0.0 ^0.59.0

Documentation

About

This monorepository contains tools and helpers for React Native projects in form of a Command Line Tool (or CLI). This CLI is used directly by the react-native package and is not intended for use directly. We update it independently of React Native itself.

Creating a new React Native project

Run the following command in your terminal prompt:

npx react-native@latest init MyApp

Usage in an existing React Native project

Once you're inside an existing project, a local react-native binary will be available for you to use. Feel free to use Yarn to call it directly.

Example running start command in terminal:

yarn react-native start
# or:
npx react-native start

You can also add npm scripts to call it with whichever package manager you use:

{
  "scripts": {
    "start": "react-native start"
  }
}

Updating the CLI

Warning

Please do it only if you need to. We don't recommend updating CLI independently of react-native as it may cause unexpected issues.

React Native CLI is a dependency of react-native, which makes it a transitive dependency of your project. You can overwrite the version independently of react-native by using resolutions field in your package.json:

{
  "resolutions": {
    "@react-native-community/cli": "VERSION",
    "@react-native-community/cli-clean": "VERSION",
    "@react-native-community/cli-config": "VERSION",
    "@react-native-community/cli-debugger-ui": "VERSION",
    "@react-native-community/cli-doctor": "VERSION",
    "@react-native-community/cli-link-assets": "VERSION",
    "@react-native-community/cli-platform-android": "VERSION",
    "@react-native-community/cli-platform-ios": "VERSION",
    "@react-native-community/cli-server-api": "VERSION",
    "@react-native-community/cli-tools": "VERSION",
    "@react-native-community/cli-types": "VERSION"
  }
}

Maintainers

Previously:

License

Everything inside this repository is MIT licensed.

About

React Native command line tools

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 93.2%
  • JavaScript 4.1%
  • Ruby 1.1%
  • HTML 0.5%
  • Java 0.5%
  • CSS 0.2%
  • Other 0.4%