transctl -- a new command line client for transmission RPC hosts

Discussion of Transmission that doesn't fit in the other categories
Post Reply
Posts: 1
Joined: Tue Dec 03, 2019 10:47 pm

transctl -- a new command line client for transmission RPC hosts

Post by kenshaw » Tue Dec 03, 2019 11:17 pm


Just wanted to let the general Transmission users know about "transctl", a command-line client for transmission RPC hosts. It's available here: additionally, if you interact with Transmission RPC hosts through Go, I've written a much simpler, more "Go idiomatic" client package, available via:

Code: Select all

$ go get -u
Documentation for the Go package is available here:

I put "transctl" together in less than a day, so the documentation is not stellar/great at the moment. I will flesh it out, and provide better output (json, yaml, wide, etc) options for queries, as well as "$EDITOR" based editing for torrents/configuration. The command-line style is inspired by "kubectl", "git", and other "modern *ctl" command-line utilities. I hope that it is somewhat intuitive for those who are experienced with those tools.

In the interim, here's some examples on how it's used on the command-line:

Code: Select all

# install
$ go get -u

# show help
$ transctl 
$ transctl help get
$ transctl get --help

# retrieve torrents
$ transctl -v -h localhost:9091 -u user:pass get 15 16 SomeName* 
$ transctl -U http://user:pass@host:9091/transmission/rpc/

# add a default url
$ transctl config default.url http://user:pass@host:3000/transmission/rpc/

# create a new context and use context to retrieve all torrents
$ transctl config context.myhost.url http://user:pass@myhost:port/transmission/rpc/
$ transctl -c myhost get --all

# change default context to myhost context
$ transctl config default.context myhost

# show remote config
$ transctl config --remote --all

# set remote config option "peer-port"
$ transctl config --remote peer-port 51413

# move one or more torrents
$ transctl move --dest /path/to/destination 15 16 SomeName*

# start, stop, verify, reannounce, remove for torrent with ID 1
$ transctl start 1
$ transctl stop 1
$ transctl verify 1
$ transctl remove --rm 1

# change queue position (not shown: 'queue down' and 'queue top', which work the same)
$ transctl queue up 15 16 SomeName*
$ transctl queue bottom 100 200 *AnotherThing*

# show available free space
$ transctl free-space /path/to/media1 /path/to/media2

# shutdown
$ transctl shutdown
After I've better cleaned up the code, and fixed the output options and added some other features (such as jsonpath queries for torrents),

Some other features (non-exhaustive list):
-- .netrc support for remote hosts
-- Sane default settings, and password fallback (transmission:transmission) for localhost
-- Supports exact ID and hash matching, name globbing, and fuzzy searching for torrents

Any feedback would be greatly appreciated. It's worth noting this is very much "alpha" stage, however I will finish polishing this up (not too much work more is necessary), and release binaries for macOS, Windows, and Linux.

Thanks and cheers!


Post Reply