https://github.com/mattrighetti/envelope Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} mattrighetti / envelope Public * Notifications You must be signed in to change notification settings * Fork 3 * Star 133 * A modern environment variables cli tool backed by SQLite 133 stars 3 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 1 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights mattrighetti/envelope This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 146 Commits .github/workflows .github/ workflows ci ci man man migrations migrations pkg/brew pkg/brew src src .editorconfig .editorconfig .gitignore .gitignore .rustfmt.toml .rustfmt.toml CHANGELOG.md CHANGELOG.md Cargo.lock Cargo.lock Cargo.toml Cargo.toml README.md README.md cog.toml cog.toml View all files Repository files navigation * README envelope envelope is a modern environment variables manager. A modern environment variables manager Usage: envelope [COMMAND] Commands: add Add environment variables to a specific environment check Check which environment is currently exported delete Delete environment variables drop Drop environment duplicate Create a copy of another environment export Export environment variables edit Edit environment variables in editor init Initialize envelope import Import environment variables list List saved environments and/or their variables help Print this message or the help of the given subcommand(s) Options: -h, --help Print help -V, --version Print version Install You can download the envelope binary in the latest release and copy the binary to a folder in your $PATH Building envelope is written in Rust, so you'll need the Rust compiler. To build envelope: $ git clone https://github.com/mattrighetti/envelope $ cd envelope $ cargo build --release $ ./target/release/envelope --version envelope 0.3.10 How it works envelope is a command line utility that leverages an SQLite database to keep track of your environment variables so you can easily switch between different configurations. Usage Pretty print Pipe .env files to envelope to get a pretty format representation of the file $ cat .env | envelope +-------------------+----------------------------------------------+ | VARIABLE | VALUE | +-------------------+----------------------------------------------+ | DATABASE_URL | postgres://user:password@localhost:5432/mydb | +-------------------+----------------------------------------------+ | SECRET_KEY | mysecretkey123 | +-------------------+----------------------------------------------+ | API_KEY | your_api_key_here | +-------------------+----------------------------------------------+ | DEBUG_MODE | true | +-------------------+----------------------------------------------+ | SMTP_HOST | smtp.example.com | +-------------------+----------------------------------------------+ | AWS_ACCESS_KEY_ID | your_access_key_id | +-------------------+----------------------------------------------+ Import Import from .env file $ envelope import dev .env $ envelope list dev API_KEY=your_api_key_here AWS_ACCESS_KEY_ID=your_access_key_id DATABASE_URL=postgres://user:password@localhost:5432/mydb DEBUG_MODE=true SECRET_KEY=mysecretkey123 SMTP_HOST=smtp.example.com It's also possible to import directly from stdin $ cat .env | envelope import prod List List env variables of a particular enviroment $ envelope list dev API_KEY=your_api_key ... SMTP_HOST=smtp.example.com Export Export environment variables to a .env file in current directory $ envelope export prod This will create a .env file containing all the variables that you have stored in your prod enviroment in envelope. This makes it easy to switch between different .env configurations, need to use the prod envs? Just run envelope export prod, want to switch to your dev ones? Run envelope export dev and everything will be handled for you, for free. You can also output to a specific file with the -o flag: $ envelope export prod -o .env.prod Add Add env variables to an environment $ envelope add local db_connection https://example.com $ envelope list local DB_CONNECTION=https://examples.com You can use lowercased variables, they will be uppercased by envelope Delete Delete entire environments from envelope $ envelope delete dev $ envelope list dev Envelope always soft deletes environment variables, they are never actually deleted, this is useful in case you want to take a look at the history of a certain valriable. You can however do a hard delete using the drop command Drop Drops (hard deletes) an environment $ envelope drop dev $ envelope list Check Checks which environment is currently active $ export $(envelope list dev) $ envelope check dev About A modern environment variables cli tool backed by SQLite Topics rust cli environment-variables Resources Readme Activity Stars 133 stars Watchers 2 watching Forks 3 forks Report repository Releases 15 0.3.10 Latest Jun 22, 2024 + 14 releases Contributors 2 * @mattrighetti mattrighetti Mattia Righetti * @NateEag NateEag Nate Eagleson Languages * Rust 96.0% * Shell 2.1% * Ruby 1.9% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.