Add support for exporting an agent from a Git Repository URL for all formats
Problem
No support for exporting an agent from a Git Repository URL
gitagent export currently appears to support only local paths via -d, --dir <dir>. This requires cloning a repository locally before exporting an agent, which adds unnecessary steps and friction.
This is inconsistent with gitagent run -r, which already accepts a repository URL directly, for example:
gitagent run -r https://<git-host>/<org>/<repo> -a claude
Solution
Add support for exporting an agent directly from a Git repository URL, without requiring a prior local clone.
gitagent export -r https://<git-host>/<org>/<repo>/agents/<agent> -f claude-code -o .claude/agents/<agent>.md
Apologies for the delay.
This belongs in the protocol repo: the export command lives there since the rebrand (this repo is now the GitClaw runtime; the protocol/CLI is gapman at https://github.com/open-gitagent/gitagent-protocol).
Filing this concretely:
- The ask is a
-r, --repo <url>flag ongapman exportto mirror whatgapman runalready does. - Implementation reuse exists:
gapman run -ralready shallow-clones via the git-cache helpers insrc/utils/git-cache.tsof the protocol repo. The same path can be used byexport. - The CLI surface would become
gapman export -r https://<host>/<org>/<repo> -f <format> -o <output>— symmetric withrun -r.
I've copied the substance over and will open the issue (or a PR) at open-gitagent/gitagent-protocol shortly. Closing this one to avoid a split tracker. Thank you for the clean problem statement — it makes the implementation small.