Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 1.4 KB

CLI.md

File metadata and controls

35 lines (27 loc) · 1.4 KB

The Athens CLI

The Athens registry provides a crude "admin" API that allows you to upload new versions of modules to the registry.

Note: The API is currently crude mostly because it currently is not protected by authentication or authorization. Everybody has "god mode"!

Athens provides a basic CLI for the registry that makes it convenient to upload a new module, or new version of a module, to the server. Find the code for it in the ./cli directory, and build it with the following:

make cli

When the build completes, you'll get a athens binary in the same directory. The binary is limited right now. Run it like this:

./athens <directory> <baseURL> <module> <version>

A few additional notes on this CLI:

  • It is hard coded to make requests against http://localhost:3000, so you'll need to have the Athens server running to successfully use it. See Development in the README for details on how to do that
  • <directory> will be zipped up and uploaded to the Athens server
  • ... and it needs to have a go.mod file in its root
  • The go.mod file's 'module' directive must match <module>. athens won't currently read the go.mod file for you (that's planned though)
  • If there are any vendor directories under <directory>, they won't be ignored yet (that's planned though)