DAIN CLI
A command-line interface tool for the DAIN Protocol service sdks.
Installation
Install globally via npm:
npm install @dainprotocol/cli -g
Documentation
For detailed documentation, usage guides, and additional information, please visit:
https://docs.dain.org
Usage
dain --help
Init
dain init <project-name>
The following commands require a dain.json file to be present in the root of the project with the following structure:
{
"out-dir": "your-build-output-directory(build/dist)",
"main-file": "your-main-file.(ts/js)",
"deployment-id": "your deploymentId that you will have after the deploy",
"api-key": "your-api-key"
}
Build
dain build
Dev
dain dev
Deploy
An .env file must be present in the root of the project with the following variables:
DAIN_API_KEY=your_api_key
To deploy the project, run the following command:
dain deploy
Status
dain status
Logs
dain logs [-w|--watch]
The -w
or --watch
parameter allows you to monitor logs in real time.
Undeploy
dain undeploy