Skip to content
Myr

Run a project

Make a project, write how it takes changes, open asks, and spend the day's decisions.

On this page

Make a project

In a repo of your own, myr init --project <owner>/<name> makes it a project: it finds the repo's checks (its test and lint commands, and its CI), writes the config folder, .myr/, and pushes. You are the project's first maintainer.

How a project is named

A project's name is its owner, then a short name: <owner>/<name>, as in oscabriel/datekit. The name is the project's address everywhere: --project takes it, the web shows the project at /<owner>/<name>, and git clones it from <platform>/<owner>/<name>.git. You make projects under your own handle; a bare word, as in myr init --project datekit, is taken as yours, under the handle myr login kept, and so is an import left unnamed. Owning a namespace is the right to make projects in it and nothing more: who decides stays with the config folder.

Import a repo

To bring a public repo over HTTPS: myr init --import <url>, with --branch when its default branch is not the one you want. The import is yours: it is named under your handle, after the URL's last segment, so https://github.com/pallets/click becomes <your handle>/click, and the project's page says where it was imported from. --project names it otherwise: a bare word again under your handle, or, for a repo from github.com, gitlab.com, codeberg.org, bitbucket.org, its source namespace, <host>/<account>/<name>, as in github.com/pallets/click, which keeps the source's account as the owner. On the web, Import a repo does the same, with the source namespace offered beside your handle, and the web address of such a name nobody has imported yet, such as /github.com/pallets/click, offers the import under it. You are an import's first maintainer, as of any project.

The config folder

How the project takes changes is TypeScript on main, in .myr/. The platform reads it only from the commit it last landed, in a sandbox with no network and frozen time, so it changes the way everything else does: by a landing.

  • .myr/project.ts: who decides which paths, the kinds of ask the project takes, how long a decision waits before its default, the commands the checks run, and who must be vouched for to claim.
  • .myr/asks/: one file per ask.
  • .myr/vouched.td: who is vouched for, and who is denounced.
  • .myr/visibility.ts: layers and held-back checks, if any (see Held-back checks and layers).
import { kinds, project } from "@myrtechnology/cli/rules";

export default project({
  deciders: { "**": ["ines-v"], "src/tz.ts": ["okonkwo"] },
  decisions: { expire: "14 days" },
  kinds: [kinds.fix],
  run: { checks: { unit: "bun test" }, test: "bun test {path}" },
  vouch: "forCode",
});

The project's Policy page shows what the folder evaluated to at the landed commit, and myr policy --project <owner>/<name> prints the same.

The run block

The project's own commands, under run. The platform runs them exactly as written, on the tree an answer makes once merged onto main, in the checker's image; myr check runs them on your machine.

  • setup: run once, before the network closes, to install what the checks need, as bun install does.
  • setupEgress: hosts setup may reach beyond the defaults; setup only, never the checks, which reach no network.
  • doctor: a command that says whether a machine can run the checks; it judges nothing.
  • test: the one command that runs a single check file, with {path} standing for the file, as in bun test {path}. The red-first check that opens an ask runs it, and so does each ask's check on every answer.
  • checks: the lanes, by name, each a command every answer must keep green, as in { unit: "bun test" }.
  • image: the image the checks run in; checker:default when absent.

An open ask's check fails on main until the ask is answered: that is what opening it proves. A lane that runs the whole suite would then fail on every answer to every other ask, so keep the asks' checks out of the lanes, as datekit does with bun test --path-ignore-patterns='test/asks/**'. myr init writes the unit lane that way.

What init leaves to the defaults

myr init writes the run block it found and vouch: "bansOnly", and leaves every other key out, so each takes its default:

  • deciders: with none named, the project's owners decide every path, as { "**": "owners" } would say.
  • kinds: [kinds.fix], one kind of ask: a check that fails on main and passes with the answer.
  • vouch: with "bansOnly", nobody needs a vouch, but a denounced person still may not claim, push or post. Left out, it is "forCode": only people vouched for may claim.
  • decisions, caps and claims: each decision takes its default after 14 days; a person nobody has vouched for holds at most 20 claims at once; a claim is warned after 2 hours without a push, and lapses after 24.

Open an ask

An ask is a file and a check: the want, the territory, what is out of scope, and a test that fails on main today. The file is .myr/asks/<ask>.ask.ts, and its stem is the ask's id: .myr/asks/format-ordinal.ask.ts opens the ask format-ordinal. The check lives at the path the ask names; keep every ask's check at test/asks/<ask>.test.ts, so one pattern keeps them all out of the lanes. Some kinds also name a mentor, or hold the ask for newcomers.

import { kinds, territory } from "@myrtechnology/cli/rules";

export default kinds.fix.ask({
  want: "The Do token of format prints the day of the month as an English ordinal.",
  path: "test/asks/format-ordinal.test.ts",
  territory: territory.paths("src/format.ts", "test/format.test.ts"),
  reserve: "newcomers",
});

Write both in your clone, then run myr ask open <ask> --project <owner>/<name>. It reads the ask file and the check at its path from your working tree, and lands the ask, but only once its check fails on main twice the same way, by an assertion: a check that cannot fail, or fails by not loading, opens nothing. --files sends other files in their place, as JSON, [{"path": "…", "content": "…"}]; myr schema ask open prints what it takes.

Discussions

A discussion is a public, freeform thread in a project, open to anyone not denounced, that lands nothing itself. Open one with myr discussion post --project <owner>/<name> --title "<what to talk about>" --body "<the first post>", and reply with myr discussion post <discussion> --project <owner>/<name> --body "<your post>"; myr discussions --project <owner>/<name> lists them and myr discussion <discussion> --project <owner>/<name> reads one. A maintainer turns a thread into an ask by opening the ask with myr ask open <ask> --project <owner>/<name> --discussion <discussion>, which marks the thread asked and takes no more posts; its page then names the ask it became.

Today

A maintainer's Today is their open decisions, soonest to expire first, each with its evidence and a safe default taken if nobody decides before it expires. Read it on the web in your inbox, or with myr today, and take one with myr decide --project <owner>/<name> --decision <decision> --choice accept (or decline, adopt, revert).

Finish an answer, or land your own change

When an ask's kind requires a finish, a passing answer waits for a maintainer's own commits on top: myr finish <ask> --project <owner>/<name> --base <base> --head <head> --requestId <id>. They are checked again, and the landing credits you with Finished-by.

A maintainer's own change goes through the same gate. myr fork --project <owner>/<name> makes your working fork, or returns the one you have, and prints its name and its git remote. Add the remote, push your change to it, and land it:

myr fork --project <owner>/<name>
git remote add fork <remote>
git push fork HEAD:main
git fetch myr
myr land --project <owner>/<name> --base $(git rev-parse myr/main) --head $(git rev-parse HEAD) --message "<what it does>" --requestId <id> --yes

--base is main as the platform last landed it: git rev-parse myr/main after git fetch myr, where myr is the remote myr init added for the project. --head is the commit you pushed to the fork. --requestId is any 8 to 64 letters, digits, - or _ you choose: sending the same one again returns its receipt as it stands, and checks nothing twice. myr finish takes the same three. myr land answers as soon as the stages a push hears pass, with an outcome of Checking: the checks run on the platform after it returns, as an answer's do, and the same command again, with the same --requestId, says where they stand, then names the landing. If main moves past your base before the change lands, the platform merges it onto the new main itself, and refuses with StaleBase only when that merge conflicts.

Vouch

myr vouch --project <owner>/<name> --handle <handle> --verdict vouch admits a person to claim, by landing a line in the vouch file; --verdict denounce bars them from claiming and posting.