Skip to content

vngcloud/greennode-cli

Repository files navigation

GreenNode CLI

The GreenNode CLI (grn) is a unified tool to manage your GreenNode services from the command line.

Getting Started

Requirements

  • No dependencies required — grn is a single binary

Installation

Download the latest binary for your platform from GitHub Releases:

macOS / Linux:

# Download (replace OS and ARCH as needed)
curl -L -o grn https://github.com/vngcloud/greennode-cli/releases/latest/download/grn-darwin-arm64
chmod +x grn
sudo mv grn /usr/local/bin/

Or build from source:

git clone https://github.com/vngcloud/greennode-cli.git
cd greennode-cli/go
go build -o grn .
sudo mv grn /usr/local/bin/

Verify installation:

grn --version
# grn-cli/0.1.0 Go/1.22.2 darwin/arm64

Configuration

Before using the GreenNode CLI, you need to configure your credentials. There are three ways:

Method 1: Environment variables

export GRN_ACCESS_KEY_ID=your-client-id
export GRN_SECRET_ACCESS_KEY=your-client-secret
export GRN_DEFAULT_REGION=HCM-3

Method 2: Interactive setup (recommended)

grn configure
GRN Client ID [None]: <your-client-id>
GRN Client Secret [None]: <your-client-secret>
Default region name [HCM-3]:
Default output format [json]:

Method 3: Credentials file (manual)

# ~/.greenode/credentials
[default]
client_id = your-client-id
client_secret = your-client-secret
# ~/.greenode/config
[default]
region = HCM-3
output = json

Credentials are obtained from the VNG Cloud IAM Portal under Service Accounts.

Credential resolution order: environment variables take priority over the credentials file.

To use multiple profiles:

grn configure --profile staging
grn --profile staging vks list-clusters

For more configuration options, see the Configuration Guide.

Basic Commands

The GreenNode CLI uses a multi-part command structure:

grn <service> <command> [options and parameters]

For example, to list your VKS clusters:

grn vks list-clusters

To get help on any command:

grn help
grn vks
grn vks create-cluster --help

To check the version:

grn --version

Getting Help

The best way to interact with our team is through GitHub:

More Resources

License

Apache License 2.0 — see LICENSE.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors