Communitygithub.com

cli-anything-tigris

一個無狀態的命令列介面,專門用於 Tigris 物件儲存,封裝官方 `tigris` CLI,並透過單一入口點與 `--json` 輸出支援所有 Tigris 操作。

cli-anything-tigris 是什麼?

`cli-anything-tigris` 是一個專為 AI 代理設計的命令列工具,它封裝了官方 `tigris` CLI,提供一個統一的入口點來操作 Tigris 物件儲存的所有功能,包括儲存桶管理、物件操作、快照、IAM、範圍憑證和 OAuth。該工具支援 `--json` 輸出,讓 AI 代理可以輕鬆解析結構化結果,並包含 REPL 互動模式。它專注於 Tigris 原生功能,而非通用 S3 端點工具,因此不支援 MinIO、Cloudflare R2 或 AWS S3 等服務。Tigris 的獨特優勢在於全球分佈(無出口費用)、快照功能以及範圍憑證,可實現每個代理的隔離,非常適合需要安全、高效物件儲存管理的 AI 工作流程。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-tigris

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

cli-anything-tigris 是做什麼的?

一個無狀態的命令列介面,專門用於 Tigris 物件儲存。封裝官方 tigris CLI,讓所有 Tigris 基礎功能(快照、IAM、範圍憑證、OAuth)都能透過單一、對代理友好的入口點,搭配 --json 選項使用。

範圍

此工具僅用於官方 Tigris CLI。它會呼叫 tigris 二進位檔,並假設已透過 tigris login 或 Tigris 存取金鑰進行驗證。它不是一個通用的 S3 端點工具,也不管理 MinIO、Cloudflare R2、AWS S3 或任何與 S3 相容的端點。

安裝

# 1. 安裝底層 Tigris CLI
npm install -g @tigrisdata/cli
# 或:
brew install tigrisdata/tap/tigris

# 2. 進行驗證(瀏覽器 OAuth)
tigris login

# 3. 安裝此工具
pip install cli-anything-tigris

先決條件:

  • Python 3.10+
  • 系統 PATH 中需有 tigris CLI(別名為 t3)

使用方式

基本指令

# 顯示說明
cli-anything-tigris --help

# 啟動互動式 REPL
cli-anything-tigris

# 查詢身分(JSON 輸出,適用於代理)
cli-anything-tigris --json auth whoami

# 列出儲存桶
cli-anything-tigris --json bucket list

# 上傳本地檔案
cli-anything-tigris --json object put --bucket my-bucket --key path/to/file.txt --file ./local.txt

# 下載物件
cli-anything-tigris --json object get --bucket my-bucket --key path/to/file.txt --output ./out.txt

# 伺服器端複製
cli-anything-tigris --json object cp t3://my-bucket/src.txt t3://my-bucket/dst.txt

# 建立快照
cli-anything-tigris --json snapshot take my-bucket --name baseline-v1

# 刪除儲存桶;需要加上 --yes
cli-anything-tigris --json bucket delete --name old-bucket --yes

# 為代理執行建立範圍存取金鑰
cli-anything-tigris --json access-key create my-agent-key
cli-anything-tigris --json access-key assign tid_AaBb --bucket my-bucket --role Editor

# 輪換或刪除存取金鑰;需要加上 --yes
cli-anything-tigris --json access-key rotate tid_AaBb --yes
cli-anything-tigris --json access-key delete tid_AaBb --yes

# 預先簽署的下載 URL(1 小時)
cli-anything-tigris --json presign get --bucket my-bucket --key path/to/file.txt --expires 3600

REPL 模式

當不帶子指令執行時,CLI 會進入一個互動式 REPL,支援 Tab 自動補全和指令歷史。

指令群組

auth

基於 OAuth 的驗證。

指令說明
login瀏覽器 OAuth 登入 (tigris login)
logout登出當前工作階段
whoami顯示已驗證的使用者 / 組織

bucket

儲存桶 CRUD。

指令說明
list列出所有儲存桶
create --name NAME建立儲存桶
delete --name NAME --yes刪除空的儲存桶(需要 --yes)
info NAME取得儲存桶資訊

object

物件操作(封裝 tigris ls/cp/rm/stat)。

指令說明
list --bucket B [--prefix P] [--limit N]列出物件
put --bucket B --key K (--file F | --text T)上傳物件
get --bucket B --key K --output F下載物件
delete --bucket B --key K刪除物件
info --bucket B --key K物件元資料(HEAD / stat)
cp SRC DST [-r]複製。接受 t3:// 或 tigris:// URI。

presign

有時效性的 URL。

指令說明
get --bucket B --key K [--expires SEC]預先簽署的下載 URL
put --bucket B --key K [--expires SEC]預先簽署的上傳 URL

snapshot

儲存桶的時間點快照——Tigris 特有的基礎功能。

指令說明
list BUCKET列出儲存桶的快照
take BUCKET [--name N]建立快照

access-key

範圍程式化憑證——可與 snapshot 結合,實現每個代理的隔離。

指令說明
list列出所有存取金鑰
create NAME建立新的存取金鑰(機密僅顯示一次)
get KEY_ID顯示金鑰詳細資訊
delete KEY_ID --yes永久刪除金鑰(需要 --yes)
assign KEY_ID --bucket B --role R將金鑰範圍限定到某個儲存桶和角色
rotate KEY_ID --yes輪換金鑰的機密(需要 --yes)

iam

政策和組織使用者。

指令說明
policy list列出 IAM 政策
policy create NAME --document FILE從 JSON 檔案建立政策
user list列出組織使用者
user invite EMAIL [--role R]邀請使用者

輸出格式

所有指令都支援雙重輸出模式:

  • 人類可讀(預設):表格、顏色、格式化文字
  • 機器可讀(--json):JSON 封裝(或上游 CLI 的 --format json 輸出,直接轉送)

給 AI 代理的提示

當以程式方式使用此 CLI 時:

  1. 始終傳遞 --json 以獲得可解析的輸出。
  2. 檢查回傳碼——0 表示成功,非零表示錯誤。
  3. 讀取 stderr 以取得錯誤訊息。
  4. object cp 接受 t3://bucket/key 或 tigris://bucket/key URI;伺服器端複製(t3 → t3)完全跳過資料來回傳輸。
  5. presign 在人類模式下會在 stdout 回傳 URL;在 JSON 模式下則會是 url 欄位。
  6. 對於破壞性操作:刪除儲存桶、刪除存取金鑰和輪換存取金鑰都需要明確的 --yes;請先對目標儲存桶建立 snapshot,再進行操作,最後決定保留或捨棄快照。
  7. 對於每個代理的隔離:使用 access-key create + access-key assign --bucket B --role Editor 來建立一個僅限於單一儲存桶的金鑰;代理執行結束時,使用 access-key delete 來撤銷金鑰。

為什麼選擇 Tigris

  • 全球分佈。 資料放置在靠近讀取位置的地方。
  • 無出口費用。 代理從任何地方提取成品時,不會產生按區域計算的頻寬費用。
  • 快照 + 範圍憑證。 一般與 S3 相容的供應商不提供這些基礎功能——這是實現每個代理隔離的基礎。
  • 與 S3 相容。 可與支援 S3 的工具一起使用,但此工具本身並非通用的 S3/MinIO/R2/AWS 端點管理器。

版本

1.0.0

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

相關技能