monkeys

fill

Gives the first profile the keys it lacks, taking the secrets from the second. Two profiles of one project usually share most of their secrets, and the…

monkeys fill @profile --with @profile

Gives the first profile the keys it lacks, taking the secrets from the second. Two profiles of one project usually share most of their secrets, and the second is filled from the first:

monkeys fill @production --with @test
filled @production from @test: STRIPE_SECRET_KEY
kept 1 @production already had
still missing in @production: SENTRY_DSN

fill moves only the keys the target lacks and never touches a secret it already holds, so it is safe to run twice. It names every key it moved, since a production profile filled from test is a decision to see written down, and it exits non-zero while anything is still missing. No secret is printed.

Inside a project the keys are the ones the file lists for the target; elsewhere they are whatever the source holds. Either side may be another project's profile, @bar.test, which is how a secret shared by two projects is stored once and copied.