Code and repositories / Artifacts
Share an artifact
Your agent's plan is ready, and now your team must read it, or a person outside the team must see it before you start. A new artifact is private, so you share it. Share it on its target for everyone who can see the issue, or make a link for anyone who has it.
4 min read
To share on the target, you need to be the creator of the artifact or have write access. To make a share link, you need write access.
1. Share it on its target
- Open the artifact: from the Artifacts tab of the repository, or from the Artifacts section of the issue or pull request.
- Click Share on and its target, for example Share on issue #12.
The badge changes from Private to Shared. Everyone who can see the issue now sees the artifact in its Artifacts section.
If you do not have write access, your share can wait for a review, as your comments do. The badge then shows Waiting for review. The artifact shows on its target after the review. If the review refuses it, the badge shows Not shared, and only a person with write access can share it.
2. Make a share link
A share link lets anyone who has it read the artifact, also without an account. They cannot comment on it or change it.
- Click Share link on the page of the artifact.
- Under The link shows, pick one:
- The latest version: each new version shows on the link.
- Version 3 only: the version on the page. It never changes.
- Click Make link.
- Copy the link, and send it to the reader.
Important
The dialog shows the link only once. If you lose it, revoke it and make a new one.
If you see a note in place of Share link, it says why you cannot make a link now:
- Share links are off for the repository. A repository admin turns them on: see Set share links and allowed hosts.
- The artifact has no version yet.
- The artifact waits for review.
3. Revoke a link
- Click Share link.
- Under Links, find the link. Each link shows what it shows, who made it and when, and its state: Live or Revoked.
- Click Revoke on the link.
Done
Your team sees the plan on the issue, and the reader outside the team opens it with the link at /artifacts/s/<token>. The page says "You can view this artifact because you have its share link. You can only read it here."
When a link stops working
A link works until one of these happens:
- A person with write access, or the creator of the artifact, revokes it.
- Someone deletes the artifact. A delete revokes all its links.
- Link sharing is turned off for the repository or the organization. When it is on again, the links work again.
Warning
Make private does not stop the links. A link also works for a private artifact. To stop a link, revoke it.
A link works only in a browser. REST, MCP and git refuse it.
From a terminal or an agent
src artifact takes the number of the artifact in the repository. src artifact list shows it.
| You want to | src | MCP tool | REST, under /api/v1/repos/{owner}/{repo}/artifact-pages |
|---|---|---|---|
| Share it on its target | src artifact share 3 | share_repo_artifact | PUT /{n}/share |
| Make it private again | src artifact unshare 3 | unshare_repo_artifact | DELETE /{n}/share |
| Make a link to the latest version | src artifact link create 3 | create_repo_artifact_link | POST /{n}/links |
| Make a link to version 2 only | src artifact link create 3 --version 2 | create_repo_artifact_link, with version: 2 | POST /{n}/links, body {"version": 2} |
| List the links | src artifact link list 3 | list_repo_artifact_links | GET /{n}/links |
| Revoke a link | src artifact link revoke 3 <link-id> | revoke_repo_artifact_link | DELETE /{n}/links/{id} |
- The token of a link shows only in the answer that makes it.
- For an artifact of an account, add
--owner <name>tosrc. Use the MCP tools withaccountin their name, and the REST routes under/api/v1/accounts/{owner}/artifact-pages. See Show artifacts on your profile.