開発者
CLI
S.EE プラットフォーム向けコマンドラインクライアント
S.EE プラットフォーム向けのコマンドラインクライアントです。ターミナルから直接、URL短縮、テキストスニペット、ファイルの作成と管理を行えます。
機能
- URL短縮管理: カスタムスラッグ、ドメイン、有効期限付きのURL短縮リンクを作成、更新、削除できます
- テキストスニペット: stdin またはファイルからコードスニペットやメモを共有できます
- ファイルアップロード: ファイルを直接、または stdin 経由でアップロードできます
- ドメイン / タグ管理: 利用可能なドメインの一覧取得やタグ管理ができます
- パスワード保護: パスワードでコンテンツを保護できます
- JSON 出力: スクリプト向けに機械可読な出力を利用できます
インストール
macOS
brew tap sdotee/homebrew-tap
brew install seeDebian / Ubuntu
dpkg -i see-cli_<version>_<arch>.debRHEL / Fedora
rpm -i see-cli_<version>_linux_<arch>.rpmArch Linux
yay -S see-cli
# or pre-built binary
yay -S see-cli-binソースから
go install github.com/sdotee/cli@latestビルド済みバイナリおよび各種パッケージは GitHub Releases からダウンロードできます。
設定
API キーは環境変数またはフラグで指定できます:
# Environment variable (recommended)
export SEE_API_KEY="your-api-key"
# Or use the flag
see --api-key "your-api-key" <command>設定オプション
| オプション | 環境変数 | 説明 |
|---|---|---|
--api-key | SEE_API_KEY | S.EE API キー (必須) |
--base-url | SEE_BASE_URL | カスタム API ベース URL |
--timeout | SEE_TIMEOUT | リクエストタイムアウト |
--json | - | JSON 出力を有効にします |
コマンド
ドメイン / タグ
# List available domains for short URLs
see domains
# List available domains for file uploads
see file domains
# List your tags
see tagsURL短縮
# 作成 a short URL
see url create https://example.com
# 作成 with custom options
see url create https://example.com \
--slug my-link \
--domain s.ee \
--title "My Link" \
--password secret \
--expires 2024-12-31
# Update a short URL
see url update --domain s.ee --slug my-link --title "New Title"
# URL短縮を削除
see url delete --domain s.ee --slug my-linkテキストスニペット
# 作成 text from stdin
echo "Hello World" | see text create --title "greeting"
# 作成 text from file
see text create --file ./snippet.txt --title "Code Snippet"
# 作成 with options
cat script.sh | see text create \
--title "Shell Script" \
--domain fs.to \
--password secret \
--expires 2024-12-31
# テキストを更新
see text update --domain fs.to --slug abc123 --title "Updated Title"
# テキストを削除
see text delete --domain fs.to --slug abc123ファイルアップロード
# ファイルをアップロード
see file upload ./image.png
# カスタムドメインでアップロード
see file upload ./document.pdf --domain fs.to
# stdin からアップロード
cat image.png | see file upload --stdin --filename image.png
# ファイルを削除
see file delete <delete-hash>JSON 出力
スクリプト用途では、--json フラグを付けて機械可読な出力をご利用ください:
see url create https://example.com --json | jq '.short_url'例
URL短縮を作成してクリップボードへコピーする (macOS)
see url create https://example.com --json | jq -r '.short_url' | pbcopyスクリーンショットをアップロードして URL を取得する (Linux)
see file upload ~/screenshot.png --json | jq -r '.url'URL短縮を一括作成する
while read url; do
see url create "$url" --json
done < urls.txt