htx-cli command-line client for the Disk backend API
Project description
htx-cli
htx-cli is a command-line client for the Disk backend API. It supports:
- SSO-based login by exchanging an authorization
codefor 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
source /Users/jyonn/Projects/venv/django/bin/activate
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
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file htx_cli-0.1.0.tar.gz.
File metadata
- Download URL: htx_cli-0.1.0.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ece67297b81bd4b07dfecb67c6bf275bf167afd031d42d195fa02918c35bb548
|
|
| MD5 |
824cb4728e519cbf90b4a4ce11814325
|
|
| BLAKE2b-256 |
162352a167852c602c0138880a695132d50f869cb043c577caa21d0b1a485b83
|
File details
Details for the file htx_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: htx_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a9e607eaf51d5b74836c62ff3b89c6d949d7808ae4fd235a2db7f08f341bef6
|
|
| MD5 |
51491f26f1e5038b691b579628847244
|
|
| BLAKE2b-256 |
7efe278d234fa04873aaf345492fe6d0b376955f3dc8313ea970635e77295f92
|