sgi-cli

module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MIT

README

License GoDoc Release

sgi-cli

CLI tool for Sakamichi Group Information (SGI).

INSTALLATION

Get binary from releases

Built binaries are available from GitHub Releases.
https://github.com/android-project-46group/sgi-cli/releases

MacOS, Linux

# CAUTION: this script adds binary to /usr/local/bin folder
$ curl -Lsf https://github.com/android-project-46group/sgi-cli/main/_tools/scripts/installer.sh | bash
Uninstall

MacOS, Linux

# delete the binary
$ rm /usr/local/bin/sgi

# delete the related files
$ rm -r ~/.sgi
Build from source
  1. Install Go version 1.18 or later
  2. Update your go related environment variables as described in the Go documentation

The install directory is controlled by the GOPATH and GOBIN environment variables. If GOBIN is set, binaries are installed to that directory. If GOPATH is set, binaries are installed to the bin subdirectory of the first directory in the GOPATH list. Otherwise, binaries are installed to the bin subdirectory of the default GOPATH ($HOME/go or %USERPROFILE%\go).

  1. Then you can build from source
$ go install github.com/android-project-46group/sgi-cli/cmd/sgi@latest
Uninstall

Jst delete the binary.

$ rm $GOPATH/bin/sgi

# delete the related files
$ rm -r ~/.sgi
How to set account information

Put the following format json

// ~/.sgi/account.json
{
  "baseURL": "https://uri/to/api_server",
  "apiKey": "your_api_key"
}

Or log-in with login subcommand,

$ sgi login
Please provide your login information.

 BaseURL:
 ...

COMMANDS

member

About members information.
For now, only ls subcommand is available

$ sgi member ls -h
fetch all information

Usage:
  sgi member ls [flags]

Flags:
  -d, --data           print all data
  -g, --group string   group name to fetch
  -h, --help           help for ls
  -j, --json           print as a json format

# list nogizaka members
$ sgi member ls -g nogizaka
group

About groups information.
For now, only ls subcommand is available

$ sgi group ls -h
fetch all information

Usage:
  sgi group ls [flags]

Flags:
  -h, --help   help for ls
  -j, --json   print as a json format

# list nogizaka members
$ sgi group ls

LICENSE

under MIT License.

Directories

Path Synopsis
cmd
sgi

Jump to

Keyboard shortcuts

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