From e3dbff724333b5ad77a6627b291a9128d9b0651e Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Thu, 11 Jun 2026 12:57:10 +0100 Subject: [PATCH] Revise README, symlink to main package --- README.md | 143 +---------------------------------------- packages/cli/README.md | 84 ++++++++++++++++++++++-- 2 files changed, 81 insertions(+), 146 deletions(-) mode change 100644 => 120000 README.md diff --git a/README.md b/README.md deleted file mode 100644 index 62417ce45..000000000 --- a/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# React Native Community CLI - -Command line tools that help you build apps with [`react-native`](https://github.com/facebook/react-native), shipped as the `@react-native-community/cli` NPM package. - -[![Build Status][build-badge]][build] [![Version][version-badge]][package] [![MIT License][license-badge]][license] [![PRs Welcome][prs-welcome-badge]][prs-welcome] [![Lean Core Extracted][lean-core-badge]][lean-core] - -_Note: CLI has been extracted from core `react-native` as a part of "[Lean Core](https://github.com/facebook/react-native/issues/23313)" effort. Please read [this blog post](https://www.callstack.com/blog/the-react-native-cli-has-a-new-home) for more details._ - -## Contents - -- [Compatibility](#compatibility) -- [Documentation](#documentation) -- [About](#about) -- [Creating a new React Native project](#creating-a-new-react-native-project) -- [Usage in an existing React Native project](#usage-in-an-existing-react-native-project) -- [Updating the CLI](#updating-the-cli) -- [Maintainers](#maintainers) -- [License](#license) - -## Compatibility - -Our release cycle is independent of `react-native`. We follow semver and here is the compatibility table: - -| `@react-native-community/cli` | `react-native` | -| ------------------------------------------------------------------ | ------------------------- | -| [^20.0.0](https://github.com/react-native-community/cli/tree/main) | ^0.81.0, ^0.82.0, ^0.83.0, ^0.84.0, ^0.85.0 | -| [^19.0.0](https://github.com/react-native-community/cli/tree/19.x) | ^0.80.0 | -| [^18.0.0](https://github.com/react-native-community/cli/tree/18.x) | ^0.79.0 | -| [^15.0.0](https://github.com/react-native-community/cli/tree/15.x) | ^0.76.0, ^0.77.0, ^0.78.0 | -| [^14.0.0](https://github.com/react-native-community/cli/tree/14.x) | ^0.75.0 | -| [^13.0.0](https://github.com/react-native-community/cli/tree/13.x) | ^0.74.0 | -| [^12.0.0](https://github.com/react-native-community/cli/tree/12.x) | ^0.73.0 | -| [^11.0.0](https://github.com/react-native-community/cli/tree/11.x) | ^0.72.0 | -| [^10.0.0](https://github.com/react-native-community/cli/tree/10.x) | ^0.71.0 | -| [^9.0.0](https://github.com/react-native-community/cli/tree/9.x) | ^0.70.0 | -| [^8.0.0](https://github.com/react-native-community/cli/tree/8.x) | ^0.69.0 | -| [^7.0.0](https://github.com/react-native-community/cli/tree/7.x) | ^0.68.0 | -| [^6.0.0](https://github.com/react-native-community/cli/tree/6.x) | ^0.65.0,^0.66.0,^0.67.0 | -| [^5.0.0](https://github.com/react-native-community/cli/tree/5.x) | ^0.64.0 | -| [^4.0.0](https://github.com/react-native-community/cli/tree/4.x) | ^0.62.0,^0.63.0 | -| [^3.0.0](https://github.com/react-native-community/cli/tree/3.x) | ^0.61.0 | -| [^2.0.0](https://github.com/react-native-community/cli/tree/2.x) | ^0.60.0 | -| [^1.0.0](https://github.com/react-native-community/cli/tree/1.x) | ^0.59.0 | - -## Documentation - -- [configuration](./docs/configuration.md) -- [commands](./docs/commands.md) -- [plugins](./docs/plugins.md) -- [init](./docs/init.md) -- [autolinking](./docs/autolinking.md) - -## 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: - -```sh -npx @react-native-community/cli@latest init MyApp -``` - -## Usage in an existing React Native project - -Once you're inside an existing project, you can run a series of commands to interact with your projects by using the `rnc-cli` binary. - -Example running `start` command in terminal: - -```sh -yarn rnc-cli start -``` - -You can also add npm scripts to call it with whichever package manager you use: - -```json -{ - "scripts": { - "start": "rnc-cli start" - } -} -``` - -to call it as - -```sh -yarn 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`: - -```json -{ - "resolutions": { - "@react-native-community/cli": "VERSION", - "@react-native-community/cli-clean": "VERSION", - "@react-native-community/cli-config": "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 - -- Michał Pierzchała ([**@thymikee**](https://github.com/thymikee)) - [Callstack](https://callstack.com) -- Alex Hunt ([**@huntie**](https://github.com/huntie)) - [Meta](https://meta.com) - -Previously: - -- Szymon Rybczak ([**@szymonrybczak**](https://github.com/szymonrybczak)) -- Mike Grabowski ([**@grabbou**](https://github.com/grabbou)) - [Callstack](https://callstack.com) -- Kacper Wiszczuk ([**@esemesek**](https://github.com/esemesek)) - [Callstack](https://callstack.com) -- Adam Trzciński ([**@adamTrz**](https://github.com/adamTrz)) - [Callstack](https://callstack.com) - -## License - -Everything inside this repository is [MIT licensed](./LICENSE). - - - -[build-badge]: https://img.shields.io/github/actions/workflow/status/react-native-community/cli/test.yml?branch=main&style=flat-square -[build]: https://github.com/react-native-community/cli/actions/workflows/test.yml -[version-badge]: https://img.shields.io/npm/v/@react-native-community/cli.svg?style=flat-square -[package]: https://www.npmjs.com/package/@react-native-community/cli -[license-badge]: https://img.shields.io/npm/l/@react-native-community/cli.svg?style=flat-square -[license]: https://opensource.org/licenses/MIT -[prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square -[prs-welcome]: http://makeapullrequest.com -[lean-core-badge]: https://img.shields.io/badge/Lean%20Core-Extracted-brightgreen.svg?style=flat-square -[lean-core]: https://github.com/facebook/react-native/issues/23313 diff --git a/README.md b/README.md new file mode 120000 index 000000000..e3942dd4e --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +./packages/cli/README.md \ No newline at end of file diff --git a/packages/cli/README.md b/packages/cli/README.md index 09780d1a5..38bb71807 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -1,7 +1,83 @@ -# React Native CLI +# React Native Community CLI -Command line tools to interact with React Native projects. +[![npm package](https://img.shields.io/npm/v/@react-native-community/cli?label=latest%20stable)](https://www.npmjs.com/package/@react-native-community/cli) -This package contains source code for `@react-native-community/cli`, the actual CLI that comes bundled with React Native. You don't need to install it separately in your project. +Command line tools for building apps with [React Native](https://reactnative.dev), shipped as the `@react-native-community/cli` npm package. -See the [list of available commands](../../docs/commands.md). +See also the [Community Template](https://github.com/react-native-community/template). + +## Docs + +- [Initializing a new project](https://github.com/react-native-community/cli/tree/main/docs/init.md) +- [Configuration](https://github.com/react-native-community/cli/tree/main/docs/configuration.md) +- [Commands](https://github.com/react-native-community/cli/tree/main/docs/commands.md) +- [Plugins](https://github.com/react-native-community/cli/tree/main/docs/plugins.md) +- [Autolinking](https://github.com/react-native-community/cli/tree/main/docs/autolinking.md) + +## Compatibility + +Our release cycle is independent of `react-native`. + +> [!Warning] +> **Important**: `@react-native-community/cli` is designed to work with specific `react-native` versions. We do not recommend updating CLI independently, as it may cause unexpected issues. + +| `@react-native-community/cli` | `react-native` | +| ------------------------------------------------------------------ | ------------------------- | +| [^20.0.0](https://github.com/react-native-community/cli/tree/main) | ^0.81.0, ^0.82.0, ^0.83.0, ^0.84.0, ^0.85.0 | +| [^19.0.0](https://github.com/react-native-community/cli/tree/19.x) | ^0.80.0 | +| [^18.0.0](https://github.com/react-native-community/cli/tree/18.x) | ^0.79.0 | +| [^15.0.0](https://github.com/react-native-community/cli/tree/15.x) | ^0.76.0, ^0.77.0, ^0.78.0 | + +[Previous versions](https://github.com/react-native-community/cli/blob/b26aa65/README.md) + +## Creating a new React Native project + +Run the following command in your terminal prompt: + +```sh +npx @react-native-community/cli@latest init MyApp +``` + +See more options for the `init` command [here](https://github.com/react-native-community/cli/blob/main/docs/init.md). + +## Usage in an existing React Native project + +Once installed, you can run commands to interact with your projects by using the `rnc-cli` binary. + +Example running `start` command in terminal: + +```sh +yarn rnc-cli start +``` + +You can also add npm scripts to call it with whichever package manager you use: + +```json +{ + "scripts": { + "start": "rnc-cli start" + } +} +``` + +to call it as + +```sh +yarn start +``` + +## Maintainers + +- Michał Pierzchała ([**@thymikee**](https://github.com/thymikee)) - [Callstack](https://callstack.com) +- Alex Hunt ([**@huntie**](https://github.com/huntie)) - [Meta](https://meta.com) + +Previously: + +- Szymon Rybczak ([**@szymonrybczak**](https://github.com/szymonrybczak)) +- Mike Grabowski ([**@grabbou**](https://github.com/grabbou)) - [Callstack](https://callstack.com) +- Kacper Wiszczuk ([**@esemesek**](https://github.com/esemesek)) - [Callstack](https://callstack.com) +- Adam Trzciński ([**@adamTrz**](https://github.com/adamTrz)) - [Callstack](https://callstack.com) + +## License + +Everything inside this repository is [MIT licensed](./LICENSE).