Sign in Download

Help · Settings

Settings → Repositories

Add the folders Morie works in, and say how each one is checked and run.

Checked against Morie 0.54.3.

In short
  • Add a repository… picks a folder you already have; tickets get their worktrees from it, and the folder is left alone.
  • Each repository has its Checks and its Scripts: Setup, Run and Archive.
  • Ports for run scripts and rigs apply to the whole project; Checks run at the same time is shared by every project on this Mac.
For example

Shop has two repositories, shop-web and shop-api.

  1. Press Add a repository… and choose the shop-web folder. Do the same for shop-api.
  2. Press Make default on shop-web, so a new chat or terminal starts there.
  3. Open shop-web. Under Run, add a run script named dev with the command PORT=$MORIE_PORT npm run dev, and press Save.

The page, top to bottom

  • Check again and Add a repository… are at the top. Check again reads every repository’s state once more. Add a repository… opens a folder panel; choose a folder that is already a git repository. Morie reads its name, default branch and remote. The folder is not changed.
  • One line per repository: its state, its name, Default or Make default, its branch, and anything wrong in words, such as Path does not exist or 2 uncommitted. Press the line to open its panel.
  • Ports, Checks run at the same time and the checks line are at the foot of the page. The line lists every run waiting or going, with what it tests and why it waits.

Inside a repository’s panel

  • Path and Default branch: edit one and press Enter to save. Change Path if you moved the folder. Remote is shown for reading.
  • Who may edit tells chats what they may change: Chats on its tickets, Any chat or No chat. Choose No chat for a repository you only want read. It tells chats; it does not block an edit.
  • Claims lists the tickets with an active claim on this repository.
  • Pages for you says where the pages, drawings, screenshots and reports a chat writes for you go. Keep in Morie (the default) keeps them with their ticket, opens them on your phone and adds nothing to the repository. Commit to a folder here names one or more folders inside the repository (docs/morie is the suggestion): at the end of a chat's turn Morie commits what the chat wrote there on its ticket's branch, one named file at a time, with the chat as co-author, and never on the default branch. Git's own hooks do not run. A folder the repository's .gitignore leaves out is refused. When you first name a folder and files already lie in it, Morie offers to commit them, keep them in Morie or leave them.
  • Checks: a check is a named command Morie keeps for this repository; Share uses or writes .morie/checks.json. Only these count as the checks: a test command a chat chooses and runs through Morie never does.
  • Scripts: Setup gets a new worktree ready, for example with npm ci. Run starts something and leaves it running; add as many as you like, mark one default, and write $MORIE_PORT where the script needs its port. Archive runs before a ticket’s worktree is removed. Morie suggests scripts from your project’s files and runs a suggested one only when you press Run. Save keeps them.
  • When several worktrees run: Side by side lets each ticket run its script at once. One at a time stops the others when one starts. Tick start the default script after setup to have the default run script start by itself once a worktree is ready.
  • Remove takes the repository out of the project. Its Memory is archived, not deleted, and the dialog says how much.

From a chat: a repository's own rows

From a chat. A Base chat (one with no ticket) reads the list with repositories.read (every chat may). It changes a repository's Default branch, Who may edit, Make default (or back to the first) and the languages look with repositories.set: the owner is asked each time (Ask by default; Settings → MCP may set it to Always, and then it applies the change and says so). repositories.add adds a folder that is already a git repository, as Add a repository… does, and repositories.remove removes one, as Remove does (its Memory is archived, and a live worktree refuses it); both are Ask or Off, never Always, because they change which folders Morie works in. A chat never clones, and Path and Domain stay with you here. Letting more chats edit a repository (Who may edit to a wider choice, such as Any chat) always needs the card: with repositories.set on Always, that one change is refused and says it needs Ask. The card names every change, including a default that stays as it is.

The set-up file and the names of its secrets

How it works. A repository's set-up (its checks, Checks run in Docker, rig settings, setup scripts and the names of its secrets) can be shared in the repository as .morie/setup.json (a project's own file, <project>.morie-setup.json, is a different file: Settings → Project → Save file…). Morie never reads .morie/setup.json by itself: it reads it when someone uses it, and the file is committed like any other.

