npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

heroku-config

v1.6.3

Published

Push and pull environment variables from a Heroku instance

Downloads

666

Readme

heroku-config

npm

Push and pull your Heroku configs to your local environment.

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

Project Status

This project is in maintenance mode. As Heroku no longer offers a free plan, I no longer use it and won't spend time enriching their ecosystem. That said, this project is mostly feature-complete. It's old and creaky, but has worked consistently for years.

I don't plan on adding any new features at this point, but will accept PRs for bugfixes if anything big comes up.

:warning: Disclaimer :warning:

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

As of version 1.6.0, the heroku-config supports modifying pipeline config variables with the --pipelie-name and --pipeline-stage flags.

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.