ribo now supports credential profiles: a named login bound to
a directory. Anything you run in that directory, or below it, authenticates as that profile.
Two projects, two accounts, two terminals, all at once. No coordination, nothing
to remember.
If you only ever use one account, nothing changes. If you run coding agents that deploy on your behalf, this one is for you.
Until today, ribo had exactly one credential:
~/.config/ribo/token.json. The account you're acting as lives inside
that token, and ribo account switch re-mints it in place.
Which makes account selection a global variable. Two terminals:
# terminal 1 # terminal 2
ribo account switch "Acme"
ribo account switch "Personal"
ribo deploy # ← deploys as Personal
No error. No prompt. The deploy succeeds. Into the wrong account.
And it doesn't merely deploy to the wrong place. ribo deploy resolves a Cell
by name within the token's account, so deploying to an account that has
never seen this Cell doesn't update anything: it creates a new one. You end
up with a duplicate Cell in the wrong account, live at a URL under the wrong subdomain, with
bindings pointed at the wrong account's databases and buckets.
Two terminals is the tolerable version of this. The version that actually hurts is two
coding agents on the same machine, working in different projects, one of them running
ribo account switch while the other is mid-build. Nobody typed anything wrong.
There was nothing to see.
ribo profile create acme --from-current
ribo profile create personal --from-current
ribo profile activate acme ~/work/acme-site
ribo profile activate personal ~/personal/my-blog
That's the whole setup. From here on, anything run under ~/work/acme-site is
Acme, anything under ~/personal/my-blog is you, simultaneously,
in as many shells or agents as you like. They can't clobber each other, because they no
longer share a credential. ribo account switch inside a bound tree writes into
that tree's profile and nowhere else.
The precedence chain, first match wins:
| # | Source | Scope |
|---|---|---|
| 1 | RIBO_TOKEN | the process |
| 2 | --profile <name> | one command |
| 3 | nearest bound ancestor directory | that tree |
| 4 | the default login (ribo login) | everywhere else |
Nearest wins: ~/work bound to one profile and ~/work/acme bound to
another means ~/work/acme/site uses the inner one.
The ordering is deliberate. RIBO_TOKEN is set by whoever launched the process,
usually CI, and nothing inside a checkout should be able to override it, so it sits on
top. Below that: a flag you typed for this command beats a binding you made months ago,
which beats the login you'd forgotten you had. Nothing in the chain is clever. You should
be able to predict which credential you're about to use without
running anything.
The real problem with a global credential is that when it's wrong, the wrongness is invisible. So there's a command whose entire job is to answer the question out loud:
$ ribo profile which
directory /Users/you/work/acme-site
credential profile "acme" (bound at /Users/you/work/acme-site)
server https://api.tissue.systems
account Acme Corp (acct_3f8c1a2b4d6e8f00)
No side effects, no network mutation, safe to run anywhere. Put it at the top of a deploy script. Teach your agent to run it before it touches production. Every deploy echoes the same thing, unprompted:
account Acme Corp (acct_3f8c1a2b4d6e8f00) [pinned]
via profile "acme" (bound at /Users/you/work/acme-site)
server https://api.tissue.systems
deployed acme-site
Profiles make the right credential ambient. ribo.toml makes a wrong one
fatal:
[cell]
name = "acme-site"
account_id = "acct_3f8c1a2b4d6e8f00"
The pin is an assertion, not a selector. It never picks an account for you. It stops a deploy that would land somewhere else, before anything is uploaded:
Error: Refusing to deploy: account mismatch.
ribo.toml pins Acme Corp (acct_3f8c1a2b4d6e8f00)
active account Personal (acct_9zp5k1m3n5p7r9t1)
The tempting alternative is to let account_id select the account
instead: read it from the config, act on it, done. We decided against that. Selecting
quietly stretches a credential to cover an account nobody chose it for; asserting turns the
same ambiguity into a stop. When the operator might be a language model at 3am, we would
rather halt than proceed plausibly.
The check runs on both sides. The CLI refuses locally, and the deploy request carries the expected account id so the server refuses too. An out-of-date CLI can't route around it. And the account id isn't a secret, so commit the pin: everyone who clones the repo, agents included, gets the guardrail for free.
One design decision here is easy to get backwards.
If a directory is bound to a profile you've since deleted, ribo
errors:
Error: /Users/you/work/acme-site is bound to profile "acme", which no longer exists.
Re-create it: ribo profile create acme
Or unbind it: ribo profile deactivate /Users/you/work/acme-site
It does not fall back to your default login. Falling back would be friendlier for
about four seconds, and then it would silently deploy to whatever account happened to be
sitting in token.json, which is the exact failure the whole feature exists to
prevent. A tool that guards against silent retargeting should not have a silent retargeting
path in it.
Same reasoning behind a fix that shipped alongside this. RIBO_TOKEN was honoured
for authentication but not for identity: with RIBO_TOKEN set to
one account and token.json holding another, ribo would authenticate
as the first, report the second, and (worse) compare the account pin against the second.
The guardrail was checking the wrong identity. Both paths now resolve through one function, so
what ribo authenticates as and what it tells you are the same object by
construction.
Nothing to do. RIBO_TOKEN still outranks everything, and an environment variable
is already per-process, so parallel jobs on one runner were never at risk:
- name: Deploy Cell
env:
RIBO_TOKEN: ${{ secrets.RIBO_TOKEN }}
run: ribo deploy
ribo profile which says so explicitly when RIBO_TOKEN is set, so an
environment credential shadowing a profile is never a surprise.
curl -L https://tissue.systems/download/latest/ribo-macos-arm64 -o ribo
chmod +x ribo && sudo mv ribo /usr/local/bin/ribo
Then, in any project:
ribo profile which
The full guide lives at docs.tissue.systems/docs/ribo/profiles: every subcommand, the migration path from an existing login, and recipes for concurrent agents.
Credentials live in ~/.config/ribo/: token.json for your default
login, profiles.json for named profiles and bindings. Both are written
0600 inside a 0700 directory, re-applied on every write.