0.4.1 • Published 8 months ago

@typedotenv/cli v0.4.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

@typedotenv/cli

CLI tool for typedotenv

read more

Setup

npm install --save-dev @typedotenv/cli

package.json

{
  "scripts": {
    "generate": "typedotenv generate -e production src/env.ts"
  }
}

Usage

typedotnev generate

Generate TypeScript code from .env .

typedotenv check

Check if TypeScript code is up to date.

It is also useful to compare TS for development with .env for production.

Options

Arguments:
  output-file                   Destination of TypeScript file (default:
                                "env.ts")

Options:
  -i --input <env_filepath>      .env file (e.g. .env.development)
  -e --env <environment>         .env file suffix (e.g. production ->
                                 .env.production)
  -d --dir <envfile_directory>   .env file directory path [default:CWD]
  --env-object <object>          Object provide env variable
                                 [default:process.env]
  --enable-type-assertion        Disable type assertion (`as string`)
  --disable-type-check           Disable runtime type-check
  --access-from-index-signature  Access from index signature
  --allow <allow_key>            Allow keys (If you specify this, you won't be
                                 able to use other keys) (default: [])
  --deny <deny_key>              Deny keys (default: [])
  --required <required_key>      Required keys (default: [])
0.4.1

8 months ago

0.4.0

8 months ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago