Skip to content

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.

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 invitectx 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.

Terminal window
ctx members
ctx members remove <email>

ctx members takes no flags.

FlagTypeDefaultDescription
--rootstringproject 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.

List everyone with access:

Terminal window
ctx members
ctx members
no members

Offboard someone (owner only):

Terminal window
ctx members remove alice@example.com

Removes one person from the current repo.

Terminal window
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>.

Both forms read .contexo/config.json and the stored credentials, then call your configured server. Nothing is written locally; no git commit is made.

  • listGET /v1/repos/<repo_id>/members. Any member of the repo may call it. Rows come from the server’s SQLite contexo.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 into email role joined YYYY-MM-DD, with the date rendered in UTC.
  • removeGET …/members to resolve the email, then DELETE /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.
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.