All Projects → xavdid → Heroku Config

xavdid / Heroku Config

[Utility] Push and pull heroku environment variables to your local env

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Heroku Config

Envied
Ensures presence and type of your app's ENV-variables (mirror)
Stars: ✭ 327 (+57.97%)
Mutual labels:  heroku, environment-variables
Semana Js Expert30
Aulas da Semana JS Expert 3.0 - Construindo um chat multiplataforma usando linha de comando e JavaScript Avançado
Stars: ✭ 238 (+14.98%)
Mutual labels:  heroku, npm
Dotnet Env
A .NET library to load environment variables from .env files
Stars: ✭ 195 (-5.8%)
Mutual labels:  environment-variables
Config
🛠 A configuration library for Go that parses environment variables, JSON files, and reloads automatically on SIGHUP
Stars: ✭ 203 (-1.93%)
Mutual labels:  environment-variables
Npm Windows Upgrade
🚀 Upgrade npm on Windows
Stars: ✭ 2,450 (+1083.57%)
Mutual labels:  npm
Corepack
Zero-runtime-dependency package acting as bridge between Node projects and their package managers
Stars: ✭ 196 (-5.31%)
Mutual labels:  npm
Webpack Static Html Pages
Webpack template/example with multiple static html pages
Stars: ✭ 202 (-2.42%)
Mutual labels:  npm
Emacs Direnv
direnv integration for emacs
Stars: ✭ 194 (-6.28%)
Mutual labels:  environment-variables
Java Getting Started
Getting Started with Java on Heroku
Stars: ✭ 206 (-0.48%)
Mutual labels:  heroku
Wordpress Heroku
This project is a template for installing and running WordPress 5.x on Heroku.
Stars: ✭ 198 (-4.35%)
Mutual labels:  heroku
Yuml Diagram
UML diagramming package based on the yUML syntax
Stars: ✭ 203 (-1.93%)
Mutual labels:  npm
React Demo Store
Moltin + React powered online store
Stars: ✭ 198 (-4.35%)
Mutual labels:  heroku
Icare
Open Source Carpooling Platform
Stars: ✭ 196 (-5.31%)
Mutual labels:  heroku
Env Var
Verification, sanitization, and type coercion for environment variables in Node.js
Stars: ✭ 201 (-2.9%)
Mutual labels:  environment-variables
100 Days Of Code Frontend
Curriculum for learning front-end development during #100DaysOfCode.
Stars: ✭ 2,419 (+1068.6%)
Mutual labels:  npm
Vuejs Rails Starterkit
Vue.js + Rails Starting Kit GitHub Template to develop Hybrid Mobile Application: https://vuejs-rails-starterkit.herokuapp.com
Stars: ✭ 205 (-0.97%)
Mutual labels:  heroku
React Native Dotenv
Load react native environment variables using import statements for multiple env files.
Stars: ✭ 190 (-8.21%)
Mutual labels:  environment-variables
Taro Listview
taro框架长列表方案 :集成下拉刷新、骨架屏、无限滚动、图片懒加载;
Stars: ✭ 197 (-4.83%)
Mutual labels:  npm
Dont Break
Checks if the current version of your package would break dependent projects
Stars: ✭ 200 (-3.38%)
Mutual labels:  npm
Idea Live Templates
My IntelliJ Live Templates
Stars: ✭ 207 (+0%)
Mutual labels:  heroku

heroku-config

npm Travis David

Push and pull your Heroku configs to your local environment.

Heavily inspired by ddollar's version, but using the new Heroku cli.

⚠️ Disclaimer ⚠️

Running this code has the potential to delete your configurations if misused.

Specifically, the -o flag will overwrite values at the destination. Only use that if the source has more up to date info and you're feeling brave. Otherwise, this merges configs and is fairly safe. Just thought you should know.

Also, the -c flag will delete values that didn't exist locally when you pushed. Only use it if you know that.

Usage

You can install the package by running

% heroku plugins:install heroku-config

This package includes two commands:

  • heroku config:pull: Writes the contents of heroku config into a local file
  • heroku config:push: Writes the contents of a local file into heroku config

Run heroku help config:pull and heroku help config:push to see a full list of flags.

File Format

There's a lot of flexibility when it comes to how you can format your file. Key capitalization can go either way and there can be spacing around the = on one, both, or neither side. There can also be a leading export if you want to use the same file to populate your local environment. Since Heroku runs on linux, variable names must conform to those valid in unix. If you want to use unsupported characters in your var names, run commands with the -e flag. There's also support both unix and windows-style newlines (though only one type per file).

Multiline variables are fine as long as they're surrounded by "

All of the following are valid lines:

#comment
NODE_ENV= test
source =local
job = programming

DB_STRING=mongo://[email protected]:4567
export THING=3
multiline="this can have
as many lines
# comments are still ignored
as it wants"

The following are all invalid lines:

 # comment with leading space
 bad_key=nono
key with-dash=andspace
multiline='bad because
it uses
single quotes'

Development

You'll need Node version >= 6.0. If you want to match exactly, check out the heroku cli's node version here. I like nvm for managing multiple node versions.

After cloning, follow these instructions to run locally! I welcome pull requests with fixes or new features.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].