Live
Consolidating State Health Agency Workflows with Gemini Agent SkillsAI agent database load: patterns, pitfalls, and ScyllaDB mitigationsAI agents for healthcare: deployment patterns and operational impact for cloud and DevOps teamsDesigning an Agent‑Ready Platform: Webflow’s Blueprint for Safe AI‑Generated CodeSelf‑service scaling to 5,000 GKE nodes in under five minutesStable Kubernetes Foundations Power AI Agent Workloads on Amazon EKSObject‑Level RBAC in Basin Catalog: Granular Permissions for EngineersEvidence‑Driven Trustworthy AI Models: What Engineers Need to Adjust TodayConsolidating State Health Agency Workflows with Gemini Agent SkillsAI agent database load: patterns, pitfalls, and ScyllaDB mitigationsAI agents for healthcare: deployment patterns and operational impact for cloud and DevOps teamsDesigning an Agent‑Ready Platform: Webflow’s Blueprint for Safe AI‑Generated CodeSelf‑service scaling to 5,000 GKE nodes in under five minutesStable Kubernetes Foundations Power AI Agent Workloads on Amazon EKSObject‑Level RBAC in Basin Catalog: Granular Permissions for EngineersEvidence‑Driven Trustworthy AI Models: What Engineers Need to Adjust Today
GitHub

GitHub CLI media attachment: repeatable --attach flag for inline images and videos

AI SummaryPowered by AI

GitHub CLI v2.99.0 introduces a repeatable --attach flag that uploads local images or videos and inserts them inline in issue, pull‑request, or comment bodies. This lets engineers add visual context from the terminal without opening the web UI, streamlining debugging, review, and automation workflows.

GitHub CLI v2.99.0 adds a repeatable --attach flag that uploads a local image or video and embeds it directly in the Markdown of an issue, pull request, or comment. For engineers who already work from the terminal, this removes the need to switch to the web UI to add visual context, speeding up debugging, review, and automated reporting.

GitHub CLI media attachment workflow

The flag can be used with any command that writes Markdown: gh issue create, gh issue edit, gh issue comment, gh pr create, gh pr edit, and gh pr comment. It is repeatable, so multiple files can be attached in a single invocation. When a path appears in the body, the CLI rewrites the reference to the uploaded asset while preserving the original alt text, e.g. ![alt](./login.png) becomes a link to the hosted image. If a file is attached but not referenced, the CLI appends a Markdown block at the end of the body.

Alt text can be supplied inline using a hash, for example --attach './login.png#Login error state'. If omitted, the filename is used as the fallback description. Supported formats include PNG, JPEG, GIF, WebP, SVG for images and MP4, MOV, WebM for video. Size limits follow the web upload flow: 10 MB for images and GIFs, 10 MB for video on free plans, and 100 MB for video on paid plans.

Operational considerations

Uploads authenticate with the same token that gh auth login or a classic personal access token provides. The token must have write access to the target repository; otherwise the upload fails. GitHub Enterprise Server does not support this flag, so scripts that run against self‑hosted instances need a fallback. Because the flag is repeatable, CI pipelines can batch screenshots or test‑run videos, but they must respect the size caps and ensure the token used in CI has the required scope.

Security implications

The feature does not introduce a new authentication mechanism; it reuses existing OAuth or PAT credentials. Practitioners should verify that the token used by the CLI has only the permissions required for the automation, avoiding broader scopes that could be abused if the token is exposed. Since the uploaded assets become part of the repository’s public or private storage, consider the sensitivity of the media before attaching it, especially in public repositories.

Related CloudNinjas coverage: DevOps.

What This Means For Practitioners

Upgrade gh to v2.99.0 and incorporate --attach into issue‑creation and PR‑creation scripts to capture screenshots or video output without leaving the terminal. Validate token scopes and repository write permissions in your CI/CD configuration. Monitor the size of attached media to stay within plan limits, and plan for an alternative workflow when operating against GitHub Enterprise Server, which currently lacks support for this flag.

Originally published atGitHub Changelog