Sign in Download

Help · Settings

Settings → Secrets

Where each secret lives, who may have it, and how to add one.

Checked against Morie 0.57.0.

In short
  • Morie keeps where a secret lives, never the secret: in its own store on this Mac, or in your 1Password.
  • Each secret has a name, such as STRIPE_KEY. Scripts, rigs and chats use the name; only the command that runs gets the value.
  • Agent commands says whether a chat’s command may have it: Always, Ask or Off.
For example

Shop’s API needs a Stripe key to take payments.

  1. Press Add a secret…. Name: STRIPE_KEY. Keep the reference morie://project/STRIPE_KEY and paste the key as the Value. Scope: Repositories, shop-api. Agent commands: Ask. Press Add secret, then Test on its row: it says resolved.
  2. In shop-api’s run script dev, write ${STRIPE_KEY} where the key goes: STRIPE_KEY=${STRIPE_KEY} npm run dev. Used by now shows Run dev, and the script gets the key each time it starts.
  3. On ticket #12 a chat runs the payment tests, which need the key. A card in the chat says Claude Code asks for STRIPE_KEY to run a command. Allow once gives it to that one command. The chat sees [secret:STRIPE_KEY], never the key.

The page, top to bottom

  • Providers · this Mac. The Morie store keeps values on this Mac, encrypted with the macOS Keychain; Lock pauses it until you Unlock. The 1Password CLI line says whether 1Password is ready; Check again looks once more. 1Password wait is how long Morie waits for 1Password to answer, its unlock prompt included.
  • When Morie asks 1Password. Asking 1Password can bring up its unlock or approval prompt, so Morie asks only when something uses it: when you open this page and a secret's reference is an op:// one, when you press Check (or Check again) on the 1Password CLI line, when you press Test on a 1Password secret, and when a script, command or terminal asks for one by name. Until then the line says not checked and offers Check; its bubble says Morie asks 1Password only when a secret uses it, or when you press Check: asking can bring up 1Password’s unlock or approval prompt. After a check the line keeps what 1Password answered (ready with the account, not signed in, locked, not allowed or did not answer) while you add, change or remove secrets, and reading the page again asks again only if a secret uses 1Password. With no 1Password tool on this Mac the line says not installed without asking anything; install it, then press Check again. The first run's Secrets step works the same way: it shows the tool as Found, with the same sentence (naming its Check again), until you press Check again. The step is reached before any project exists, and it answers all the same: while the first answer is on its way the row says Checking…, then Found (the dash in Version means no version was asked for) or Not found with a button to install the tool. If the check gives no answer, or none within 20 seconds (75 seconds for Check again, which waits for 1Password), Found says Couldn’t check and Signed in says 1Password gave an answer Morie could not read. Try again.; a late answer replaces it. In Add a secret…, an op:// reference shows its vault, item and field, and 1Password's state only once it has been checked.
  • New terminals · this project. Secrets set to Ask decides what a terminal you open gets: Always gives them without asking, Ask asks when the terminal starts, Off starts without them.
  • The list. Each secret’s Name, Reference, Scope, Used by, Reads · last 24 hours, Agents and Status, with Test, Edit and Remove. When the window is narrow, the list scrolls sideways inside its card, and it opens at its names. A name, reference, scope, used-by, reads or status that does not fit ends in …; hover it, or press Tab to it, to read the whole text, and Edit shows the whole name and reference. Search and sort sit above it once you have secrets. While Morie reads the names, the list says Reading secrets…; the names come first, and the providers' lines and the Reads column fill in after. With no secrets it says No secrets yet. Add one to give commands a secret without writing it into a file.

From a chat: Secrets set to Ask

From a chat. A Base chat (one with no ticket) reads Secrets set to Ask with settings.read (page Secrets) and may make it stricter with settings.set: Ask or Off. Each change is a card for you. A chat cannot set it to Always: Not changed: Secrets set to Ask can be Ask or Off for a chat, never Always; Always gives every terminal you open in this project its secrets without asking, and stays with the owner. Any spelling of Always is refused the same way, and settings.read lists only Ask and Off as values. A chat may keep it or tighten it (Always, then Ask, then Off), never widen it: from Off to Ask is refused with Not changed: Secrets set to Ask is Off; turning it to Ask gives secrets more reach, and the owner changes that in Settings. Moving it from Always down to Ask or Off is allowed. Example: settings.set page Secrets, name Secrets set to Ask, value Ask.

