A cross-platform universal tool runner that downloads and caches binaries from URLs, similar to npx but for any binary application. Works on Linux, macOS, and Windows.
curl -LsSf https://raw.githubusercontent.com/DiscreteTom/dtx/main/scripts/install.sh | shDownload from the releases page and put dtx.exe in your PATH.
Build from source
git clone [email protected]:DiscreteTom/dtx.git
cd dtx
cargo build --release
cp target/release/dtx /usr/local/bin/dtxdtx --help
Direct tool executor
Usage: dtx [OPTIONS] <URL> [-- <APP_ARGS>...]
Arguments:
<URL> URL to the binary to download and execute
[APP_ARGS]... Arguments to pass to the executed binary
Options:
-n, --name <NAME> Custom name for the binary (defaults to filename from URL)
-e, --entry <ENTRY> Entry binary path within archive (for zip/tar.gz files)
-f, --force Force refresh cache, re-download even if cached
--cache-dir <CACHE_DIR> Cache directory path [env: DTX_CACHE_DIR=] [default: ~/.dtx/cache]
-h, --help Print help
-V, --version Print versionRun a binary directly from URL:
dtx https://github.com/user/repo/releases/download/v1.0.0/tool -- --helpFor .zip files:
dtx https://example.com/app.zip --entry bin/app -- --helpFor .tar.gz files:
dtx https://example.com/tool.tar.gz --entry tool/bin/tool -- --version{
"mcpServers": {
"server": {
"command": "dtx",
"args": [
"https://example.com/mcp.tar.gz",
"--entry",
"bin/server",
"--",
"params"
]
}
}
}By default, binaries are cached in ~/.dtx/cache/<name>/<url-hash>/ to avoid re-downloading.
Set the DTX_CACHE_DIR environment variable to use a custom cache location:
export DTX_CACHE_DIR=/tmp/.dtx/cache