Node Manager CLI is a command-line tool designed to manage the setup, update, and maintenance of Nimiq nodes. It simplifies the process of deploying, configuring, and updating Nimiq nodes using Ansible.
- Setup Nimiq Node: Easily set up a Nimiq node for various networks and node types.
- Update Nimiq Node: Check for updates and update the Nimiq node to the latest version.
- Cleanup: Remove all configurations and files related to the Nimiq node setup.
- List Supported Configurations: View all supported protocols, networks, and node types.
- Version Management: View the CLI version.
curl -L -o node-manager-cli https://github.com/maestroi/node-manager-cli/releases/latest/download/node-manager-cli && chmod +x node-manager-cli
-
Clone the repository:
git clone https://github.com/yourusername/node-manager-cli.git cd node-manager-cli
-
Build the CLI:
go build -o node-manager-cli
-
(Optional) Move the binary to
/usr/local/bin
for global access:sudo mv node-manager-cli /usr/local/bin/
Set up a Nimiq node:
sudo ./node-manager-cli setup --network <network> --node-type <node-type> --protocol <protocol>
<network>
: The network to deploy the node on (default:testnet
).<node-type>
: The type of the node (validator
,full_node
,history_node
).<protocol>
: The protocol to deploy (nimiq
).<branch>
: The branch to use for the protocol repository (e.g.,master
,main
).
Example:
sudo ./node-manager-cli setup --network testnet --node-type validator --protocol nimiq
Update the Nimiq node to the latest version:
sudo node-manager-cli update
Force update even if the latest version is already installed:
sudo node-manager-cli update --force
Specify a branch for the update:
sudo node-manager-cli update --branch <branch>
Remove all configurations and files related to the Nimiq node setup:
sudo node-manager-cli cleanup
View all supported protocols, networks, and node types:
node-manager-cli list
View the CLI version:
node-manager-cli version
- Go 1.18+
- Git
node-manager-cli/
├── cmd/
│ ├── cleanup.go
│ ├── list.go
│ ├── root.go
│ ├── setup.go
│ ├── update.go
│ ├── version.go
├── config/
│ ├── config.go
│ ├── constants.go
├── setup/
│ ├── config.go
│ ├── dependencies.go
│ ├── repository.go
│ ├── run.go
│ ├── utils.go
├── go.mod
├── go.sum
├── main.go
To build the CLI, run:
go build -o node-manager-cli
To run the tests, use:
go test ./...
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
This project is licensed under the MIT License. See the LICENSE file for details.