Choose how you want someone else to use your work: publish a repository for ongoing collaboration, invite people into a private one with a link, clone one to read or continue it, or create a read-only share link for a single conversation.
Before publishing your own work, complete Get Started
and save your latest turns. Examples use
alice/my-project@first-task; replace that target with your own.
Publish a session branch
agit push alice/my-project@first-task --private --dry-run
agit push alice/my-project@first-task --private
The dry run shows what would be uploaded and runs local checks. The second
command publishes the already-saved branch. Use --public instead of
--private on the first publication if anyone should be able to read it.
Visibility belongs to the whole repository, not to individual session
branches. Later pushes preserve the remote repository’s visibility. Check
it with agit repo info alice/my-project; use
agit repo visibility alice/my-project public or private to change it.
The visibility command shows the required checks and confirmation.
Conversation privacy processing happens locally and uses best-effort automatic replacement. A privacy failure never blocks publication. Each push independently schedules synchronization of the encrypted recovery dictionary; unavailable keys or synchronization failures leave that work pending locally.
Local processing and Hub storage
The Hub stores the received commits, account keys, and encrypted dictionary packages. It does not scan or reject uploads, pull requests, or visibility changes for privacy reasons. Authentication, authorization, confirmation, and Git/LFS integrity requirements still apply. LFS payloads are excluded from privacy processing.
History retains recorded evidence. Removing an event from a VIEW does not remove it from history, and registering a secret does not rewrite earlier commits. Secret protection explains automatic keys, policy scopes, best-effort replacement, and recovery on another device.
Read someone else’s repository
agit clone alice/my-project
agit log alice/my-project --branches
agit show alice/my-project@first-task
Public repositories can be cloned without signing in. Private repositories
require an account with read access. A clone preserves the original history
and authorship in a local AgentGit repository under ~/.agit/repos/.
Cloning again fetches updates. Use agit pull alice/my-project@first-task
to fetch and fast-forward a local branch when possible. Diverged branches
are preserved for you to reconcile.
To continue a published session in a runtime, use:
agit run alice/my-project@first-task
run reports whether it can resume a writable session or needs to create a
fork. See Forks and merges for choosing a specific
starting turn.
Make your own copy
agit clone alice/my-project --mine
Sign in first. This creates a copy in your namespace so you can publish independently. The copy inherits the source repository’s visibility and keeps its history. The original remains available as upstream.
If you already have a read-only clone, --mine promotes that local repository
into your namespace. It preserves local commits, points origin to your copy,
and retains the source as upstream. Use the destination printed by the command
for subsequent work.
After cloning, use the owner and repository printed by the command. Follow the pull request workflow to propose work back to the original repository.
Invite someone with a link
An invite link lets someone into a private repository without you knowing their username. With AgentGit 0.2.5 or later, the repository owner runs:
agit repo invite alice/my-project
agit repo invite alice/my-project@first-task
The first command prints a repository invite link. Adding @branch (or
-b branch) prints a link that also opens that branch’s session once the
invitation is accepted. The invitee still gets access to the whole repository;
the branch only chooses where they land. Push the branch first, because the
link can only open a session the Hub has. To show someone a single
conversation without repository access, use a
snapshot link or a
share link instead. Links grant
read-only access by default; add --role write for someone who should push
work back, or --role owner for a co-owner. --json prints the result as
structured output.
The person opens the link, signs in or creates an account, and accepts. With
read access they can open the session on the Hub, clone the repository, and
continue from it in their own agent with agit run alice/my-project@first-task.
Anyone who has the link can accept it, so send it only to the people you mean to invite. Links do not expire and can be used more than once. Only repository owners can create them, and a repository can have up to 100 active links. Revoke a link from the repository’s Settings → Invite by link. Revoking stops new joins; people who already accepted stay collaborators until you remove them.
Owners can also create links on the Hub: use Create invitation link under Settings → Invite by link, or the Invite button on a session page. Invite asks whether to grant read-only or read-write access (read-only unless you choose otherwise) and creates a repository invite that opens that session. Someone who already has at least that access goes straight to the session when they open the link; a read-only collaborator opening a read-write invite is asked to confirm the upgrade.
Share a session snapshot from the Hub
Share on a session page copies a snapshot link to the version you are looking at. Anyone who can read the session can create one. Whoever opens the link signs in to the Hub and can then read that session at that version, read-only, even without access to the repository. Later pushes to the session never appear through the link, and it grants nothing else: not the repository’s other sessions or versions, the live session, or the right to clone or continue the work.
A snapshot link does not expire. It stops working when you revoke it, when you can no longer read the repository yourself (for example, an owner removes you as a collaborator, or a public repository you are not a member of becomes private), or when the repository is deleted. Revoke your links under Settings → Shares. Repository owners can see and revoke every snapshot link into their repository from its Settings → Snapshot links.
To give someone ongoing access to the repository instead, use Invite.
Work with collaborators or an organization
For a repository you own, grant another user access explicitly:
agit repo collab add alice/my-project bob --role write
agit repo collab list alice/my-project
Use --role read for read-only access. Collaborators with write access can
push to the shared repository using the same owner/repo@branch syntax.
Give each conversation its own session branch.
Organization repositories use the organization name as the owner. Once you have a write grant, the workflow is the same:
agit clone acme/my-project
agit import SESSION_ID --into acme/my-project@bob-task --independent
agit push acme/my-project@bob-task
Replace SESSION_ID with the runtime ID of the conversation you want to
adopt. This example chooses an independent import; use import lineage
when continuing an earlier saved base. For a conversation that is no longer running, you can instead use
agit import in your terminal to complete the import through its picker,
choosing acme/my-project and the new branch bob-task as the destination,
then confirming a saved starting point or an independent import.
Organization creation depends on the Hub’s configuration; if self-service creation is
unavailable, contact its administrator. Organization repositories currently
use public visibility, with membership and team grants controlling writes.
Create a read-only share link
From the terminal, agit share publishes a separate read-only copy of a
conversation. Use its adopted runtime session ID or prefix from agit status:
agit share SESSION_ID --views 5 --expire 24h --password
Replace SESSION_ID, then review the target and confirm in the terminal.
The link expires after the chosen duration and can have a view limit and
passphrase. The conversation payload is client-encrypted by default; the
key is included in the link fragment. --public creates an unencrypted
link instead.
Manage existing links with:
agit share list
agit share rm SHARE_SLUG
Replace SHARE_SLUG with the slug from the listing. A share link is a
snapshot for reading; ongoing updates belong in a published repository.
Next, review or merge a contribution, or return to Everyday commands to continue your session.