Motrix cli
Automation-ready download engine for AI agents.
npx -y skills add nufegia/motrix-cli --skill motrix-cliAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Control Motrix Next and legacy Motrix downloads through the motrix-cli command-line tool and their local aria2 JSON-RPC backend. Use when an agent needs to install motrix-cli, diagnose Motrix RPC connectivity, add download URLs, list or inspect tasks, pause/resume/remove tasks, wait for downloads to finish, or automate downloads with machine-readable JSON output on macOS.
SKILL.md
4.7 KB, as published. Nobody here has run it
Motrix CLI
Overview
Use motrix-cli to control Motrix Next or legacy Motrix downloads from an agent-friendly terminal workflow. Prefer --json for automation and treat the target as a local app: it must be installed and running, and its aria2 RPC endpoint must be reachable.
By default, motrix-cli targets Motrix Next. Use --app motrix or MOTRIX_APP=motrix for legacy Motrix. JSON responses include target, which identifies the app, config path, RPC URL, and whether the RPC secret is set.
Install Or Locate
Check whether the command is already available:
command -v motrix-cli
motrix-cli doctor --json
If it is missing, install it from GitHub:
curl -fsSL https://raw.githubusercontent.com/nufegia/motrix-cli/main/install.sh | bash
The default install path is ~/.local/bin/motrix-cli. If ~/.local/bin is not in PATH, either add it to PATH or run the full path:
~/.local/bin/motrix-cli doctor --json
To install somewhere else:
curl -fsSL https://raw.githubusercontent.com/nufegia/motrix-cli/main/install.sh | INSTALL_DIR=/usr/local/bin bash
Agent Workflow
- Run
motrix-cli doctor --json. - If Motrix Next is not running, run
motrix-cli open --json, wait briefly, then runmotrix-cli doctor --jsonagain. - Prefer one-step downloads with
motrix-cli download --json "<url>" --timeout <seconds>. - Read the returned
gidand finaltask. - Inspect details with
motrix-cli stat --json "<gid>"ormotrix-cli list --jsonif needed.
Example:
motrix-cli doctor --json
motrix-cli download --json "https://example.com/file.zip" --timeout 3600
To target legacy Motrix explicitly:
motrix-cli --app motrix doctor --json
motrix-cli --app motrix download --json "https://example.com/file.zip"
Common Commands
Use these forms in automation:
motrix-cli list --json
motrix-cli download --json "https://example.com/file.zip" --timeout 3600
motrix-cli download --json "https://example.com/file.zip" --dir "$HOME/Downloads" --out "file.zip"
motrix-cli list --json --status active
motrix-cli stat --json "<gid>"
motrix-cli pause --json "<gid>"
motrix-cli resume --json "<gid>"
motrix-cli remove --json "<gid>"
motrix-cli remove-result --json "<gid>"
motrix-cli purge-completed --json
motrix-cli version --json
motrix-cli rpc-version --json
Use motrix-cli version to check the CLI's own version. Use motrix-cli rpc-version to query the target app's aria2 RPC backend version; it requires the target app to be running.
Use download when the user wants the file downloaded and completed before continuing. Use add when the user only wants to enqueue a task without waiting.
For a specific destination or output filename:
motrix-cli add --json "https://example.com/file.zip" --dir "$HOME/Downloads" --out "file.zip"
JSON Handling
Successful JSON responses include ok: true. Failed JSON responses include ok: false and the command exits nonzero. Always check both the exit code and the ok field when writing robust automation.
Important fields:
target.app:motrix-nextormotrixtarget.configPath: config file used for RPC settingstarget.rpcUrl: local aria2 JSON-RPC endpointgid: aria2 task id returned byaddtask.status: usuallyactive,waiting,paused,complete,error, orremovedtask.progress: percent completetask.path: local file path when availabletask.errorMessage: human-readable failure detail when available
Configuration
By default the CLI reads Motrix Next's macOS config from:
~/Library/Application Support/com.motrix.next/system.json
Legacy Motrix uses:
~/Library/Application Support/Motrix/system.json
Override RPC settings only when needed:
MOTRIX_RPC_HOST=localhost MOTRIX_RPC_PORT=16800 MOTRIX_RPC_SECRET="secret" motrix-cli doctor --json
Supported environment variables:
MOTRIX_APP
MOTRIX_CONFIG
MOTRIX_RPC_HOST
MOTRIX_RPC_PORT
MOTRIX_RPC_SECRET
MOTRIX_RPC_URL
MOTRIX_CONNECT_TIMEOUT
MOTRIX_RPC_TIMEOUT
Safety
Do not print, commit, or share the target app's RPC secret. Do not include system.json in logs or artifacts. Before removing active tasks, make sure the user intended to cancel that download and that target.app is the intended app; remove-result only clears completed/stopped records.