Use tapd attachment commands to upload TAPD attachments, list existing
attachments, and fetch download URLs for attachments, images, and documents.
All attachment commands use the configured TAPD credentials from tapd login
or the TAPD_ACCESS_TOKEN / TAPD_CLIENT_ID / TAPD_CLIENT_SECRET
environment variables.
Attachment commands require a workspace:
tapd attachment list --workspace-id 123456The short form is also supported:
tapd attachment list -w 123456Attachment commands default to table output:
tapd attachment list -w 123456Use JSON when piping to another program or when you need the full SDK response shape:
tapd attachment list -w 123456 --format jsontapd attachment list -w 123456Paginate large attachment lists:
tapd attachment list -w 123456 --limit 100 --page 2Filter by common fields:
tapd attachment list -w 123456 --id 10001
tapd attachment list -w 123456 --entry-id 1111112222001000001
tapd attachment list -w 123456 --type story
tapd attachment list -w 123456 --filename spec
tapd attachment list -w 123456 --owner aliceUpload a file to a custom field on a TAPD work item:
tapd attachment upload \
-w 123456 \
--entry-id 1111112222001000001 \
--custom-field custom_field_1 \
--file ./spec.pdfThe upload type defaults to story_custom_field, which is the attachment type
documented by TAPD for custom-field uploads. Override it only when TAPD documents
another value for the target endpoint:
tapd attachment upload \
-w 123456 \
--entry-id 1111112222001000001 \
--type story_custom_field \
--custom-field custom_field_1 \
--owner alice \
--filename spec-v2.pdf \
--file ./spec.pdfUpload an image by reading a local file and encoding it as base64:
tapd attachment upload-image-base64 \
-w 123456 \
--entry-id 1111112222001000001 \
--custom-field custom_field_1 \
--image-file ./screenshot.pngOr pass base64 data directly:
tapd attachment upload-image-base64 \
-w 123456 \
--entry-id 1111112222001000001 \
--custom-field custom_field_1 \
--base64-data "$IMAGE_BASE64"Get a normal attachment download URL:
tapd attachment download-url -w 123456 --id 10001Get an image download URL from an image path or URL:
tapd attachment image-url -w 123456 --image-path "/path/to/image.png"Get a document download URL:
tapd attachment document-url -w 123456 --id 20001The attachment command implementation currently lives in:
internal/cmd/attachment.go
When adding or renaming attachment commands:
- Reuse the typed SDK methods from
github.com/go-tapd/tapd. - Keep table output compact and use
--format jsonfor full response data. - Update
features.md. - Update this document.
- Regenerate shell completion files if they have been installed locally.