Skip to main content

htx-cli

htx-cli is a command-line client for the Disk backend API. It supports:

  • SSO-based login by exchanging an authorization code for the backend JWT token
  • Listing remote Disk directories
  • Uploading a local file into a remote Disk directory
  • Uploading a local directory recursively while recreating its folder structure remotely

Install

pip install htx-cli

For local development:

pip install -e .

Commands

Print the SSO authorization URL:

htx login --print-url

Interactive login:

htx login

You can also paste the full callback URL directly:

htx login --code 'https://d.6-79.cn/oauth/qtb/callback?code=...'

Show the authenticated user:

htx whoami

List the root directory:

htx ls

List a nested remote directory by path:

htx ls /Photos/2024

List a remote resource directly by resource ID:

htx ls id:Ab12Cd

The shorter @资源ID form works too:

htx ls @Ab12Cd

Upload a local file into a remote directory:

htx upload ./report.pdf /Docs

Upload a local directory recursively. The local directory name is created or reused under the target remote directory:

htx upload ./albums /Photos

Only upload selected extensions:

htx upload ./albums /Photos --include-ext jpg --include-ext png

Exclude specific extensions:

htx upload ./albums /Photos --exclude-ext tmp --exclude-ext log

You can combine both flags. --exclude-ext takes precedence when both match the same file.

Create a directory under the remote root:

htx mkdir Projects

Create a directory under a specific remote folder:

htx mkdir 2026 /Photos
htx mkdir Archive @Ab12Cd

Rename a remote resource:

htx rename /Photos/old-name.jpg new-name.jpg

Move a remote resource into another remote directory:

htx mv /Photos/new-name.jpg /Archive

Delete a remote file:

htx rm /Archive/new-name.jpg

Delete a non-empty remote directory recursively:

htx rm --recursive /Archive

Download a remote file to the current directory:

htx download /Docs/report.pdf

Download a remote file into a chosen local path:

htx download @Ab12Cd ./downloads/report.pdf

Download a remote directory recursively:

htx download @Ab12Cd ./downloads/Archive

Create a remote link resource:

htx link Search https://www.google.com /Bookmarks

State File

The CLI stores the backend JWT token and the last fetched user payload in:

~/.config/htx-cli/state.json

Use --config to point to a different state file.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

htx_cli-0.1.3.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

htx_cli-0.1.3-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file htx_cli-0.1.3.tar.gz.

File metadata

  • Download URL: htx_cli-0.1.3.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for htx_cli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 bffb7660fdf8d30670235685bd3f3c6ca618a3340b1738f18e708f2564dac85e
MD5 496a467f1e20dad20b34b56a4185f433
BLAKE2b-256 9c5db3f9a9a11429f5d524dd8800f6e50519f84655513957eb31a4bbc0bbe9db

See more details on using hashes here.

File details

Details for the file htx_cli-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: htx_cli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for htx_cli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e820ab5d3c970aa0f386831e52b39642d5906ad9001372779892c757c47b511a
MD5 22d4f88c8535ae37ba5a00e965f9e869
BLAKE2b-256 5159034d3512589e67440bfb78c5a9870a5f7cbd50e2dedeea19fa1f9edbe3b2

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page