GaiaNet CLI options
After installing the GaiaNet software, you can use the gaianet CLI to manage the node. The following are the CLI options.
help
You can use gaianet --help to check all the available CLI options.
gaianet --help
## Output
Usage: gaianet {config|init|run|stop|OPTIONS}
Subcommands:
config Update the configuration.
init Initialize the GaiaNet node.
run|start Start the GaiaNet node.
stop Stop the GaiaNet node.
Options:
--help Show this help message
version
You can use gaianet --version to check your GaiaNet version.
gaianet --version
init
The gaianet init command initializes the node according to the $HOME/gaianet/config.json file. You can use some of our pre-set configurations.
gaianet initwill init the default node. It's an RAG application with Gaianet knowledge.gaianet init --config muawill init a node with the MUA project knowledge.gaianet init --base <path>will init a node in an alternative directory.
You can also use gaianet init url_your_config_json to init your customized settings for the node. You can customize your node using the Gaianet node link. If you're familiar with the Gaianet config.json, you can create your own manually. See an example here.
gaianet init --config https://raw.githubusercontent.com/GaiaNet-AI/node-configs/main/pure-llama-3-8b/config.json
start
The gaianet start is to start running the node.
- Use
gaianet startto start the node according to the$HOME/gaianet/config.jsonfile. - Use
gaianet start --base $HOME/gaianet-2.altto start the node according to the$HOME/gaianet-2/config.jsonfile. - Use
gaianet start --local-onlyto start the node for local use according to the$HOME/gaianet/config.jsonfile.
stop
The gaianet stop is to stop the running node.
- Use
gaianet stopto stop running the node. - Use
gaianet stop --forceto force stop the GaiaNet node. - Use
gaianet stop --base $HOME/gaianet-2.altto stop the node according to the$HOME/gaianet-2/config.jsonfile.
config
The gaianet config can update the key fields defined in the config.json file.
gaianet config --helpwill list all the available argumentsgaianet config --chat-url <url>will change the download link of the chat model.gaianet config --prompt-template <template>will change the prompt_template of the chat model.gaianet config --chat-ctx-size <size>will change the context size of the chat model. The default value is 4096.gaianet config --embedding-url <url>will change the download link of the embedding model.gaianet config --embedding-ctx-size <size>will change the context size of the embedding model. The value here is associated with the embedding model you choose.gaianet config --port <port>will change the port of the Gaianet node API server.gaianet config --system-prompt "<prompt>"will change the system prompt.gaianet config --rag-prompt "<prompt>"will change the rag prompt.gaianet config --reverse-prompt "<prompt>"will change the reverse prompt.gainet config --base <path>will modify the<path>/config.jsonparameters.
After you use gaianet config to change some parameters, please
- use
gaianet initto make your settings take effect. - use
gaianet startto start your new node.
If you use gaianet config --base $HOME/gaianet-2.alt to update some settings, please
- use
gaianet init --base $HOME/gaianet-2.altto make your settings take effect. - use
gaianet start --base $HOME/gaianet-2.altto start your new node.
The gaianet config supports multiple parameters in one command. The example below will change the download link and prompt template of the chat model at the same time.
gaianet config --chat-url https://huggingface.co/gaianet/gemma-1.1-2b-it-GGUF/resolve/main/gemma-1.1-2b-it-Q5_K_M.gguf --prompt-template gemma-chat
The output is the following.
[+] Updating the url of chat model ...
* Old url: https://huggingface.co/gaianet/Llama-3-8B-Instruct-GGUF/resolve/main/Meta-Llama-3-8B-Instruct-Q5_K_M.gguf
* New url: https://huggingface.co/gaianet/gemma-1.1-2b-it-GGUF/resolve/main/gemma-1.1-2b-it-Q5_K_M.gguf
[+] Updating the prompt template of chat model ...
* Old template: llama-3-chat
* New template: gemma-chat
[+] COMPLETED! The config.json is updated successfully.
base
The --base option is global. You can combine it with other subcommands to specify a base directory for the GaiaNet node other than the $HOME/gaianet.