dotenv

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2020 License: MPL-2.0 Imports: 5 Imported by: 0

README

dotenv

A cross-platform tool to run a command with environment variables loaded from a given .env file.

Example:

dotenv -f .env -- node server.js

Install

Mac, Linux:

curl -sS https://webinstall.dev/dotenv | bash

Windows 10:

curl -A MS https://webinstall.dev/dotenv | powershell

Usage

dotenv v1.0.0 (0000000) 2020-10-20T00:00:00Z

Usage:
    dotenv [-f .env.alternate] -- <command> [arguments...]"

  -f string
    	path to .env file (default ".env")
  -help
    	print usage and exit
  -version
    	print version and exit

Example:
    dotenv -f .env -- caddy run --config Caddyfile

Build

dotenv is written in Go, using github.com/joho/godotenv.

Install Go:

curl -sS https://webinstall.dev/golang | bash

(see https://webinstall.dev/golang for details)

Manually
export GOFLAGS="-mod=vendor"
go generate -mod=vendor ./...
go build -mod=vendor .
./dotenv --version
With GoReleaser

Install GoReleaser:

curl -sS https://webinstall.dev/goreleaser | bash
goreleaser --snapshot --skip-publish --rm-dist

License

Copyright 2020 The dotenv Authors.

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL