Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Latest Version Travis Build Software License Donate 15 Donate 25 Donate 50 Tweet

tusc is tus 1.0.0 client protocol implementation for bash.

tusc lets you upload big files to servers supporting tus protocol right from your terminal.

If anything goes wrong, you can rerun the command to resume upload from where it was left off.

Fun Fact: Git LFS also supports protocol.


# Requirements:
# jq
sudo apt install jq -y

curl -sSLo ~/tusc
# for global binary
chmod +x ~/tusc && sudo ln -s ~/tusc /usr/local/bin/tusc
# OR, for user binary
chmod +x ~/tusc && mv ~/tusc ~/.local/bin/tusc

System Requirements

  • base64
  • curl
  • dd
  • grep
  • mktemp
  • readlink, realpath
  • sha1sum, sha256sum, seq, sleep

Donot worry, in a typical UNIX flavored system these are likely to be there already.

Usage and Examples

  tusc v0.5.0 | (c) Jitendra Adhikari
  tusc is bash implementation of tus-client (

    tusc <--options> -- [curl args]
    tusc <host> <file> [algo] -- [curl args]

    -a --algo      The algorigthm for key &/or checksum.
                   (Eg: sha1, sha256)
    -b --base-path The tus-server base path (Default: '/files/').
    -c --creds     File with credentials; user and pass in shell syntax:
    -C --no-color  Donot color the output (Useful for parsing output).
    -f --file      The file to upload.
    -h --help      Show help information and usage.
    -H --host      The tus-server host where file is uploaded.
    -L --locate    Locate the uploaded file in tus-server.
    -S --no-spin   Donot show the spinner (Useful for parsing output).
    -u --update    Update tusc to latest version.
       --version   Print the current tusc version.

    tusc --help                           # shows this help
    tusc --update                         # updates itself
    tusc --version                        # prints current version of itself
    tusc    0:1080    ww.mp4              # uploads ww.mp4 to
    tusc -H 0:1080 -f ww.mp4              # same as above
    tusc -H 0:1080 -f ww.mp4 -- -Lv       # same as above plus sends -Lv to curl command
    tusc -H 0:1080 -f ww.mp4 -a sha256    # same as above but uses sha256 algo for key/checksum

If you want to parse the output of tusc, pass in -C (no color) and -S (no spin) flags. Eg:

# Locate the URL of a file and download it
wget $(tusc -H 0:1080 -f ww.mp4 -L -S -C | cut -c 6-999) -O ww.mp4.1


If your tusd server requires special header or token for auth, just pass in [curl args]:

tusc -H 0:1080 -f ww.mp4 -b /store/ -- -H 'Authorization: Bearer <token>'

In fact you can pass in anything after -- as extra curl parameter.


See tusc in action with debug mode where the upload is aborted frequently with Ctrl+C interrupt.

Screen Preview


To print the debugging information pass in DEBUG=1 env like so:

DEBUG=1 tusc 0:1080 ww.mp4

To print the lines of script as they are executed, create a debug file:

touch ~/.tus.dbg

To revert the above step, just remove the debug file:

rm ~/.tus.dbg

Trying Out

To get hands on in local machine, you can install tusd server.


# run tusd server (
tusd -dir ~/.tusd-data > /dev/null 2>&1 &

# start uploading large files
DEBUG=1 tusc --host 0:1080 --file /full/path/to/large/file

While upload is in progress, you can force abort it using Ctrl+C.

Then resume upload again:

DEBUG=1 tusc --host 0:1080 --file /full/path/to/large/file

It should start from where it last stopped.

You can check the uploaded files like so:

ls -al ~/.tusd-data


  • adhocore - Lead Developer
  • tonk - Credential support
  • Wouter van Hilst - Chunked upload