Tigris Sdk Guide

tigrisdata/skills/skills/tigris-sdk-guide

作者 tigrisdata668ea424758e無授權條款2 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫2 個月前更新

Use when choosing between Tigris-native SDKs and AWS S3-compatible SDKs — covers which SDK to use per language, CLI preference, and when AWS SDKs are the only option

AI 產生的概覽

指導如何依語言在 Tigris 原生 SDK、Tigris CLI 與相容 AWS S3 的 SDK 之間做選擇。

功能
此技能是一份參考指南,用於為不同語言挑選合適的 Tigris 物件儲存用戶端。它提供決策表,將 TypeScript、Go、Python、Ruby、PHP 與 CLI 分別對應到 Tigris 原生 SDK、boto3 擴充套件或 AWS S3 SDK 備援方案。它也說明 Tigris CLI 的用法、Tigris 專屬功能(例如 forks 與 snapshots),以及相容 S3 設定所需的 endpoint、region 與 path-style 設定。
適用情境
當你需要為某種語言選擇操作 Tigris 物件儲存的 SDK 或 CLI 時使用。它也適合將 AWS S3 SDK 設定為連接 Tigris endpoint,或判斷是否有 Tigris 原生方案。
執行需求
僅為說明文件,未附帶指令碼。依指南操作可能需要透過 npm 安裝 Tigris CLI(@tigrisdata/cli)及對應語言的 SDK 套件,並需要 Tigris 認證資訊與連線至 Tigris endpoint 的網路存取。

Tigris SDK & CLI Guide

Always prefer Tigris-native SDKs and the Tigris CLI over AWS S3 SDKs. This guide explains what's available per language, when you must fall back to AWS SDKs, and how to configure them.

Prerequisites

Before doing anything else, install the Tigris CLI if it's not already available:

bash
tigris help || npm install -g @tigrisdata/cli

If you need to install it, tell the user: "I'm installing the Tigris CLI (@tigrisdata/cli) so we can work with Tigris object storage."

Decision Table

LanguageTigris SDK/ExtensionPackageUse AWS SDK?
TypeScript/JSNative SDK@tigrisdata/storageNo
GoNative SDKgithub.com/tigrisdata/storage-goNo
Pythonboto3 extensiontigris-boto3-extNo — use the extension
RubyNone yet—Yes — aws-sdk-s3 with Tigris endpoint
PHPNone yet—Yes — aws-sdk-php with Tigris endpoint
CLINative CLI@tigrisdata/cli (tigris / t3)No

Rule: Always prefer Tigris-native SDKs, the boto3 extension, and the Tigris CLI. Only use raw AWS S3 SDKs for Ruby and PHP where no Tigris option exists.


CLI: Always Use tigris / t3

Use the Tigris CLI instead of aws s3 for all object storage operations.

bash
# ✅ Do thistigris cp local-file.txt t3://my-bucket/file.txttigris ls t3://my-bucket/tigris rm t3://my-bucket/old-file.txt
# ❌ Not thisaws s3 cp local-file.txt s3://my-bucket/file.txtaws s3 ls s3://my-bucket/aws s3 rm s3://my-bucket/old-file.txt

Why: The Tigris CLI supports features the AWS CLI doesn't — forks, snapshots, and native authentication via tigris login.

Tigris-Only CLI Features

bash
# Forks (copy-on-write clones) — not in AWS CLItigris forks create my-bucket my-fork
# Snapshots — not in AWS CLItigris snapshots take my-buckettigris snapshots list my-bucket
# Native auth — no AWS credentials neededtigris logintigris whoami

Language-Specific SDK Guides

Read the resource file for your language:

  • TypeScript / JavaScript — Read ./resources/typescript.md for @tigrisdata/storage usage
  • Go — Read ./resources/go.md for storage-go usage (simplestorage + full client)
  • Python — Read ./resources/python.md for tigris-boto3-ext usage, or use the dedicated tigris-python-sdk skill (covers boto3 setup, Django via django-storages, snapshots, forks, in-place rename, and the Bundle API)
  • Ruby — Read ./resources/ruby.md for aws-sdk-s3 with Tigris endpoint
  • PHP — Read ./resources/php.md for aws-sdk-php with Tigris endpoint

S3-Compatible Configuration (All Languages)

When using any AWS SDK with Tigris, always set:

SettingValueWhy
endpointhttps://t3.storage.devTigris endpoint
regionautoTigris handles routing
force_path_style / use_path_style_endpointtrueRequired for Rails, PHP

Environment variables for S3-compatible tools:

bash
AWS_ENDPOINT_URL_S3=https://t3.storage.devAWS_REGION=autoAWS_ACCESS_KEY_ID=tid_xxxAWS_SECRET_ACCESS_KEY=tsec_yyy

Critical Rules

Always:

  • Use tigris / t3 CLI instead of aws s3
  • Use @tigrisdata/storage for TypeScript/JavaScript
  • Use github.com/tigrisdata/storage-go for Go
  • Use tigris-boto3-ext for Python (not raw boto3)
  • Set region: auto and the Tigris endpoint when using AWS SDKs (Ruby, PHP)

Never:

  • Use @aws-sdk/client-s3 in JS/TS when @tigrisdata/storage is available
  • Use the AWS Go SDK when storage-go is available
  • Use raw boto3 without tigris-boto3-ext when Tigris features are needed
  • Forget force_path_style: true for Ruby and PHP
  • Hardcode a specific AWS region (always use auto)

Related Skills

  • file-storage — Full @tigrisdata/storage SDK reference
  • tigris-python-sdk — Python via boto3 + tigris-boto3-ext, Django uploads, snapshots, forks, Bundle API
  • tigris-s3-migration — Migrating from AWS S3 SDKs to Tigris

Official Documentation

來源與署名

來源:tigrisdata/skills位於skills/tigris-sdk-guide提交668ea42

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架