This page details the steps for getting started with an enterprise app. For information on available apps, see the Apps section on the Decision Stack page.
If this is your first time using GitHub you will need to add SSH keys to your GitHub account to associate it to your machine. Instructions on doing so can be found here.
We manage access to our repositories using GitHub teams, generally you will be added at the beginning of your trial.
After installing the precompiled packages, set the following environment variables in your
~/.zshrc or a similar configuration file.
export GOPATH=$(go env GOPATH)export GOROOT=$(go env GOROOT)export GOPRIVATE=github.com/nextmv-io/*export PATH=$PATH:$GOPATH/bin
Note that if you installed Go directly from Golang, you do not need to add exports for GOPATH or GOROOT. If you installed go via Homebrew, you will need to add those lines to
~/.zshrc. If you were using bash previously, also be sure to source
~/.zshrc by running
~/.gitconfig will work best if it directs
git to clone repositories over ssh. Add the following to your configuration file.
[url "[email protected]:"]insteadOf = https://github.com/
We use Go modules to handle packages. More information about Go modules and packages can be found in our Organizing Model Source docs section.
Go package documentation is the best way to learn the Nextmv Decision Stack.
To read the package documentation, start a local
godoc server from your terminal.
go get -u golang.org/x/tools/cmd/godocgodoc -http=:6060
Alternately, you can download these for offline use with
mkdir hop-package-docscd hop-package-docswget -m -k -q -erobots=off --no-host-directories \--no-use-server-timestamps http://localhost:6060/ \-I pkg/github.com/nextmv-io/code/
To build your app with Nextmv, start by downloading and installing the external packages listed in the
go.mod file by running:
go get ./...
go get command will create a
go.sum file (if not already present) that contains hashes of each module to ensure the same files are being retrieved upon each build. At this point, you should have all of the necessary packages needed to build our executable binary.
Change directory into the
./cmd/model-name package (replace model-name with your model package name) and run the following command to compile all of the packages named in the import path of
Notice that a
./model-name binary should have been created.
You have several options for runing a model with Nextmv. The easiest one is the Command Line Interface (CLI) runner. You can use flags to tell Hop where to read the data and where to write it, among other options.
Before running the binary using the CLI runner, first view available flags using:
This is an example of how to run the binary using some of the flags provided:
./model-name \-hop.runner.input.path data/input.json \-hop.solver.limits.duration 10s \-hop.runner.output.path data/output.json
This command will tell the runner to read data from a
./data/input.json file, set the solver duration to 10 seconds, and write it to a
The CLI runner will print JSON to standard out.