Skip to content

Repo containing software to aid node runners

License

Notifications You must be signed in to change notification settings

radixdlt/babylon-nodecli

Repository files navigation

Node cli

License

The Babylon Node CLI is licensed under the Radix Software EULA.

The Babylon Node CLI code is released under Apache 2.0 license.

      Copyright 2023 Radix Publishing Ltd

      Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

      You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

      See the License for the specific language governing permissions and limitations under the License.

1. Introduction

Executable name - babylonnode

All the below commands can be executed on Ubuntu 22.04 (supported OS) as below

babylonnode <sub command>

To download the cli, following instructions from [here](https://docs.radixdlt.com/main/node-and-gateway/cli-install.html)

The command line interface (CLI) provides a collection of tools for below tasks. It is organized in a hierarchy of subcommands, and each level comes with its own built-in documentation of command syntax and options.

  1. To interact with node using common API calls

  2. To setup node quickly on a fresh ubuntu machine using docker compose or systemd

  3. To setup gateway on a fresh ubuntu machine using docker-compose

  4. To setup monitoring for the node or gateway.

For complete command reference refer document Command reference

2. Interaction with node on api endpoints

To list the endpoints supported by cli

$ babylonnode api


usage: babylonnode [-h] {version,system,core}
babylonnode: error: the following arguments are required: apicommand

To list the methods supported by the endpoints say for example core endpoint

$babylonnode api core
usage: babylonnode [-h]
                 {network-configuration,network-status,entity,key-list,mempool,mempool-transaction,update-validator-config}
                 ...

Core Api comands

positional arguments:
  {network-configuration,network-status,entity,key-list,mempool,mempool-transaction,update-validator-config}

account commands

positional arguments:
  {register-validator,unregister-validator,get-info}

3. More usage instructions

To list all subcommands

# To list the subcommands
babylonnode -h
usage: babylonnode.py [-h]
                    {docker,systemd,api,monitoring,version,optimise-node,auth}

positional arguments:
  {docker,systemd,api,monitoring,version,optimise-node,auth}
                        Subcommand to run

optional arguments:
  -h, --help            show this help message and exit
```

To list options/arguments for the subcommand

# Check the options for a subcommand such as start-docker
babylonnode docker -h

usage: babylonnode.py [-h] {setup,start,stop,configure} ...

Docker commands

positional arguments:
  {setup,start,stop,configure}

optional arguments:
  -h, --help            show this help message and exit