The first-run step
The first time you runmnemom agent in a terminal, it offers an optional step to set up the Mnemom record. You answer [Y/n/never].
Scripts and CI are never asked. The step is for terminals only.
The offer repeats on later launches until you link an org or answer
never.
You need an active Mnemom org. If none is set, the CLI asks you to pick one. Change it later with mnemom org use <slug>.
What happens next depends on where your code lives. The CLI looks at your repo’s origin remote to decide.
On GitHub, with several orgs
The Mnemom record uses a GitHub App namedmnemom-record. The App posts the PR check and writes the PR-keyed bundle. See PR checks.
- The CLI starts a GitHub device sign-in. It prints a link and a code. Open the link and enter the code.
-
The CLI lists the GitHub accounts where the
mnemom-recordApp is installed. This can include your personal account. -
You pick which to link to your active Mnemom org. With one choice, the CLI asks
[Y/n]. With several, you type numbers separated by commas, orall. Pressing Enter picks all. -
For each GitHub org you belong to that does not have the App yet, the CLI shows an install link:
Install the App there, then run
mnemom record addto link that org.
- One GitHub install belongs to one Mnemom org.
- One Mnemom org can link many installs.
Who can link an install
A member who tries to link a GitHub org’s install, or another person’s personal install, gets
403 org_role_required. Ask an owner or admin of your Mnemom org to link it.
In mnemom record add, a member who picks several installs gets the ones they can link. The CLI skips each install that needs an owner or admin, links the rest, and ends with a line naming up to three owners or admins to ask. A viewer or auditor gets one message that linking needs an owner or admin, and nothing is linked.
Unlinking an install and turning the record on or off stay owner or admin only.
Linking an install turns the record on for your Mnemom org. Every repo in an active linked install is then enrolled. If a repo’s GitHub org shows as suspended or removed, its repos are not enrolled.
If an install is already linked to a different Mnemom org, the CLI skips it and says so. Unlink it there first, with that org active. If GitHub says your account can’t see an install, sign in as a member of that GitHub org and run mnemom record add again.
Check which Mnemom org is active with mnemom org show. Switch with mnemom org use. See Organizations.
Add more orgs later
Run this at any time:mnemom agent doctor also shows a record line: on or off for the org, which GitHub orgs are linked, and whether this repo’s org is linked. See Preflight.
When you launch mnemom agent in a terminal, in a repo whose GitHub org is not linked, the CLI prints a one-line hint. The hint never blocks the launch. It is not shown if you answered never.
Not on GitHub
GitLab, Bitbucket, Azure DevOps and repos with no remote need no App. For these repos, the record comes as the terminal receipt you get at exit. Seemnemom agent show. The CLI prints a short note about this once. A PR check and a PR-keyed bundle exist on GitHub only today. There is no commit-keyed bundle for other hosts yet.
Cost
Turning the record on adds a provisional µ charge of 4% of model cost. It is shown on the receipt. The CLI prints this before you link an org.Remove an org
Unlink a GitHub org from your Mnemom org:acme. This unlinks the install from your active Mnemom org. It does not uninstall the App from GitHub. To uninstall the App, use your GitHub org’s settings.
After you unlink an org, its repos leave the record. You can link the org again with mnemom record add.
If the name is not linked, the CLI lists the orgs that are. Only an owner or admin can unlink.
Use the API
The CLI calls these endpoints. All paths start with/v1. Any member role can read. Writes need an owner or admin, except that a member can link the App installed on their own personal GitHub account (see Who can link an install). Use a session token or an org API key. An org API key reaches only the org it was issued for.
See also Org Admin for who counts as an owner or admin.
Related
- Conduct Record: the format, signing and offline verification.
mnemom record: the command reference.mnemom agent: the launcher and its first-run steps.