Giter VIP home page Giter VIP logo

dotenv_cli's Introduction

dotenv_cli

A zero-dependency command line tool, written in Rust, that loads environment variables from a .env file before running another command.

Installation

An official installation path is coming soon, along with release binaries for macOS and Linux. (Windows support will come a little bit later.) In the meantime, you can clone this repo and build using Cargo:

$ cargo build --release

You can then use the binary under target/release (and optionally rename it dotenv).

Usage

Create a .env file in the current working directory that contains environment variable key/value pairs. Something like this:

KEY1=some-value
KEY2=something-else

Then run your program via dotenv_cli:

$ dotenv your-program arg1 arg2 ...

.env file format

Each line of a .env file must contain one of the following:

  • Nothing (will be ignored)
  • A comment starting with #
  • A key/value pair, separated by an equals sign (like KEY=value)

Keys must only contain uppercase, alphanumeric ASCII characters, and cannot start with a number. Any whitespace found after the equals sign will be treated as part of the value.

Roadmap

This is a very early release, and not intented to be used in production yet. Major todo items (roughly in order):

  • Add an optional argument for specifying the path to the .env file you would like to use
  • Add binary releases and introduce an official installation path for each platform
  • Add tests
  • Add Windows support

dotenv_cli's People

Contributors

russiancow avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.