Left out of chats, on purpose. A secret’s value, the keychain, an agent’s sign-in and any step that asks for the Mac password are never settings a chat can change; settings.set refuses them, and no tool returns a secret’s value. The Morie store row only shows a state.

Adding a secret

  1. Press Add a secret… at the top of the page.
  2. Name: capital letters, digits and _, such as STRIPE_KEY. It cannot change later.
  3. Reference: keep morie://project/STRIPE_KEY and type the Value; or paste an op:// reference from 1Password (its Copy Secret Reference).
  4. Scope: Project-wide, or Repositories and pick them.
  5. Morie Box: turn on Every chat and terminal only if chats and terminals in the Morie Box should have it too.
  6. Agent commands: Always, Ask or Off.
  7. Press Add secret, then Test on its row. resolved means Morie could read it. The value is never shown again.

Who gets a secret

  • Scripts and rigs get the secrets they name as ${NAME} in their settings, and a rig's service also gets the ones chosen for it in Change… → Secrets for services. A rig also gets an Ask one, with no card, but never Off; see How a rig gets secrets in The Morie Box and Rigs. A chat’s mrig compose up, create, run and scale on a rig make containers with the same secrets as its Start. Used by lists them (Rig settings · api for a choice in Secrets for services); you do not set it here.
  • Your terminals follow Secrets set to Ask. New terminal in… still lets you choose for one terminal.
  • A chat’s commands follow Agent commands. Always: without asking. Ask: a card in the chat waits for Allow once, Always allow or Deny…. Off: never. After Always allow, Edit says who allowed it and when; the card in the chat keeps an Undo for a while, and in Edit you can set Agent commands back to Ask.
  • The Morie Box: with Every chat and terminal on, chats and terminals in the Box may have it too, whichever repository they work in. Read-only chats get none.

Wherever a secret goes, saved transcripts, logs and exports show [secret:NAME] in its place. A live terminal still shows what its command prints.

Changing and removing

  • Edit changes the reference, the value, the scope and who gets it. The name stays: to rename, add a new secret and remove this one. Terminals, scripts and rigs already running keep the value they started with.
  • Remove stops every command receiving it. A value in the Morie store is deleted from this Mac; a value in 1Password stays there.

When something is off

  • Status says not found? Nothing is saved at that reference. Edit it and type the value, or check the op:// reference in 1Password.
  • Status says locked? The Morie store or 1Password is locked. Unlock it, then press Test again.
  • 1Password did not answer? The command started without the value. Unlock the 1Password app first, or make 1Password wait longer.
  • A chat says it never got the key? Look at Agents on its row. Off means never; Ask means you are asked first, on a card in that chat.
  • The list took a while to show? It says Reading secrets… until the names arrive. Morie writes how long that took, in milliseconds and never with a name or a value, to two log files in its data folder (normally ~/Library/Application Support/morie-ide/projects/): default/logs/main.log and the project's own logs/runtime.log. In Finder, choose Go → Go to Folder… and paste the folder. Search the files for secrets timing and secrets.list. - main.log: safeStorage first call: isEncryptionAvailable 840 ms, from warm-up is how long the Mac's keychain took the first time this run; Morie makes that call once just after the window opens, so a page never waits for it. When one of Morie's stores reads the keychain first (a signed-in account's store does so at start-up, before any page), the line says from a store. Signed out, macOS may show its keychain prompt once at launch, because of that call; allow it and it does not come back. secrets.list answered in 1200 ms (window 3, its first) is how long the list took as the window saw it. A window's first list is always written, and a later one only when it took 250 ms or more. - runtime.log: secrets.list 12 ms: rows 1 ms, used-by scan 9 ms over 4 repositories, last runs 1 ms, rows built 1 ms; 10 secrets is the list's own work. The first list of a run is always written, and a later one only when it took 100 ms or more. A slow used-by scan means reading the repositories' files took the time. - runtime.log: secrets.providers 3 ms: 1Password not checked (no secret uses it) says whether opening the page asked 1Password; 1Password checked means it did, and the time includes 1Password's answer (and any prompt you answered). It is written for a run's first check and for any that took 100 ms or more. - When main.log's time is much longer than runtime.log's for the same open, the list waited in line behind other work, not on its own. Send both lines with your report.

See also: Secrets · Settings → Repositories