Skip to content

See the shared secrets

$ grim secrets:list

Some credentials belong to the team, not to a project: the key of a geolocation service, a maps token, the account every shop sends its test mail through. The registry keeps them once, and grim install writes them into the .env of each project it sets up. grim secrets:list is how you find out what is in there, before you add a duplicate under a slightly different name, or when a fresh project has a variable you did not put there.

Usage

$ grim secrets:list        # keys and descriptions, no values

It runs from anywhere and needs a login from grim auth:login. Inside a project whose grim.json sets registry_url, it asks that registry instead of the default one.

Arguments and options

List shared secrets from the GRIM registry

Usage

grim secrets:list

What it actually does

  1. Asks the registry for the list, with the token grim auth:login stored.
  2. Prints a count, such as 3 shared secrets, then one row per secret: the key and the description it was stored with.

With nothing stored it prints No shared secrets configured. and exits cleanly. Values are not in the answer at all, so there is no flag that reveals them. The only way a value reaches a disk is grim install writing it into a project's .env.

Pitfalls

Logged in does not mean allowed

Failed to fetch secrets: HTTP 403 Forbidden means the registry knows you and your account has no access to shared secrets. Ask whoever administers the registry. Not authenticated. Run `grim auth:login` first. means there is no stored token at all.

A stored token can still be refused

A token that expired or belongs to another account gives HTTP 401 Unauthorized, followed by a short diagnosis of the stored login and a direct probe of GitHub with it. Run grim auth:login again.

After it finishes

Nothing has changed anywhere. To add or replace a secret use grim secrets:set; to remove one, grim secrets:delete.

Recipes that use it