#env-var #expo #env-file #eas #local-file #json-file #expo-cli

app eas-env

A simple CLI tool to manage environment variables for Expo projects

5 releases

0.2.2 Apr 19, 2024
0.2.1 Mar 25, 2024
0.2.0 Mar 24, 2024
0.1.1 Mar 24, 2024
0.1.0 Mar 23, 2024

#405 in Command line utilities

Download history 49/week @ 2024-07-22 108/week @ 2024-07-29 95/week @ 2024-08-05 59/week @ 2024-08-12 81/week @ 2024-08-19 74/week @ 2024-08-26 57/week @ 2024-09-02 25/week @ 2024-09-09 89/week @ 2024-09-16 76/week @ 2024-09-23 103/week @ 2024-09-30 108/week @ 2024-10-07 122/week @ 2024-10-14 94/week @ 2024-10-21 124/week @ 2024-10-28 102/week @ 2024-11-04

443 downloads per month

MIT license

8KB
124 lines

Installation

Cargo

You will need to install rust and cargo to run this cli. You can do so by following the instructions here.

cargo install eas-env

CURL

curl -sSL https://raw.githubusercontent.com/corasan/eas-env/main/install.sh | bash

Releases

Download the latest release from the releases page and add it to your path.

Usage

By default, the program will use the default profile in your eas.json. You can specify a different environment by passing the profile as an argument. Note that this needs to be run in the root of your project and you will need to add your environment variables to the EAS profile.

eas-env
# creates .env.local file using default profile

eas-env -p production
# creates .env.local file using production profile

You can also specify the path to the app's directory where the eas.json file is located, useful if the project is in a monorepo. The default path is the current directory where the command is run.

eas-env --app-dir apps/mobile
# creates .env.local file using default profile inside apps/mobile directory

To make things easier you can add it to your package.json:

{
  "scripts": {
    "env:dev": "eas-env -p development",
    "env:prod": "eas-env -p production",
    "env:preview": "eas-env -p preview",
  }
}

Then you can run npm run env to create the .env.local file with the default profile.

Dependencies

~2–13MB
~97K SLoC