ctx members
ctx members prints everyone with access to the current repo — email, role and
join date — and ctx members remove takes that access away.
When you’d reach for it
Section titled “When you’d reach for it”Before you push anything you’d rather not share, and whenever someone leaves
the team. It answers “who can pull this knowledge base”, which is not the same
question as “who has pushed to it” — for that, see
ctx activity.
There is no ctx members add. Membership is only granted by redeeming an
invite key (ctx invite → ctx join), and there
is no CLI command to change someone’s role either: join always grants
member, and owner comes from creating or claiming the repo.
Synopsis
Section titled “Synopsis”ctx membersctx members remove <email>ctx members takes no flags.
| Flag | Type | Default | Description |
|---|---|---|---|
--root | string | project root directory (default: current directory) |
Only two exist.
| Role | Can do |
|---|---|
owner |
Everything a member can, plus mint / list / revoke invite keys and remove members. |
member |
Push and pull pages, read pages, list members, view the activity feed. |
An owner row is written when a repo is created — including the implicit
creation that happens on the first ctx push to a repo id the
server has never seen — or when someone claims an existing repo that has no
owner yet. Every other path in makes you a member.
Examples
Section titled “Examples”List everyone with access:
ctx membersno membersOffboard someone (owner only):
ctx members remove alice@example.comctx members remove
Section titled “ctx members remove”Removes one person from the current repo.
ctx members remove <email>ctx members remove takes no flags.
The argument is an email, matched case-insensitively against the member list. That’s a convenience: the server’s API works in user ids, so the CLI fetches the member list first and resolves the email locally. If the email isn’t in the list you get a local error and no request is sent at all.
On success it prints removed <email>.
How it works
Section titled “How it works”Both forms read .contexo/config.json and the stored credentials, then call
your configured server. Nothing is written locally; no git commit is made.
- list →
GET /v1/repos/<repo_id>/members. Any member of the repo may call it. Rows come from the server’s SQLitecontexo.db(the membership table joined to the users table for emails), ordered oldest-join-first — so the original owner is normally the first line. The CLI aligns them intoemail role joined YYYY-MM-DD, with the date rendered in UTC. - remove →
GET …/membersto resolve the email, thenDELETE /v1/repos/<repo_id>/members/<userId>. The server requires the caller to be an owner, and refuses to delete the last remaining owner. Deleting a membership row does not touch the repo’s git history: pages that person pushed stay, and their name stays on those commits.
Common errors
Section titled “Common errors”| Message | What happened |
|---|---|
members: not authenticated — run 'ctx login' first |
No credentials in this project. See ctx login. |
members: server URL not set — run 'ctx remote set <url>' first |
Config has no server. See ctx remote. |
members: repo id not set — run 'ctx remote set-repo <id>' first |
The project isn’t pointed at a repo yet. |
no member with email "alice@example.com" on this repo |
Raised locally after the lookup — check the spelling against ctx members. |
only an owner can remove members |
The server answered 403. You have the member role. |
not a member of this repo |
The server answered 404 — the id resolved from the email is no longer a member (someone else removed them first). |
can't remove the last owner |
The server answered 409. There is no API route around it — see the caution below. |
See also
Section titled “See also”ctx invite— mint the key that lets someone inctx join— what the teammate runsctx activity— what members have pushed and pulled- Teams guide — the full onboarding and offboarding flow
