with-env-config
v1.0.2
Published
`with-env-config` is a simple CLI designed to simplify the configuration of environment variables for applications using popular services like Sentry, Stripe, Supabase, and RevenueCat.
Readme
with-env-config
with-env-config is a simple CLI designed to simplify the configuration of environment variables for applications using popular services like Sentry, Stripe, Supabase, and RevenueCat.
It supports multiple frameworks (Next.js, Expo, and generic projects) and allows users to generate env files tailored for different environments (local, staging, production).
Features
- Framework Support: Configures environment variables for Next.js, Expo, or generic projects.
- Service Integration: Supports configuration for:
- RevenueCat (In-app Purchases)
- Sentry (Error tracking)
- Stripe (Payments)
- Supabase (Database-as-a-Service)
- Environment Management: Generate
.envfiles for local, staging, and production environments. - Interactive Setup: Uses the
inquirerlibrary
Usage
To use with-env-config, you can run npx with-env-config from your terminal (inside the folder where your project exists) and follow the prompts.
The tool will prompt you with the following steps:
- Framework Selection: Choose the framework your project uses (Next.js, Expo, or none). This is used to prefix the appropriate public prefix to variables according to framework standards.
- Service Selection: Select the services you want to configure.
- Environment Selection: Choose the environment for which to generate the
.envfile. - Confirmation: Confirm that you want to write the configuration to the selected
.envfile.
Notes from the developer
- Variables are internally marked with
is_public(boolean). Those which are marked as true will have the framework-specific public prefix applied. Others, such assentry auth token, do not have this flag, so will not be marked as public. - This tool doesn't do any framework-specific integrations (e.g. Expo
app.config.js) of variables
