S.EE Docs
개발자

CLI

S.EE 플랫폼용 명령줄 클라이언트

S.EE 플랫폼용 명령줄 클라이언트입니다. 터미널에서 직접 단축 URL, 텍스트 스니펫, 파일을 생성하고 관리할 수 있습니다.

기능

  • 단축 URL 관리: 사용자 정의 슬러그, 도메인, 만료일이 포함된 단축 링크를 생성, 수정, 삭제합니다
  • 텍스트 스니펫: stdin 또는 파일에서 코드 스니펫과 메모를 공유합니다
  • 파일 업로드: 파일을 직접 업로드하거나 stdin 으로 업로드할 수 있습니다
  • 도메인 및 태그 관리: 사용 가능한 도메인 조회와 태그 관리를 지원합니다
  • 비밀번호 보호: 비밀번호로 콘텐츠를 보호할 수 있습니다
  • JSON 출력: 스크립트용 기계 판독 출력 제공

설치

macOS

brew tap sdotee/homebrew-tap
brew install see

Debian / Ubuntu

dpkg -i see-cli_<version>_<arch>.deb

RHEL / Fedora

rpm -i see-cli_<version>_linux_<arch>.rpm

Arch 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>

설정 옵션

OptionEnvironment VariableDescription
--api-keySEE_API_KEYS.EE API 키 (필수)
--base-urlSEE_BASE_URL사용자 정의 API 기본 URL
--timeoutSEE_TIMEOUT요청 제한 시간
--json-JSON 출력 형식 활성화

명령어

도메인 및 태그

# List available domains for short URLs
see domains

# List available domains for file uploads
see file domains

# List your tags
see tags

단축 URL

# 생성 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

이 페이지