Secrets in the file are names only, never values. Export lists a name when the repository's own files use it: ${NAME} in the scripts and env of .morie/repo.json (only the braced form with a capital name counts there, because $NAME belongs to the shell), in the rig's Compose files (${NAME}, $NAME, ${NAME:-default}, ${NAME:?error}, including .override files and those named in its settings) and in script helpers, or a Compose secrets: entry that reads environment: NAME. It leaves out: names that are not capitals, digits and _ (lowercase names, $HOME); the shell's own (HOME, USER, PATH, SHELL, TMPDIR, LANG, TERM, PWD, LOGNAME); names starting MORIE_; names Morie never passes to Compose (DOCKER_, COMPOSE_, BUILDKIT_, DYLD_, ending _PROXY, SSL_CERT_FILE); and names a script's env entry gives or the rig's .env file gives when git tracks that file (every checkout has a tracked file, so its names are not secrets; an untracked or ignored .env is this Mac's own, so a name in it is listed). An entry that only passes its own name on (NAME: ${NAME}, $NAME, ${NAME:?error}) gives nothing, so that name is listed; ${NAME:-default}, another name or a literal is a real value, so it is not. Export does not look at the Secrets list: a secret set to Off, or scoped to another repository, is listed if the files name it. Files over 1 MB are skipped, Compose files named by include: or extends: are not followed, and the list holds at most 500 names.

Set it up. Example: shop-api has a rig and ${DB_PASSWORD} in its Compose file, and a teammate should get the same set-up.

  1. Open Settings → Repositories and worktrees → shop-api. Find the Set-up file row.
  2. Press Export to .morie/setup.json. A card shows the file's text, with DB_PASSWORD listed under secrets and no value, and says Write .morie/setup.json in <path>? If a different file is already there it first says Replaces the file already in the repository:.
  3. Press Write. The file is written and left under Changes, not committed. Commit it.
  4. On the other Mac, open the same row and press Use the repository's file. The card Use the repository's set-up? lists what it sets; press Apply. It makes a reference morie://project/DB_PASSWORD for each name Morie does not know yet (scoped to this repository, Agent commands set to Ask, no value) and asks for the values: One secret needs its value: (or 2 secrets need their values:), each name with Give value… to type it there, or give it later in Settings → Secrets; Later closes the card. Once a value is given, a rig that names the secret in Compose receives it at its next Start: an Ask secret reaches rigs (see Secrets in a rig in the Secrets article).

Refusals: Not shared: a command or setting holds a secret value. Keep only the names, then look again., Not shared: a command or setting holds a path on this Mac. Make it relative to the repository, then look again. and, if the file changed since the card, Not saved: <path> would now be different from the file you were shown. Look at it again. (the chat tool setup.file.export says Ask again.) Remove the value or path, then look again. Using a file refuses a value under secrets: Not used: .morie/setup.json has a value under secrets. Keep only the names there. The project file's version rule is separate: a project file that says version 1 but holds a field only version 2 files have, such as a repository's exact names, is refused with This file can’t be used: it says version 1 but holds the exact names of a repository, which only version 2 files have. Nothing was read into Morie. Ask for a new file: Settings → Project → Save file leaves values out. A fixed-ports key in an older set-up file is read without error and left out.

From a chat. setup.file.read (the repository) shows the file and its full 40-character commit; setup.file.apply (the repository and that commit, on the default branch) uses it, and asks the owner first. A wrong commit refuses with Not used: give commit <commit> to use <file> as it is on <branch> now., and a repository without the file with Not used: <repo> has no .morie/setup.json or .morie/checks.json on its default branch. The answer ends Set up <repo> from <file> at <sha>. 3 secrets have no value yet: <names>; the owner gives them in Settings → Repositories and worktrees → <repo> → Set-up file. A name whose existing secret is scoped to another repository reads <name>: No reference for this repository. The chat tells the owner which names need values; it cannot type them. setup.file.export (the repository) writes the file the owner was shown and asks first: share <repo>'s setup: write <path> …, answering Wrote <path> for <repo>. It is left under Changes, not committed.

Ports and the checks line

Ports for run scripts and rigs is a range, 41000 to 41999 to begin with. Each worktree gets one port from it, and each running rig takes the ports it publishes from the same range. Change it only if something else on your Mac uses those ports. A rig's published port keeps the number its Compose file writes; when the file writes none, Morie gives it a free port from this range (see The Morie Box and Rigs).

Checks run at the same time is how many runs go at once on this Mac, from 1 to 4, shared by all your projects. A checks run, a chat’s chosen command, a rig build and a setup script each take one place. It starts at 1, and the rest wait their turn. Raise it if your Mac has room and runs queue up; Settings → This Mac may suggest a number.

Under it, the checks line shows each run waiting or going: whether it is checks or a chosen command, its ticket, repository and commit, its state and who asked, and under that what it tests. A test run asked alone waits for the test runs going on, in any repository, and no test run starts beside it; its row says takes the line: asked alone. Rig builds and setup scripts carry on.

When something is off

  • The line says Path does not exist? The folder moved or was deleted. Edit Path to the new place, or Remove the repository.
  • Adding a folder says it is not a git repository? Choose the folder that holds .git, or run git init in it first.

See also: Checks and scripts · Worktrees · Settings → This Mac