packages

Start or continue the git lane for saved packages: mint a short-lived Cloudflare Artifacts git remote so coding agent...

Start or continue the git lane for saved packages: mint a short-lived Cloudflare Artifacts git remote so coding agents with local filesystem/git access can clone into a temporary directory. When scope is omitted, defaults to write if you have write access to the package, otherwise read. Pass scope explicitly to force read or write; requesting write without write access is denied with guidance (use scope: 'read', ask an Owner for a grant, or communityFork a public package). A read remote rejects push with: this remote is read-only; request scope: 'write'. Pass create: true with a new @scope/leaf name (or the name leaf) to register a stub saved package and mint its remote in one call, so new packages can be authored via clone-edit-push instead of packageSave file blobs. Prefer the scoped name for existing packages; use package_id only when the name is not known. The result includes git_author (signed-in Kody account email and display name) and setup_commands that set local user.email / user.name to that identity — never invent a git email. Write access verifies the current package source has a restorable backup snapshot before clone/edit/publish. Individual files may be at most 10 MiB (10,485,760 stored bytes; UTF-8 for text, raw for binary): publish rejects anything larger with external-hosting guidance (commit a link or pointer instead), and the Artifacts remote itself fails pushes above ~32 MiB of pack content with a raw HTTP 413.

Org permission: package:read.

post/v1/packages/{package_id}/git-remote

Request

  • Base URL: https://api.kody.codes
  • URL: https://api.kody.codes/v1/packages/{package_id}/git-remote
  • Auth: HTTP bearer

Path parameters

package_idstring required

Saved-package UUID. Use when the scoped name is not known, or for a stable ref.

Request body

kody_idstring

Package name (@owner/leaf or the name leaf). Prefer this when you know the name.

createboolean

Set true with the new @scope/leaf name (or the name leaf) to register a new stub saved package (private, minimal scaffold) when none exists yet, then mint its remote in the same call. Existing packages are reused as-is. Prefer the scoped name for existing packages; use package_id only when the name is not known.

descriptionstring

Package description used when create: true registers a new stub package. At most 200 characters (short public tagline). Ignored for existing packages.

scope'read' | 'write'

Access scope for the minted Artifacts token. When omitted, defaults to write if you have write access to the package, otherwise read. Explicit scope is honored; requesting write without write access is denied. A read remote rejects push with: this remote is read-only; request scope: 'write'.

ttl_secondsinteger

Response

Success.

package_idstring required
kody_idstring required

Package name leaf (same value as slug).

slugstring required

Package name leaf (same value as kody_id).

createdboolean required

True when this call registered a new stub saved package before minting the remote.

remotestring required
authenticated_remotestring required
git_extra_headerstring required
scope'read' | 'write' required
expires_atstring required
setup_commandsstring[] required

Changes

No recorded changes to this operation across all 2 revisions of this API.