gladiusio / gladius-cli Goto Github PK
View Code? Open in Web Editor NEWGladius CLI for managing nodes
License: GNU General Public License v3.0
Gladius CLI for managing nodes
License: GNU General Public License v3.0
Add a folder in ~/.config/gladius-cli
that stores nodeFile.json
, /keys
, and a .env
When typing an unknown command into the CLI, the help menu references gladius-cli
not gladius
$ gladius status
Error: unknown command "status" for "gladius-cli"
Run 'gladius-cli --help' for usage.
unknown command "status" for "gladius-cli"
When you run gladius edge
it will crash with the following error:
panic: runtime error: index out of range
goroutine 1 [running]:
github.com/gladiusio/gladius-node/vendor/github.com/gladiusio/gladius-cli/commands.edge(0xa11380, 0xa36ff0, 0x0, 0x0)
/home/alex/go/src/github.com/gladiusio/gladius-node/vendor/github.com/gladiusio/gladius-cli/commands/nodeCommands.go:231 +0x5dd
github.com/gladiusio/gladius-node/vendor/github.com/spf13/cobra.(*Command).execute(0xa11380, 0xa36ff0, 0x0, 0x0, 0xa11380, 0xa36ff0)
/home/alex/go/src/github.com/gladiusio/gladius-node/vendor/github.com/spf13/cobra/command.go:760 +0x2c1
github.com/gladiusio/gladius-node/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xa11840, 0xc42019df58, 0x72467d, 0xa11840)
/home/alex/go/src/github.com/gladiusio/gladius-node/vendor/github.com/spf13/cobra/command.go:846 +0x30a
github.com/gladiusio/gladius-node/vendor/github.com/spf13/cobra.(*Command).Execute(0xa11840, 0xc42001a0b8, 0x0)
/home/alex/go/src/github.com/gladiusio/gladius-node/vendor/github.com/spf13/cobra/command.go:794 +0x2b
github.com/gladiusio/gladius-node/vendor/github.com/gladiusio/gladius-cli/commands.Execute()
/home/alex/go/src/github.com/gladiusio/gladius-node/vendor/github.com/gladiusio/gladius-cli/commands/root.go:30 +0x2d
main.main()
/home/alex/go/src/github.com/gladiusio/gladius-node/cmd/gladius-cli/main.go:8 +0x20
The gladius status
command is extremely limited. It claims to be running, but it doesn't indicate what it's actually doing. This command should be updated to provide more useful status information. #
Hello,
I tried to rent my bandwidth but its look like I need a pool. so how can I get it?
Add a page that does what the UI does but in the CLI
Currently the generated files (gpg keys and nodeFile.json) are stored together with the application code in $NPM_CONFIG_PREFIX/lib/node_modules/gladius-cli:
The directory and json file should be moved to a different path so we can easily replace the application code and also backup and secure the keys and nodeFile.json.
I propose to do this move in two steps, so we don't break the running beta installations:
1. Step:
Change the program code, so it looks for the keys and the nodeFile.json in $HOME/.gladius-cli
The program is executed with init
command:
The init
command will still create the files in $NPM_CONFIG_PREFIX/lib/node_modules/gladius-cli. Nothing changes here.
The program is executed with any other command:
init
and abort program execution2. Step:
Add the parameter --config
(overwriteable by environment variable $CONFIG
) which will specify the third directory to look for the files.
When executed with the parameter or env var set the application behaves a little different:
The program is executed with init
command and $CONFIG set:
Execute init
process but write files to the directory specified in $CONFIG
. It's the users task to make sure the program has write permissions to create the directory or create the necessary files inside the directory.
The program is executed with any other command and $CONFIG
set:
$CONFIG
. If valid files are found proceed with executioninit
and abort program executionif a user their wallet password they should be able to create a new one without having to delete the .config/gladius/wallet directory
Private key stored in plain text, and can be easy accessible if get access to user(or root) account.
How about hash key, or use encryption?
add logging in for the ErrorHandler
Make the responses more clear when user calls gladius-node status
before gladius-node start
. Also make it more clear that user isn't technically an edge node if they are not connected to a pool - TEST
When entering a pool address or other data, do validation to make sure it really is a pool. This means checking for spaces in front of the pool address, verifying that the contract is actually an instance of a pool contract, etc.
Import private and public keys
Create a command to call the /api/keystore/account/open
endpoint to unlock the wallet.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.