Aktar for VS Code
Paste a screenshot into a Markdown file and get a link from your own S3, Cloudflare R2, Backblaze B2, DigitalOcean Spaces or MinIO bucket. No image host in between, no files committed to the repo, links that keep working without the extension.
Works in VS Code, Cursor, Windsurf, VSCodium and other editors built on VS Code.
What it does
- Paste and drop: paste a screenshot or drop files into any editor and choose Upload to your bucket with Aktar in the paste widget. Markdown gets
, HTML gets <img>, anything else the bare URL. Nothing is uploaded unless you pick it, and Aktar: Upload Pasted and Dropped Files by Default makes it the first choice.
- Upload from the Explorer: right-click files and choose Upload with Aktar. The links are copied.
- Share code as a link: select code, right-click, Share Selection as a Link. It goes up as a UTF-8 text file and the link is copied, handy for issues, chats and reviews.
- Recent uploads: Aktar: Recent Uploads copies any of the last 30 links again.
- Same naming as the Aktar apps: path templates,
{short} codes that never replace another file, and location removed from photos.
Setup
Pick one, from the status bar item or Aktar: Set Up:
- Connect to the Aktar app (Aktar for Mac 0.18, Windows 0.11 or Linux 0.15 and later): VS Code uses the app's destinations and never sees the keys. Uploads show up in Aktar's history and run its image processing and hooks. If you already ran
aktar login for the Aktar CLI, the extension offers that connection; otherwise paste the token from Aktar's Settings > Integrations.
- Add from a transfer link: in Aktar on your Mac, PC or phone, open a destination and choose Share, then paste the link and type the 12-character code.
- Add manually: endpoint, bucket, public URL and keys. The extension checks that it can upload before saving.
Keys
Keys you add are kept in VS Code's secret storage, which is the system keychain (macOS Keychain, Windows Credential Manager, the Secret Service on Linux). They're never written to settings and Settings Sync doesn't carry them. Destinations used through the Aktar app have no keys in VS Code at all.
Settings
| Setting |
Default |
|
aktar.pathTemplate |
empty |
Where uploads with keys on this computer go, for example docs/{workspace}/{year}/{short}.{ext}. Empty uses the destination's own path. |
aktar.removeLocation |
true |
Remove the location from photos before upload. |
aktar.copyLinkAfterUpload |
true |
Copy the link after an Explorer upload or a shared selection. |
aktar.showStatusBar |
true |
Show where uploads go in the status bar. |
Template variables: {workspace} {document} {documentFolder} {year} {month} {day} {date} {time} {short} {filename} {ext} {uuid} {random} {sha256}.
Network use
The extension connects only to the storage endpoints and public URLs of the destinations you add, and to the Aktar app on 127.0.0.1 when you connect it. It collects no data and sends no telemetry.
Remote development
Over Remote SSH, in WSL or in a dev container the extension runs on your own computer, so it reaches the Aktar app and your keychain there, and files from the remote workspace are read through VS Code.
About Aktar
Aktar is a free uploader for your own bucket on macOS, Windows, Linux, iOS and Android, with a CLI, an MCP server, a Raycast extension and an Obsidian plugin.
Development
pnpm install
pnpm dev # watch build into dist/
pnpm check # typecheck, production build, tests, shared-code check
pnpm package # aktar-<version>.vsix
Press F5 in VS Code with this folder open to try it in an Extension Development Host. The S3 tests start a throwaway MinIO server when the minio binary is installed, and are skipped otherwise.
Some code (src/s3/sigv4.ts, xml.ts, endpoint.ts, and parts of src/core) is shared with the other Aktar apps and has to stay the same as theirs. pnpm check:ported compares it with their source when it's available, and is skipped otherwise.