Skip to content

Commit f0da5b1

Browse files
authored
docs: add docs for remote-cache command (#453)
* docs: add docs for remote-cache command * changeset
1 parent 3b3e374 commit f0da5b1

File tree

2 files changed

+57
-12
lines changed

2 files changed

+57
-12
lines changed

.changeset/great-oranges-exist.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'rnef-docs': patch
3+
---
4+
5+
docs: add docs for remote-cache command

website/src/docs/cli.md

Lines changed: 52 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ The following options are available for all commands:
2424

2525
RNEF CLI uses a modular design where available commands depend on your configuration. The following commands are available by default for all configurations (these are internal commands that you typically won't need to run):
2626

27-
| Command | Description |
28-
| :------------ | :---------------------------------------------- |
29-
| `config` | Outputs autolinking config (from Community CLI) |
30-
| `fingerprint` | Calculates fingerprint for project or platform |
31-
| `clean` | Cleans various caches to free up disk space |
32-
| `help` | Displays help menu for a command |
27+
| Command | Description |
28+
| :------------- | :---------------------------------------------- |
29+
| `config` | Outputs autolinking config (from Community CLI) |
30+
| `fingerprint` | Calculates fingerprint for project or platform |
31+
| `clean` | Cleans various caches to free up disk space |
32+
| `help` | Displays help menu for a command |
33+
| `remote-cache` | Manage remote cache |
3334

3435
Additional commands for development, building, and running apps are provided by specialized plugins.
3536

@@ -211,7 +212,7 @@ Same as for `build:android` and:
211212

212213
### `rnef sign:android` Options
213214

214-
The `sign:android` command signs your Android app with a keystore, producing a signed APK file ready for distribution. It allows for replacing the JS bundle with a new version.
215+
The `sign:android <binaryPath>` command signs your Android app with a keystore, producing a signed APK file ready for distribution. It allows for replacing the JS bundle with a new version.
215216

216217
| Argument | Description |
217218
| :----------- | :------------------- |
@@ -230,8 +231,47 @@ The `sign:android` command signs your Android app with a keystore, producing a s
230231

231232
The `clean` command helps you free up disk space by removing various caches and temporary files from your React Native project. It can clean Android (Gradle), iOS (CocoaPods), Metro, Watchman, RNEF's own project caches, and package manager caches.
232233

233-
| Option | Description |
234-
| :----------------------------- | :---------------------------------------- |
235-
| `--include <string>` | Comma-separated list of caches to clean. Available options: `android`, `gradle`, `cocoapods`, `metro`, `watchman`, `npm`, `yarn`, `bun`, `pnpm`, `rnef` |
236-
| `--verify-cache` | Whether to verify the cache (currently only applies to npm cache) |
237-
| `--all` | Clean all available caches without interactive prompt |
234+
| Option | Description |
235+
| :------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------ |
236+
| `--include <string>` | Comma-separated list of caches to clean. Available options: `android`, `gradle`, `cocoapods`, `metro`, `watchman`, `npm`, `yarn`, `bun`, `pnpm`, `rnef` |
237+
| `--verify-cache` | Whether to verify the cache (currently only applies to npm cache) |
238+
| `--all` | Clean all available caches without interactive prompt |
239+
240+
### `rnef remote-cache` Actions and Options
241+
242+
The `remote-cache <action>` command provides utilities to interact with the remote build cache configured via your `remoteCacheProvider`. This is useful for inspecting, downloading, uploading, or deleting build artifacts stored remotely.
243+
244+
Available actions:
245+
246+
| Action | Description |
247+
| :------------------ | :--------------------------------------------------------------- |
248+
| `list` | Lists the latest artifact matching the specified criteria |
249+
| `list-all` | Lists all artifacts (optionally filtered by platform and traits) |
250+
| `download` | Downloads an artifact from remote cache to local cache |
251+
| `upload` | Uploads a binary to remote cache |
252+
| `delete` | Deletes artifacts from remote cache |
253+
| `get-provider-name` | Returns the name of the configured remote cache provider |
254+
255+
Actions have different options available:
256+
257+
| Option | Description |
258+
| :------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
259+
| `--json` | Output results in JSON format instead of human-readable format |
260+
| `--name <string>` | Full artifact name to operate on. Cannot be used with `--platform` or `--traits` |
261+
| `--all` | List or delete all matching artifacts (affects `list` and `delete` actions only) |
262+
| `--all-but-latest` | Delete all but the latest matching artifact (affects `delete` action only) |
263+
| `-p, --platform <string>` | Platform to target (`ios` or `android`). Must be used with `--traits` |
264+
| `-t, --traits <list>` | Comma-separated traits that construct the final artifact name. For Android: variant (e.g., `debug`, `release`). For iOS: destination and configuration (e.g., `simulator,Release`) |
265+
| `--binary-path <string>` | Path to the binary to upload (used with `upload` action) |
266+
267+
For example, to download remote cache for iOS simulator with Release configuration, you can use `remote-cache download` with `--name` option
268+
269+
```shell
270+
npx rnef remote-cache download --name rnef-ios-simulator-Release-abc123fbd28298
271+
```
272+
273+
or pass `--traits`, so you don't need to pass the fingerprint:
274+
275+
```shell
276+
npx rnef remote-cache download --platform ios --traits simulator,Release
277+
```

0 commit comments

Comments
 (0)