Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 1, 2026. It is now read-only.
/ dtx Public archive

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.

License

Notifications You must be signed in to change notification settings

DiscreteTom/dtx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dtx - Direct Tool Executor

GitHub Release

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.

Installation

Linux

curl -LsSf https://raw.githubusercontent.com/DiscreteTom/dtx/main/scripts/install.sh | sh

Windows

Download from the releases page and put dtx.exe in your PATH.

MacOS

Build from source
git clone [email protected]:DiscreteTom/dtx.git
cd dtx
cargo build --release
cp target/release/dtx /usr/local/bin/dtx

Usage

Full CLI Usage

dtx --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 version

Basic Examples

Run a binary directly from URL:

dtx https://github.com/user/repo/releases/download/v1.0.0/tool -- --help

Archive Support

For .zip files:

dtx https://example.com/app.zip --entry bin/app -- --help

For .tar.gz files:

dtx https://example.com/tool.tar.gz --entry tool/bin/tool -- --version

Use with Binary MCP Servers

{
  "mcpServers": {
    "server": {
      "command": "dtx",
      "args": [
        "https://example.com/mcp.tar.gz",
        "--entry",
        "bin/server",
        "--",
        "params"
      ]
    }
  }
}

Cache

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

About

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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published