SettleMint CLI usage
Command-line interface for managing SettleMint blockchain applications
Overview
The SettleMint CLI is a powerful command-line tool that provides developers with direct access to the SettleMint platform's capabilities. It streamlines the process of creating, managing, and deploying blockchain applications without requiring expertise in underlying infrastructure. The SettleMint CLI can be utilized in various ways depending on your workflow preferences and project requirements. You can install it as a dependency in your project, globally on your system, or use it through GitHub Actions for CI/CD pipelines.
As a dependency in your package.json
Installing the SettleMint CLI as a project dependency ensures that everyone working on your project uses the same version of the CLI, maintaining consistency across development environments.
Globally install the CLI
Installing the CLI globally provides convenient access from any directory on your system, making it ideal for developers who work on multiple SettleMint projects or need to quickly access CLI commands without project-specific configuration.
You can access the CLI globally by running settlemint in your terminal.
GitHub Action
The SettleMint GitHub Action enables seamless integration of platform operations within your CI/CD workflows. This allows you to automate blockchain deployments, testing, and infrastructure management as part of your development pipeline.
Basic example
For detailed setup instructions, refer to SettleMint GitHub Action Docs
Examples
Here are some basic examples to help you get started with the SettleMint CLI. These commands demonstrate how to check the CLI version and access help documentation for different commands.
Authentication
Authentication is required before using the SettleMint CLI to interact with your platform environment. This ensures secure access to your resources and prevents unauthorized operations.
Before using any CLI commands that interact with your SettleMint environment, you must authenticate using a Personal Access Token (PAT). You can create a PAT from your user profile in the SettleMint console.
Login
The login command authenticates your CLI session with the SettleMint platform, establishing a secure connection that allows you to execute commands on your account's resources.
To login using a token passed through STDIN:
Options
Logout
The logout command terminates your authenticated session with the SettleMint platform, ensuring your credentials are securely removed from the local environment.
Options
Project connection
The connect command links your local development environment to a specific SettleMint application, allowing the CLI to execute commands in the context of that application. This simplifies workflows by automatically targeting the right application for your operations.
Options
Blockchain utilities
The CLI provides specialized utilities for blockchain operations that help developers interact with blockchain nodes and perform common tasks related to blockchain development.
The CLI also provides features for blockchain node management, including pincode verification response retrieval.
Options
Create Command
The Create Command provides a streamlined way to bootstrap new SettleMint projects from templates. This enables you to quickly set up projects with best practices and common configurations already in place.
Platform Commands
Platform Commands form the core of the SettleMint CLI, enabling comprehensive management of all resources within the SettleMint platform. These commands allow you to create, update, delete, restart, and list different types of platform resources.
Platform Config
The Platform Config command retrieves the current configuration of your SettleMint platform environment. This includes available regions, providers, templates, and other settings that affect how resources are created and managed.
Platform Create
The Platform Create command family allows you to provision various resources within the SettleMint platform. This includes workspaces, applications, blockchain networks, middleware services, and more, enabling you to build out your blockchain infrastructure.
Create Workspace
The Create Workspace command provisions a new workspace in the SettleMint platform. Workspaces are organizational units that contain applications and their associated resources, allowing you to manage access controls and billing at a high level.
Create Application
The Create Application command provisions a new application within a workspace. An application is a container for related blockchain resources such as networks, nodes, and services that together form a cohesive blockchain solution.
Create Blockchain Network
The Create Blockchain Network command provisions a new blockchain network in your SettleMint application. This network serves as the foundation for blockchain operations, providing the consensus mechanism, transaction processing, and state management capabilities.
Create Besu Blockchain Network
The Create Besu Blockchain Network command provisions a new Hyperledger Besu blockchain network. Besu is an enterprise-grade Ethereum client that supports both public and private network configurations, providing features like privacy, permissioning, and high performance.
Create Blockchain Node
The Create Blockchain Node command provisions additional nodes for an existing blockchain network. Adding nodes to your network can increase its resilience, distribution, and throughput capacity.
Create Besu Blockchain Node
The Create Besu Blockchain Node command provisions a new Hyperledger Besu node and connects it to an existing Besu network. You can create validator nodes that participate in consensus or non-validator nodes that provide additional access points to the network.
Create Private Key
The Create Private Key command generates and securely stores cryptographic keys that can be used for blockchain transactions, smart contract deployment, and other operations requiring digital signatures. The SettleMint platform offers multiple key storage options with varying security levels.
HD ECDSA P256 Private Key
The HD ECDSA P256 Private Key option creates a hierarchical deterministic key using the ECDSA P256 algorithm. HD keys allow for the generation of multiple derived keys from a single master key, providing flexibility for key management while maintaining security.
HSM ECDSA P256 Private Key
The HSM ECDSA P256 Private Key option creates a key stored in a Hardware Security Module (HSM). HSMs provide the highest level of security by performing cryptographic operations within a tamper-resistant hardware device, preventing the key from ever being exposed in memory.
Accessible ECDSA P256 Private Key
The Accessible ECDSA P256 Private Key option creates a key that can be exported and accessed directly by applications. This provides more flexibility for integrations but with lower security compared to HSM keys, as the private key material can be exposed to the application.
Create Middleware
The Create Middleware command provisions middleware services that enhance blockchain functionality. Middleware components provide additional capabilities like indexing, querying, and simplified smart contract interactions that aren't available in the base blockchain protocol.
Create Graph Middleware
The Create Graph Middleware command provisions an instance of The Graph protocol. The Graph is a decentralized indexing protocol that enables efficient querying of blockchain data through GraphQL APIs, making it easier to build responsive dApps that access blockchain data.
Create Smart Contract Portal Middleware
The Create Smart Contract Portal Middleware command provisions a Smart Contract Portal service. This portal provides a user-friendly interface for interacting with smart contracts, including functions for deploying, calling methods, and monitoring events without requiring direct blockchain interaction knowledge.
Create Storage
The Create Storage command provisions decentralized storage services for your blockchain application. These services allow you to store files, documents, and other digital assets that are too large to be placed directly on the blockchain, while maintaining references to them within your smart contracts.
Create IPFS Storage
The Create IPFS Storage command provisions an InterPlanetary File System (IPFS) node. IPFS is a distributed file system that enables decentralized storage of content-addressed files, making it ideal for storing assets like images, videos, and documents referenced by blockchain applications.
Create MinIO Storage
The Create MinIO Storage command provisions a MinIO object storage service. MinIO provides high-performance, S3-compatible object storage, making it ideal for applications that require cloud-like storage capabilities while maintaining compatibility with existing S3 APIs and tools.
Create Integration Tool
The Create Integration Tool command provisions services that facilitate integration between blockchain data and traditional systems. These tools help bridge the gap between on-chain and off-chain data, enabling comprehensive data access and manipulation.
Create Hasura Integration Tool
The Create Hasura Integration Tool command provisions a Hasura GraphQL Engine instance. Hasura provides instant GraphQL APIs on your blockchain data, enabling easy data querying, filtering, and integration with other systems through a unified GraphQL interface.
Create Insights
The Create Insights command provisions blockchain analytics services. These services provide visibility into blockchain activities, helping developers and users monitor transactions, track contract interactions, and analyze on-chain data.
Create Blockscout Insights
The Create Blockscout Insights command provisions a Blockscout blockchain explorer. Blockscout provides comprehensive blockchain data visualization and exploration capabilities, allowing users to search transactions, view smart contracts, and monitor blockchain activity through an intuitive web interface.
Create Application Access Token
The Create Application Access Token command generates authentication tokens for programmatic access to your SettleMint application resources. These tokens enable secure integration between your applications and the SettleMint platform without requiring user credentials.
Platform Delete Commands
The Platform Delete Commands enable you to remove resources from your SettleMint platform environment. These commands should be used with caution as they permanently delete resources and their associated data.
Delete Workspace
The Delete Workspace command removes a workspace and all its contained resources from your SettleMint platform environment. This operation is irreversible and will delete all applications, networks, and other resources within the workspace.
Delete Application
The Delete Application command removes an application and all its resources from your SettleMint platform environment. This operation is irreversible and will delete all blockchain networks, nodes, middleware, and other services within the application.
Platform List Commands
The Platform List Commands provide visibility into your SettleMint platform resources. These commands allow you to view and explore the various components deployed in your environment, helping with management and troubleshooting.
List Services
The List Services command displays all services deployed within an application. This provides a comprehensive view of your blockchain infrastructure, including networks, nodes, middleware, and other components, with options to filter by service type and output in various formats.
List Workspaces
The List Workspaces command displays all workspaces in your SettleMint platform account. This helps you maintain an overview of your organizational structure and quickly access workspace details for management tasks.
List Applications
The List Applications command displays all applications within a workspace. This provides visibility into your application portfolio and helps manage multi-application environments within a workspace.
Platform Restart Commands
The Platform Restart Commands allow you to restart various services in your SettleMint platform environment. Restarting services can help resolve issues, apply configuration changes, or recover from error states.
Restart Blockchain Network
The Restart Blockchain Network command restarts all nodes and services associated with a blockchain network. This can be useful for applying network-wide configuration changes or recovering from network-wide issues.
Restart Custom Deployment
The Restart Custom Deployment command restarts a custom service deployed in your SettleMint platform environment. Custom deployments can include specialized services or applications that are integrated with your blockchain infrastructure.
Restart Insights
The Restart Insights command restarts analytics and monitoring services in your SettleMint platform environment. This can help refresh data streams or resolve issues with blockchain data visualization and analysis.
Restart Blockscout Insights
The Restart Blockscout Insights command specifically restarts a Blockscout blockchain explorer instance. Restarting Blockscout can help refresh blockchain data indexing, resolve explorer interface issues, or apply configuration changes to the explorer service.
Restart Integration Tool
The Restart Integration Tool command restarts data integration services in your SettleMint platform environment. Restarting these tools can help refresh data connections, resolve synchronization issues, or apply configuration changes to integration services.
Restart Hasura Integration Tool
The Restart Hasura Integration Tool command specifically restarts a Hasura GraphQL Engine instance. Restarting Hasura can help refresh API endpoints, resolve query performance issues, or apply schema changes to the GraphQL interface.
Restart Middleware
The Restart Middleware command restarts middleware services in your SettleMint platform environment. Restarting middleware can help refresh data indexing, resolve service issues, or apply configuration changes to enhance blockchain functionality.
Restart Graph Middleware
The Restart Graph Middleware command specifically restarts a The Graph protocol instance. Restarting The Graph service can help refresh subgraph indexing, resolve query issues, or apply indexing configuration changes to improve data access performance.
Restart Smart Contract Portal Middleware
The Restart Smart Contract Portal Middleware command specifically restarts a Smart Contract Portal service. Restarting the portal can help refresh contract interfaces, resolve interaction issues, or apply ABI changes to improve smart contract accessibility and functionality.