
Aktar
io.github.getaktarv0.4.0更新於 Oct 5, 2026
Upload files to your own S3, Cloudflare R2 or B2 bucket through the Aktar app and get links.
概覽
讓助理透過 Aktar 桌面應用程式把檔案上傳到你自己的 S3、Cloudflare R2 或 Backblaze B2 儲存桶,並取回可分享的連結。
- 功能
- 以本機 MCP 伺服器(aktar mcp)方式執行,透過 Aktar 應用程式上傳檔案並回傳連結、Markdown 與 HTML。工具包含 upload_file、upload_clipboard、replace_file、search_uploads、list_destinations、list_bucket、create_temporary_link、get_thumbnail、list_watched_folders、get_status,以及僅在啟用時提供的 delete_upload。目的地、儲存金鑰、路徑範本與連結設定都來自 Aktar 應用程式,因此不需要額外設定。
- 適用情境
- 適合讓助理把截圖、報告、建置產物等檔案發布到你自己的儲存空間並取回連結,或需要查詢過往上傳、瀏覽儲存桶、產生臨時連結的情境。適用於檔案本來就透過 Aktar 桌面應用程式處理的流程。
- 執行需求
- 需要 Node.js 18 或更新版本,以及 Aktar 桌面應用程式(Mac 0.4.0 或更新版本,或 Windows 版),並開啟本機連線。先執行 aktar login 連線,貼上 Aktar 設定 > 整合中顯示的權杖;權杖會存到 CLI 設定檔,也可透過 AKTAR_TOKEN 環境變數提供(若連接埠有變更則用 AKTAR_PORT)。僅支援桌面端。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Aktar,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Aktar CLI
Upload files to your own S3, Cloudflare R2 or Backblaze B2 bucket from the terminal, and get the link.
[npm version] [CI] [MIT license]
[aktar upload in a terminal: links, Markdown and JSON output]
The aktar command talks to the Aktar app on your Mac or Windows PC, so it uses the destinations, keys, path templates and link settings you already set up there. Your storage keys never leave the app.
Install
Or run it without installing: npx @getaktar/cli upload file.png.
Requires Node.js 18 or later and Aktar for Mac 0.4.0 or later, or Aktar for Windows.
Connect to Aktar
- In Aktar, open Settings > Integrations and turn on Allow local connections.
- Copy the token shown there.
- Run:
and paste the token when asked. It's checked against Aktar and saved to ~/.config/aktar/cli.json (%APPDATA%\aktar\cli.json on Windows), readable only by you. You can also pipe it in (pbpaste | aktar login) or set AKTAR_TOKEN (and AKTAR_PORT if you changed the port) instead.
Usage
Without -d, files go to the destination selected in Aktar's menu bar. Uploads show up in Aktar's history like any other.
--format chooses what's printed: url (default), markdown, html, or custom (your template from Aktar). --expires takes 1, 7, 14 or 30 days and needs Aktar's auto-delete rules on that destination; without it, files are kept.
--name uploads a single file under another name: it's what {filename} and {ext} in the destination's path template become, and what Aktar's history shows. If the name has no extension, the file's own is added (--name cover uploads IMG_4021.jpg as cover.jpg); if it has one, it's used as given. With --folder, it's the name inside the folder.
If the same file (same contents, destination and expiry) is already in the bucket, Aktar doesn't upload it again and gives you the existing link. aktar prints the link as usual and notes it on stderr (aktar: photo.jpg: already uploaded, reused the existing link), so scripts reading stdout still get one link per file. This needs Aktar for Mac 0.10.0 or Windows 0.3.0.
QR codes
aktar upload --qr prints a QR code under each link, so you can open it on your phone. The QR code is always of the link itself, whatever --format prints. It's drawn black on white in the terminal, whatever its theme; when the output isn't a terminal, or NO_COLOR is set, it's drawn without colors (light modules as blocks), which phone cameras read on a light or dark background. --qr can't be combined with --json.
aktar qr <text> shows the QR code of any link or text; quote text with spaces. Given an upload ID from aktar history --json, it shows that upload's link and its QR code. --png <file> saves the QR code as a PNG instead:
What Aktar does for you
The app does the work per destination, so the CLI needs nothing extra for it:
- Converting images to WebP or AVIF, if the destination is set to
{md5}and{sha256}in path templates, to name files by their contents- Big files: past 5 GB, Aktar uploads in parts and resumes after a dropped connection.
aktarstreams the file to the app, so its size doesn't matter
The link aktar prints is the one for the file as stored, after any conversion.
JSON output
aktar upload --json prints an array with one entry per uploaded file:
reused is true when nothing was uploaded because the file was already there; older versions of Aktar leave it out.
Exit codes
AI agents (MCP and skill)
MCP server
aktar mcp runs a Model Context Protocol server, so Claude, Cursor, VS Code, Codex and other agents can upload through Aktar, find past uploads and make links. Connect Aktar first (aktar login), then add it to your agent:
For Claude Desktop, Cursor, VS Code and others that take a JSON config:
Without a global install, use "command": "npx", "args": ["-y", "@getaktar/cli", "mcp"].
Uploading publishes a file, so keep an eye on what your agent sends. Your agent asks before calling a tool unless you allow it, and these options narrow what the server can do:
--root <folder>: only upload files from this folder (repeat for more). Paths are resolved, symlinks included, before they're checked.--read-only: only the tools that change nothing (search, list, links, thumbnails).--allow-delete: also offerdelete_upload, which is left out by default.
The server speaks both the current per-request protocol (2026-07-28) and the earlier initialize versions (2024-11-05 to 2025-11-25).
Agent skill
Agents that use skills but not MCP can use the CLI directly. aktar skill prints a SKILL.md that teaches them how:
Typora
In Typora, open Settings > Image > Image Upload, choose Custom Command and enter:
Typora passes the image paths and reads one link per line. Click Test Uploader to check it.
Links
- Website: https://getaktar.com/cli/
- Aktar for Mac and Windows: https://getaktar.com
- Homebrew:
brew install getaktar/tap/aktar-cli
License
MIT
來源:README.md,提交 9ac1494
工具
0版本歷史
1- v0.4.0最新Oct 5, 2026
