The Problem: You're deep in flow. You need to update a screenshot in a Jira issue. Now you have to:
- Stop what you're doing
- Find the issue in your browser (which tab was it?)
- Scroll to attachments
- Upload the new version
- Delete the old version
- Try to remember what you were doing
10 minutes gone. Flow state destroyed.
What if attachments were just... files?
That's what Imdone CLI 0.39.0 does. Attachments live in your repo alongside your code. Edit them like any other file. Push changes like you push code.
The New Workflow
Before: The Browser Dance π
# You're working on PROJ-123
vim src/auth.js
# "Oh, I need to update that architecture diagram..."
# Switch to browser
# Open Jira
# Find issue PROJ-123
# Scroll down... down... down to attachments
# Click "Attach files"
# Find the file on your computer
# Upload
# Wait for upload
# Scroll back to attachments
# Click delete on old version
# Confirm deletion
# Finally, back to your editor
# What was I doing again?
After: Stay in Your Workflow β¨
# You're working on PROJ-123
vim src/auth.js
# "Oh, I need to update that architecture diagram..."
# Edit the diagram right there
open backlog/current-sprint/PROJ-123/attachments/architecture.png
# Make your changes, save
# Push to Jira
imdone push
# β Updated: PROJ-123/architecture.png (256KB)
# Back to coding
vim src/auth.js
# Flow unbroken
What's New in 0.39.0
1. Modify Attachments
Edit a file locally. Push syncs the new version to Jira and deletes the old one.
imdone pull
# Edit the file
vim backlog/current-sprint/PROJ-123/attachments/screenshot.png
# Push changes
imdone push
# β Updated: PROJ-123/screenshot.png (125KB)
Safety First: Uses an upload-then-delete pattern. If the upload fails, your old version is preserved in Jira. No data loss on network failures.
2. Delete Attachments
Remove a file locally. Push deletes it from Jira.
rm backlog/current-sprint/PROJ-123/attachments/old-design.pdf
imdone push
# β Deleted: PROJ-123/old-design.pdf
3. Rename Attachments
Rename a file. Push handles the cleanup automatically.
cd backlog/current-sprint/PROJ-123/attachments/
mv draft-v1.png final-design.png
cd -
imdone push
# β Renamed: PROJ-123/draft-v1.png β final-design.png
Behind the scenes: Deletes old attachment from Jira, uploads the renamed file as new.
4. Add New Attachments
Drop a file in the attachments folder. Push uploads it.
cp ~/Desktop/error-log.txt backlog/current-sprint/PROJ-123/attachments/
imdone push
# β Added: PROJ-123/error-log.txt (45KB)
Technical Deep Dive
Git-Aware Detection
The tricky part: Imdone CLI runs imdone pull before imdone push to ensure you're synced. But the pull operation includes a git stash/pop cycle:
- User deletes attachment locally
- Push calls pull
- Pull stashes the deletion
- Pull fetches from Jira (might re-download the attachment!)
- Pull pops the stash
- Push needs to detect the deletion
Solution: Capture git status before the pull operation. Use that pre-analyzed status to detect deleted/renamed attachments, even if pull re-downloaded them.
// Capture status before pull
const preAnalyzedStatus = await status(projectPath, [defaultDirectory]);
// Pull from Jira (might re-download deleted attachments)
await pull({ ...deps, providerPlugin });
// Use pre-analyzed status to detect deletions
const { result } = await _push({ ...deps, preAnalyzedStatus });
Upload-Then-Delete Safety
When modifying attachments, the order matters:
async function replaceAttachment(issueKey, oldAttachmentId, newFilePath) {
// 1. Upload first
const newAttachment = await uploadAttachment(issueKey, newFilePath);
// 2. Only delete if upload succeeded
try {
await deleteAttachment(oldAttachmentId);
} catch (error) {
logger.warn(`Uploaded new but failed to delete old: ${error}`);
// User has duplicate in Jira, but no data loss
}
return newAttachment;
}
If the upload fails, the old version stays in Jira. No data loss.
Metadata Tracking
Attachments are tracked in .metadata.yml files:
attachments:
"12345":
id: "12345"
filename: "screenshot.png"
localPath: "screenshot.png"
size: 45678
lastModified: "2026-01-15T10:30:00Z"
This enables:
- Detecting which files are new vs. modified
- Mapping local files to Jira attachment IDs
- Avoiding unnecessary re-downloads on pull
- Cleaning up orphaned attachments
Getting Started
Installation
npm install -g imdone-cli@0.39.0
Basic Workflow
# Initialize in your repo
imdone init
# Pull issues and attachments
imdone pull
# Your attachments are now local files:
# backlog/
# βββ current-sprint/
# βββ PROJ-123/
# βββ attachments/
# β βββ screenshot.png
# β βββ error-log.txt
# β βββ .metadata.yml
# βββ issue-PROJ-123.md
# Edit any attachment
open backlog/current-sprint/PROJ-123/attachments/screenshot.png
# (make your changes)
# Push changes back to Jira
imdone push
# β Updated: PROJ-123/screenshot.png (125KB)
Full Feature Demo
# Pull latest
imdone pull
# Add a new attachment
cp ~/Desktop/architecture.png backlog/current-sprint/PROJ-456/attachments/
# Modify an existing one
vim backlog/current-sprint/PROJ-123/attachments/bug-report.txt
# Rename another
mv backlog/current-sprint/PROJ-789/attachments/draft.pdf backlog/current-sprint/PROJ-789/attachments/final.pdf
# Delete an outdated one
rm backlog/current-sprint/PROJ-111/attachments/old-screenshot.png
# Push all changes at once
imdone push
# β Added: PROJ-456/architecture.png (256KB)
# β Updated: PROJ-123/bug-report.txt (12KB)
# β Renamed: PROJ-789/draft.pdf β final.pdf
# β Deleted: PROJ-111/old-screenshot.png
Why This Matters
Attachments belong with your code, not in browser tabs.
When you're fixing a bug, you need:
- The code
- The issue description
- The error logs
- The screenshots
Having them scattered across your IDE and browser is cognitive overhead. Having them all in your repo, in the same directory, is flow.
Architecture
Imdone CLI gives you:
your-repo/
βββ src/ # Your code
β βββ auth.js
βββ tests/ # Your tests
β βββ auth.test.js
βββ backlog/ # Your issues (WITH attachments)
βββ current-sprint/
βββ PROJ-123/
βββ issue-PROJ-123.md # Issue content
βββ comments-PROJ-123.md # Discussion
βββ attachments/ # Files
βββ error-log.txt
βββ screenshot.png
βββ architecture.png
Everything in one place. Edit anything. Push to sync.
Try It
npm install -g imdone-cli@0.39.0
imdone init
imdone pull
Two-way sync for Jira issues, comments, and attachments.
All as Markdown and files in your repo.
All in your editor.
Because your best work happens in your editor, not your browser.
Links:
What's your biggest Jira workflow pain point? Drop it in the comments. π

Top comments (0)