{"id":17383717,"url":"https://github.com/obidosdev/rn-utils","last_synced_at":"2025-04-15T10:06:28.097Z","repository":{"id":35033621,"uuid":"198409789","full_name":"ObidosDev/rn-utils","owner":"ObidosDev","description":"Bash scripts for React-Native developers","archived":false,"fork":false,"pushed_at":"2023-03-04T04:30:36.000Z","size":112,"stargazers_count":15,"open_issues_count":3,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-15T10:06:04.987Z","etag":null,"topics":["bash","react-native","rn-bash-utils","rn-utils","shell-scripts","terminal"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ObidosDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-23T10:41:14.000Z","updated_at":"2025-01-21T16:37:25.000Z","dependencies_parsed_at":"2024-10-16T07:53:41.391Z","dependency_job_id":null,"html_url":"https://github.com/ObidosDev/rn-utils","commit_stats":{"total_commits":40,"total_committers":4,"mean_commits":10.0,"dds":0.55,"last_synced_commit":"db9888b2b8067e2a0a308774f8a1c36813b7d7c0"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObidosDev%2Frn-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObidosDev%2Frn-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObidosDev%2Frn-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObidosDev%2Frn-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ObidosDev","download_url":"https://codeload.github.com/ObidosDev/rn-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249048738,"owners_count":21204306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","react-native","rn-bash-utils","rn-utils","shell-scripts","terminal"],"created_at":"2024-10-16T07:43:35.454Z","updated_at":"2025-04-15T10:06:28.079Z","avatar_url":"https://github.com/ObidosDev.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React native utils\n\n[![](https://img.shields.io/npm/v/rn-bash-utils.svg)](https://www.npmjs.com/package/rn-bash-utils)\n[![](https://img.shields.io/github/stars/ObidosDev/rn-utils.svg)](https://github.com/ObidosDev/rn-utils/stargazers)\n[![](https://img.shields.io/github/forks/ObidosDev/rn-utils.svg)](https://github.com/ObidosDev/rn-utils/network/members)\n[![](https://img.shields.io/github/issues/ObidosDev/rn-utils.svg)](https://github.com/ObidosDev/rn-utils/issues)\n\nThis is package with useful bash scripts for React-Native developers.\u003cbr/\u003e\nIt will eliminate the need of cheatsheet with different scripts for any actions with a project from terminal.\u003cbr/\u003e\nAlso it will simplify some usual activities with a project.\n\n###### Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [General scripts](#general-scripts)\n  - [clear](#clear)\n- [iOS](#ios)\n  - [remove-derived-data](#remove-derived-data)\n- [Android](#android)\n  - [reverse](#reverse)\n  - [assemble-release](#assemble-release)\n  - [install-apk-release](#install-apk-release)\n  - [bundle-release](#bundle-release)\n  - [install-bundle-release](#install-bundle-release)\n\n## Installation\n\n```shell\nnpm install -g rn-bash-utils\n```\n\nAfter installation you should relaunch your terminal to enable autocompletion.\n\n---\n\n## Usage\n\nFrom `ROOT` of the React-Native project you can run all scripts.\n\n```shell\n# Platform specific script\n# \u003cname_of_the_tool\u003e \u003cplatform OR name_of_general_script\u003e \u003cname_of_platform_specific_script\u003e\nrn-utils android reverse\n\n# General script\n# \u003cname_of_the_tool\u003e \u003cname_of_general_script\u003e\nrn-utils clear\n```\n\n## General scripts\n\n### clear\n\n```shell\nrn-utils clear\n```\n\n- Clear watchman watches;\n- Delete the `node_modules` folder;\n- `npm/yarn` install `node_modules` (depends on lock file);\n- Install `pod`s if need;\n- Reset Metro Bundler cache;\n- Remove haste cache.\n\n---\n\n## iOS\n\n### remove-derived-data\n\n```shell\nrn-utils ios remove-derived-data\n```\n\nRemoving `Derived data` folder.\n\n---\n\n## Android\n\n### reverse\n\n```shell\nrn-utils android reverse\n```\n\nCalls the method `adb -s \u003cdevice\u003e reverse tcp:\u003cport\u003e tcp:\u003cport\u003e`. \u003cbr/\u003e\nIt allow to choose one of devices attached and enter port.\n\nLinks:\n\n1. [React Native: Connecting to the development server](https://facebook.github.io/react-native/docs/running-on-device#connecting-to-the-development-server-1)\n\n---\n\n### assemble-release\n\n```shell\nrn-utils android assemble-release\n```\n\n- Remove `android/build` and `android/app/build` folders;\n- Calls the method `android/gradlew assembleRelease`;\n- Copy apk to root of the project (file `app-release.apk`).\n\n---\n\n### install-apk-release\n\n```shell\nrn-utils android install-apk-release\n```\n\nCalls the method `adb install` with file `android/app/build/outputs/apk/release/app-release.apk` (Generated after `gradlew assembleRelease`).\n\n---\n\n### bundle-release\n\n```shell\nrn-utils android bundle-release\n```\n\n- Remove `android/build` and `android/app/build` folders;\n- Calls the method `android/gradlew bundleRelease`;\n- Copy bundle (.aab) to root of the project (file `app.aab`).\n\n---\n\n### install-bundle-release\n\n```shell\nrn-utils android install-bundle-release\n```\n\nIt uses values from `gradle.properties` for signing.\n\n- Calls the method `bundletool build-apks`\n- Generated .apks file is `./release_signed.apks`\n- Install apk on device with `bundletool install-apks`\n\n---\n\n## Author\n\nVitalii Obideiko, Mobile developer.\u003cbr/\u003e\n[![](https://img.shields.io/static/v1?label=Profile\u0026message=LinkedIn\u0026color=0077b5)](https://www.linkedin.com/in/obidosdev/)\u003cbr/\u003e\n[![](https://img.shields.io/static/v1?label=Profile\u0026message=GitHub\u0026color=333)](https://github.com/ObidosDev)\u003cbr/\u003e\n[![](https://img.shields.io/static/v1?label=Profile\u0026message=Facebook\u0026color=3C5A99)](https://www.facebook.com/ObidosDev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobidosdev%2Frn-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobidosdev%2Frn-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobidosdev%2Frn-utils/lists"}