Deletes one secret from the vault, after asking, because nothing else holds
it. Inside a project the key is the project's; @ reaches one with no profile
from there:
monkeys forget STRIPE_SECRET_KEY
forget foo.test/STRIPE_SECRET_KEY, which nothing else holds. go ahead? [y/N] yforgot foo.test/STRIPE_SECRET_KEY
The question needs a terminal, so a script or an agent is refused rather than
answered for.
The .monkeys file is not touched: a project still lists the key, and
doctor reports it missing until someone remembers it again. To take the key
out of the file as well, see drop.
A key that .monkeys holds as a value for the profile has its line deleted
instead, since the file says which of the two it is:
monkeys forget API_URL
forgot API_URL from .monkeys for @test
That one is not asked about, since the line lives in a file git can give
back. A value the file sets for several profiles together is refused, the way
remember --public refuses it.
A profile on its own, with no key, forgets every secret remembered under it, and a
comma list forgets several. The names are all resolved before anything is
deleted, so a typo in the second name leaves the first untouched:
monkeys forget @test,production
forget 5 secrets under @test, @production, which nothing else holds. go ahead? [y/N] yforgot @test: DATABASE_URL, STRIPE_SECRET_KEYforgot @production: DATABASE_URL, SENTRY_DSN, STRIPE_SECRET_KEY
A namespace forgets every profile under it, declared in a file or not:
monkeys forget +foo
forget 5 secrets across 2 profiles under +foo, which nothing else holds. go ahead? [y/N] yforgot @foo.production: DATABASE_URL, SENTRY_DSN, STRIPE_SECRET_KEYforgot @foo.test: DATABASE_URL, STRIPE_SECRET_KEY
Neither form touches .monkeys: a project still declares the
profile, and doctor reports every key of it missing. A bare @ is no profile
and is refused, so the secrets with no profile go one key at a time.