Help us shape the future of Go! Take the 2026 Go Developer Survey

cli

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

README

mvn.sh CLI

The official command-line client for mvn.sh. It installs an authenticated mvn.sh repository profile in Maven's settings.xml.

Install

Go
go install github.com/mvn-sh/cli@latest
Release archive

Download the archive for your platform from GitHub Releases, then place the mvnsh binary on your PATH.

Usage

mvnsh login

The CLI opens mvn.sh in your browser. Sign in, choose a team and repository, and approve the scoped credential. The CLI then updates ~/.m2/settings.xml with:

  • a Maven server containing the token credentials;
  • a repository and plugin repository profile;
  • an active-profile entry.

Existing Maven configuration is retained. Managed entries are marked with mvnsh: comments and replaced on subsequent logins. The original file is copied to ~/.m2/settings.xml.bak, and the resulting settings file is restricted to the current user.

For automation, provide an existing scoped token:

MVN_TOKEN='mvn_…' mvnsh login --team acme --repository releases

Run mvnsh login -h for all options, including custom Maven settings and profile paths.

Local development

go test ./...
go build -o bin/mvnsh .

To use a local mvn.sh stack:

./bin/mvnsh login \
  --app-url 'http://localhost:3000' \
  --api-url 'http://localhost:8080' \
  --base-url 'http://%s.localhost:8080'

License

Apache License 2.0

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL