Command motki
contains interactive command-line tools for managing EVE Online character and corporation assets and industrial processes.
Download the latest pre-built motki
binary for your platform.
Note that the default configuration connects to
motki.org:18443
using SSL.
Alternatively, you can install the MOTKI CLI with go get
.
go get -u github.com/motki/cli/cmd/motki
Usage of motki:
-credentials string
Username and password separated by a colon. (ie. "frank:mypass")
-history-file string
Path to the CLI history file. (default ".history")
-insecure-skip-verify
INSECURE: Skip verification of server SSL cert.
-log-level string
Log level. Possible values: debug, info, warn, error. (default "warn")
-profile string
Enable profiling. Writes profiler data to current directory.
Possible values: cpu, mem, mutex, block, trace.
-server string
Backend server host and port. (default "motki.org:18443")
-version
Display the application version.
Some functionality in the application requires authenticating with the remote motkid installation (by default, the Moritake Industries website).
To authenticate:
-
Ensure you have a valid account with characters linked on the remote motkid installation.
-
Configure
motki
to use your credentials.- Pass them via command-line option:
motki -credentials username:password
- Pass them via environment variables:
MOTKI_USERNAME=username MOTKI_PASSWORD=password motki
The recommended way to build this project is using make
, though it is compatible with go get
and friends.
Prerequisites:
- A semi-recent version of
git
. - A valid
go
toolchain install and environment configuration.
-
Clone or download and extract the source code and place it in the proper place inside your
$GOPATH
.mkdir -p $GOPATH/src/github.com/motki git clone https://github.com/motki/cli $GOPATH/src/github.com/motki/cli cd $GOPATH/src/github.com/motki/cli
-
Use the included Makefile to build the application.
cd $GOPATH/src/github.com/motki/cli make clean build
-
Run the newly built executable.
./build/motki
Each build target supports specifying GOOS
and GOARCH
to facilitate cross-compiling. For example, building the MOTKI CLI for 32-bit ARM linux:
make build GOOS="linux" GOARCH="arm"
See the Go language documentation for more information on supported OSes and architectures.
Build the motki
program for a combination of OSes and architectures with make matrix
. Use OSES
and ARCHES
to configure which platforms to target.
make matrix OSES="windows linux darwin" ARCHES="amd64 x86"
Download and install motki
and its dependencies using go get
.
go get -u github.com/motki/cli/...
After go get
exits successfully, you should have a new command in your $GOBIN
called motki
. Along with the binary, the application source code will be located within your $GOPATH
.
Build and run motki
by switching to the source directory under your $GOPATH
and using go build
.
cd $GOPATH/src/github.com/motki/cli
go build -o ./motki ./cmd/motki/*.go
./motki -h
Profile the application by passing the -profile
flag. For example:
./build/motki -profile cpu
The profiler will write to the current directory in a file named after the profile type. The example above results in cpu.pprof
.
Once you have exited the process, use go tool pprof
or go tool trace
to review the output.
go tool pprof ./build/motki ./cpu.pprof
For more information about profiling Go applications, check out the blog post or documentation.