Installation

megacmd is written against go 1.3 and exhibits bugs when compiled with newer versions. Additionally due to the amount of time since the last stable release and with no stable release obvious in the future is it preferable to compile the latest version from git to try and avoid known and fixed issues.

Ensure you're in your home directory

cd

Create ~/bin and add it to your shell's PATH if you haven't done so before.

Install the required Go 1.3 compiler. We will fetch an official pre-compiled binary ready for use.

wget https://storage.googleapis.com/golang/go1.3.3.linux-amd64.tar.gz

Unpack the Go compiler

tar xvf go1.3.3.linux-amd64.tar.gz

Copy the Go binaries to the ~/bin directory

cp ~/go/bin/* ~/bin/

Clone the megacmd Git repository

git clone https://github.com/t3rm1n4l/megacmd.git

Change to the megacmd directory

cd megacmd

Compile megacmd

GOROOT="${HOME}/go" make

Copy the compiled megacmd to the ~/bin directory, allowing it to be used in any directory

cp megacmd ~/bin/

Configuration

You can edit ~/.megacmd.json using your favourite editor like nano (eg: nano ~/.megacmd.json), and fill out your user credentials. It is not currently possible to store these encrypted so plain text is the only option when using this tool.