Skip to main content

SaveXTube CLI

sxt is the lightweight open CLI client for a running SaveXTube server. It covers basic automation-friendly workflows: login, submit downloads, inspect jobs, retrieve completed files, manage simple subscriptions, update common settings, monitor status, and read logs.

Installation

pipx install savextube-cli

Or install it into the current Python environment:

python -m pip install savextube-cli

For local development:

python -m pip install -e .
sxt --version

Commands

sxt login
sxt login http://nas.local:8530
sxt login http://nas.local:8530 -u admin -p admin
sxt logout
sxt whoami
sxt whoami --json

sxt dl 'URL'
sxt dl 'URL' --json
sxt dl 'URL' --wait --json
sxt dl 'URL' --transfer
sxt dl 'URL' --transfer --delete-source
sxt job list
sxt job list --json
sxt job show JOB_ID
sxt job show JOB_ID --json
sxt job show JOB_ID --files
sxt job show JOB_ID -f 1 --json
sxt job watch JOB_ID                  # 持续输出实时进度
sxt job watch JOB_ID --interval 5 --jsonl  # Agent/IM 使用的 JSON Lines 事件流
sxt job retry JOB_ID                  # 重新提交失败任务的原始 URL
sxt job retry JOB_ID --wait --json
sxt job cancel JOB_ID                 # 取消进行中的下载
sxt job cancel JOB_ID --json
sxt job save JOB_ID
sxt job save JOB_ID --file 1
sxt job del JOB_ID
sxt job del --all --yes

sxt his list
sxt his list --json
sxt his show ID
sxt his show ID --json
sxt his show ID --files
sxt his show ID -f 3
sxt his show ID -f 3 --json
sxt his video save ID
sxt his video save ID --file 1
sxt his asr ID
sxt his asr ID --status --json
sxt his asr ID --wait --json
sxt his asr ID --force --wait --json
sxt his asr save ID
sxt his asr save ID -o ./transcript.md --json
sxt his text ID --wait --json         # asr 的易懂别名
sxt his text save ID -o ./transcript.md
sxt his summary ID -o ./summary.md --json
sxt his mindmap ID -o ./mindmap.xmind --json
sxt his del ID
sxt his del --all --yes

sxt sub list
sxt sub list --sub
sxt sub list --fav
sxt sub list --fav --json
sxt sub add 'URL' -p Bilibili -i 60 -m video -t sub
sxt sub add 'BILIBILI_FAVORITES_URL' -t fav -i 60
sxt sub fav 'BILIBILI_FAVORITES_URL' -i 60
sxt sub run ID --json
sxt sub toggle ID
sxt sub del ID

sxt set list
sxt set list --json
sxt set get youtube.download_cover
sxt set get youtube.download_cover --json
sxt set youtube.download_cover true
sxt set import ./savextube.toml
sxt set export ./savextube.toml
sxt set proxy http://127.0.0.1:7890
sxt set qb get host
sxt set qb host 192.168.2.134
sxt set qb port 8988
sxt set cookie list
sxt set cookie show youtube
sxt set cookie update youtube ./cookies.txt
sxt set wechat scan
sxt set wechat status
sxt set wechat relogin
sxt set wechat stop
sxt set wechat reply on
sxt set wechat delete-source off

sxt key list
sxt key list --json
sxt key add "自动化脚本"
sxt key add "自动化脚本" --json
sxt key toggle 1
sxt key del 1 --yes

sxt mon list
sxt mon list -w
sxt mon list --user USERNAME
sxt mon list --json

sxt log
sxt log --json
sxt log -f

sxt completion zsh
sxt completion bash
sxt completion fish

sxt job show JOB_ID and sxt his show ID display album metadata when available: artist, audio quality, bitrate, format, save location, track count, total size, and the track file list.

Add --json to query commands when another agent or script needs stable machine-readable output. sxt dl --json is also supported because it returns the job_id used by follow-up automation. Mutation-only commands rely on exit status for scripts.

Transcription and AI-generated files

Configure the user's ASR provider in Web Settings first. The CLI deliberately does not accept API keys, so credentials do not leak into shell history. Configure the user's LLM provider before generating summaries or mind maps.

