CLI Configuration
The DeWeb CLI supports configuration via a JSON file, allowing users to manage essential settings like wallet credentials and node details for seamless website deployment on the Massa blockchain.
Config File Structureβ
Hereβs a sample deweb_cli_config.json
setup:
{
"wallet_password": "your-wallet-password",
"wallet_path": "your-wallet.yaml",
"node_url": "https://mainnet.massa.net/api/v2",
"chunk_size": 64000
}
Hereβs a breakdown of each field:
wallet_password
: The password for your Massa wallet file, used whenwallet_path
is specified.wallet_path
: The file path to your Massa wallet in YAML format. Only YAML wallet files are supported.node_url
: The URL of the Massa node where your website will be uploaded.chunk_size
: Defines the size in bytes of each chunk for file upload. The default is typically64000
, but it can be adjusted based on your needs and network conditions.secret_key
: The secret key for your Massa account. Use this as an alternative towallet_password
andwallet_path
.
If wallet_path
+ wallet_password
and secret_key
are used in the config file, secret_key
will take precedence.
If the SECRET_KEY
environment variable is set, it will take precedence over the secret_key
and wallet
fields in the config file.
Setting Configurations Directly on the Command Lineβ
If you prefer, you can bypass the config file and specify values directly on the command line. For example:
npx @massalabs/deweb-cli upload <website_path> --node_url <your_node_url> --wallet <path_to_wallet> --password <your_password>
You can also set the secret key as an environment variable:
export SECRET_KEY=<your_secret_key>
Additional Resourcesβ
For instructions on obtaining a YAML wallet file or secret key, refer to the Massa Wallet Documentation.
If you encounter issues, please visit our GitHub Issues page for troubleshooting or to report problems.