CLI
Overview of the SettleMint CLI
About
The SettleMint CLI provides a command-line interface for interacting with the SettleMint platform. It enables you to manage your blockchain networks, deploy smart contracts, configure your SettleMint infrastructure directly from the terminal.
Usage
As a dependency in your package.json
Globally install the CLI
You can access the CLI globally by running settlemint
in your terminal.
GitHub Action
Execute SettleMint CLI commands directly in your GitHub Actions workflows using our official GitHub Action.
For detailed setup and usage instructions, check out our documentation.
Basic example:
Examples
Get the version of the CLI
Get help for a command
The CLI uses a hierarchical command structure. You can navigate through available commands and subcommands using the --help
flag at any level.
Login to the platform
To use the SettleMint CLI, you first need to authenticate with the platform. Create a Personal Access Token (PAT) on the SettleMint platformand paste it when prompted by the login command.
Visit the documentation to learn how to create a Personal Access Token.
Then run the login command and paste your token when prompted:
Creating a new project from a template
To create a new project from a template, use the create
command with the --template
flag:
Installing dependencies
To install the dependencies for your project, use the dependencies
command.
Connecting to your SettleMint infrastructure
After creating your project, you'll need to connect it to your SettleMint infrastructure. This requires setting up environment variables with your SettleMint credentials and infrastructure details.
You can use the connect
command to automatically configure your project and select the services you want to connect to.
Deploying your smart contracts and subgraphs
To deploy your smart contracts and subgraphs, you can use the deploy
command.
To deploy your subgraphs, use the subgraph
command.
Generating code for your dApp
After deploying your smart contracts and subgraphs, you can generate TypeScript code for your dApp to interact with them. The codegen
command will generate type-safe code for your integrations with the services selected in the connect
command.
Start your dApp in development mode
Creating a new project from a smart contract template
To create a new project from a smart contract template, use the create
command with the --use-case
flag:
Testing your smart contracts
To test your smart contracts, you can use the test
command.
Deploying your smart contracts and subgraphs
To deploy your smart contracts and subgraphs, you can use the deploy
command.
To deploy your subgraphs, use the subgraph
command.
API Reference
See the documentation for available commands.
Contributing
We welcome contributions from the community! Please check out our Contributing guide to learn how you can help improve the SettleMint SDK through bug reports, feature requests, documentation updates, or code contributions.
License
The SettleMint SDK is released under the FSL Software License. See the LICENSE file for more details.