An agent or Skill can use this flow:

# Find a completed single-file video/audio history item.
sxt his list --json

# Start transcription and wait for the terminal status.
sxt his asr 123 --wait --timeout 3600 --json

# Inspect the current or completed status without starting a new task.
sxt his asr 123 --status --json

# Download the generated Markdown.
sxt his asr save 123 -o ./video-transcript.md --json

# `text` is an alias for `asr`.
sxt his text 123 --status --json

# Generate files from the completed transcription.
sxt his summary 123 -o ./video-summary.md --json
sxt his mindmap 123 -o ./video-mindmap.xmind --json

Direct HTTP API equivalents, authenticated with Authorization: Bearer <JWT>:

Method Path Purpose
POST /api/asr/test Test an ASR form configuration
POST /api/history/<id>/transcription Start transcription; JSON body supports force
GET /api/history/<id>/transcription Read status and progress
GET /api/history/<id>/transcription/download Download Markdown
GET /api/history/<id>/summary Generate and download a Markdown summary
GET /api/history/<id>/mindmap Generate and download an XMind file

sxt his asr --wait --json returns submitted and transcription. The transcription object contains status, progress, provider, model, language, error, has_result, and updated_at. A failed terminal status also makes the command exit non-zero.

summary and mindmap require a completed transcription. Both commands save the generated file locally and return the saved path with --json.

JSON contract

--json output is UTF-8 JSON with original API fields preserved. Scripts should prefer the normalized fields below when present.

Common item fields:

Field Meaning
id Download job ID or history ID
title Display title
platform Platform name
status Current status, such as done, failed, running
url Original source URL
content_type Main media type: video, image, music, or service value
item_type Music subtype when available: track, album, playlist
type_label Human-readable type label
file_path Main saved path
file_size Total size in bytes when available
files_count Number of files/tracks/images
files File list
meta Raw metadata object from history storage

Music fields:

Field Meaning
artist Artist name
quality_name Audio quality label, such as 无损
bitrate Audio format detail, such as 16bit/44.1kHz/993kbps
format Container or codec format, such as FLAC

File fields from sxt job show JOB_ID -f N --json or sxt his show ID -f N --json:

Field Meaning
index File index used by --file
filename File name
path Saved file path
size File size in bytes
size_text Human-readable file size
title Parent item title
platform Parent item platform
item_type Parent item type
artist Parent artist when available
quality_name Parent audio quality when available
bitrate Parent bitrate when available
format File format
created_at Parent creation time
url Parent source URL

Configuration

The CLI stores its server URL and JWT token in:

~/.config/savextube/cli.json

Environment variables override the saved config:

SXT_SERVER=http://nas.local:8530
SXT_TOKEN=...
SXT_CONFIG_DIR=/tmp/sxt-test

Scope

The CLI intentionally stays small. Pro-style administration and visual workflows, such as full user management, invite-code administration, cookie editing, widget layout, and advanced security setup, belong in the Web UI.

Metadata

Release files for savextube-cli 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for savextube-cli 0.1.7
File Size Uploaded
savextube_cli-0.1.7.tar.gz 40.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for savextube-cli 0.1.7
File Interpreter ABI Platform
savextube_cli-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 72.4 kB

Release files / savextube_cli-0.1.7.tar.gz

Download URL savextube_cli-0.1.7.tar.gz
Size 40.4 kB
Tags Source
SHA-256 checksum
How to use checksums
99649847ddd3795c194f5d0d159c29940d447f6895e8e38e206430589318e220
BLAKE2b-256 checksum
How to use checksums
bdc008a082e86a2e0e0ed3fa512ff2d8a0c72824a2e653c445e1e0b4efed3bd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / savextube_cli-0.1.7-py3-none-any.whl

Download URL savextube_cli-0.1.7-py3-none-any.whl
Size 32.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
106ffa2d04fce3da853e4e01bbfc94a8aafd8b8943ab5ce4e04349447ec30cd7
BLAKE2b-256 checksum
How to use checksums
074e548c36b89ca948b8ed007156c2233ba52e8522a83eceeade36990f681e29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page