tcmd GO command line tool is available now


  • administrators

    Thanks to @Xander's feature request, I created a command line tool you can use instead of curl to easily run commands on your remote computer by running a tcmd command on your local computer.

    I wrote it in Go so I could easily compile a version for each OS, like Linux, Windows or Mac (Darwin), and each CPU architecture like 32bit (386) or 64bit (amd64).

    Just download the tool you need for your OS, and rename it to tcmd. The rename is not required, but I recommend it for simplicity.

    These are the versions:

    Mac 32bit
    Mac 64bit
    Linux 32bit
    Linux 64bit
    Linux arm (Raspberry Pi)
    Windows 32bit
    Windows 64bit (most common)

    If you want to try running the Linux version in Windows bash, you'll want to copy your token.tkn file to your bash home folder like this:

    mkdir ~/.TRIGGERcmdData
    cp /mnt/c/Users/Russ/.TRIGGERcmdData/token.tkn ~/.TRIGGERcmdData/
    tcmd -computer DS -trigger notepad -params russ.txt
    

    Here's an example from my Raspberry Pi:

    wget https://triggercmdagents.s3.amazonaws.com/tcmd_cli/tcmd-linux-arm
    mv tcmd-linux-arm tcmd
    chmod +x ./tcmd
    ./tcmd
    No trigger specified.  Use --help or -h for help.
    ./tcmd -h
    NAME:
    tcmd - Run commands on computers in your TRIGGERcmd account
      USAGE:
        tcmd-linux-arm [options]
    
      OPTIONS:
        --trigger value, -t value   Trigger name of the command you want to run
        --computer value, -c value  Name of the computer (leave blank for your default computer)
        --params value, -p value    Any parameters you want to add to the remote command
        --help, -h                  show help
        --version, -v               print the version
    
    ./tcmd -c ds -t calculator
    {"data":    {"user":"58bb3a75f2f63133224755b1","computer":"5a2f8be70f883803178e0dee","name":"Calculator","voice":"calculator","voiceReply":null,"allowParams":false,"runCount":24,"createdAt":"2018-03-30T22:59:35.862Z","updatedAt":"2018-06-23T15:48:04.031Z","id":"5abec157a745e8110063aa18"},"message":"Trigger sent."}
    

    If you want to see the source code, check out https://github.com/rvmey/triggercmdGOclient


Log in to reply
 

Looks like your connection to TRIGGERcmd Forum was lost, please wait while we try to reconnect.