Skip to main content

wgp: command line client for wgetpanel (github.com/cumulus13/wgetpanel)

wgetpanel cli client. talks to the server's API v1 with a per-device token. Needs requests and asciichartpy (graphs).

pip install wgp
# or 
pip install git+https://github.com/cumulus13/wgetpanel/cli
# or
pip install -r cli/requirements.txt
wgp login http://localhost:8000 -u admin     # asks for the password, token saved in ~/.config/wgetpanel/config.json (0600)

Optional single executable (built and run on Linux; a Windows .exe has to be built on Windows, not tested here):

pip install pyinstaller && pyinstaller --onefile --name wgp cli/wgp.py     # -> dist/wgp

Global options (--host --token --timeout --insecure-tls --json) work before or after the command. Environment: WGP_HOST, WGP_TOKEN, WGP_CONFIG, WGP_PASSWORD, WGP_HTTP_PASSWORD, NO_COLOR, WGP_ASCII=1. Exit codes: 0 ok, 1 refused / nothing affected / a waited download failed, 2 usage, login or connection problem.

Command What it does
login HOST -u USER [--device NAME] / logout / whoami token handling; logout revokes the token on the server
tokens / tokens revoke ID devices of your account
health database + redis status (no login needed)
summary [--no-graph] counts, speed, scheduler state, total speed graph
list [-s STATUS] [-n N] [-q] download table
show ID [--log [N]] [--no-graph] details, retry state, error, speed graph, wget log tail
add URL... [-f FILE] [-d DIR] [-o NAME] [--limit KB/S] [--retry N|always|off] [--at 'HH:MM'|--in 2h] [-w] queue downloads; more options: --tries --timeout-net --user-agent --referer -H --insecure --auth-user
wait ID... follow until finished (exit 0 only if all completed)
pause resume retry cancel remove ID... ids, ranges 3-7, lists 1,4,9
cancel/remove ID --delete-files / --keep-files also delete the file on the server; no flag = server setting files.delete_on_remove
top bottom up down ID... reorder queued downloads
purge [ID...] [--delete-files] remove finished downloads from the list
get ID [-o PATH] [--force] copy a finished file from the server (progress bar, .part then rename)
graph [ID] [--follow] ASCII speed graph (total or one download)
watch [ID...] live dashboard over SSE: summary, speed graph, table
events [--json] [--type T] [--count N] raw event stream for scripts
settings / settings get KEY / settings set KEY VALUE ... staff: server settings (-v shows help texts)
rules / rules add NAME --from 09:00 --to 17:00 --limit 256 --days mon-fri / edit / enable / disable / delete ID staff: speed rules

Examples:

wgp add https://example.com/big.iso --retry always --limit 500 --at 02:00      # keep trying forever, 500 KB/s, start tonight
wgp add -f urls.txt --retry 5 -w                                               # 5 consecutive failures allowed, wait for all
wgp watch                                                                      # live view, Ctrl-C to quit
wgp remove 3-9 --delete-files                                                  # drop from the list AND delete the files
wgp settings set retry.default_max 3 files.delete_on_remove true
wgp list --json | jq '.downloads[] | select(.status=="error") | .id'

Notes: --at HH:MM / --in use the local clock of the machine running wgp. get cannot resume an interrupted transfer (the server does not support Range requests yet). Colors and unicode bars are switched off for pipes, NO_COLOR and WGP_ASCII=1.

for cli args with colors use rchf (pip install rchf)


👤 Author

Hadi Cahyadi

Buy Me a Coffee

Donate via Ko-fi

Support me on Patreon

Metadata

Release files for wgp 0.1.0

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

Source distribution (sdist)

Source distribution for wgp 0.1.0
File Size Uploaded Provenance
wgp-0.1.0.tar.gz 22.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for wgp 0.1.0
File Interpreter ABI Platform
wgp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 42.6 kB

Release files / wgp-0.1.0.tar.gz

Download URL wgp-0.1.0.tar.gz
Size 22.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9f60066d834a739a9cfe0a466754397854c6fd625137148d084dfbae22e62735
BLAKE2b-256 checksum
How to use checksums
2083c61e06766ea8b96f4c68d03d76f96d77ceaae4b291c8c1a50911bcfd1790
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / wgp-0.1.0-py3-none-any.whl

Download URL wgp-0.1.0-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ffce35c3ed930610914e545c66ec2f82dec811b44c1853ef5442cfa56b3ca1c
BLAKE2b-256 checksum
How to use checksums
ba34527a910a7d3d98269a9c9f7a190ca20ec1e698adee9e6fba2ef8eee486e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for wgp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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