gitagent icon indicating copy to clipboard operation
gitagent copied to clipboard

Add support for exporting an agent from a Git Repository URL for all formats

Open gtshepard opened this issue 6 months ago • 1 comments

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

gtshepard avatar May 06 '26 15:05 gtshepard

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 on gapman export to mirror what gapman run already does.
  • Implementation reuse exists: gapman run -r already shallow-clones via the git-cache helpers in src/utils/git-cache.ts of the protocol repo. The same path can be used by export.
  • The CLI surface would become gapman export -r https://<host>/<org>/<repo> -f <format> -o <output> — symmetric with run -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.

shreyas-lyzr avatar May 13 '26 13:05 shreyas-lyzr