CosmWasm Orch Command Line Interface (CLI)
The CosmWasm Orch CLI is a tool designed to facilitate the development, deployment, and interaction with CosmWasm smart contracts on Cosmos blockchains. It enables developers to create, test, and manage contracts using the interactive CLI and easily deploy them onto supported Cosmos networks.
Installation
Prerequisites
- Rust
- OpenSSL
- Access to keyring
Cargo
Add last command to the shell history (Optional)
If Cw Orch CLI ran in interactive mode it's executed command will not be appended to your shell history. This means you will not be able to arrow up to get the last command and tweak it to your liking.
To solve this you can add the function below to your ~/.bashrc or similar.
This function wraps the CLI and appends its executed action to your current shell history, enabling you to retrieve it from the history.
Usage
The CLI supports two modes of execution: interactive and non-interactive.
Interactive mode
In interactive mode the CLI will guide you through complex tasks by reducing the initial command's complexity, and ensuring a more intuitive user experience.
The interactive mode will prompt you for new information when needed as you go through the process of creating, testing, and deploying a contract.
Example:
Non-interactive mode
You can utilize the non-interactive mode for scripting, automated operations, and tweaking of the interactive mode's commands. Often you'll find yourself using the interactive mode to get the command you need, and then debug it with the non-interactive mode.
Example:
Global optional arguments
-vor--verbose- enable verbose mode, this will log actions from cw-orch daemon executions that corresponds to yourRUST_LOGlevel-sor--source-state-file- source cw-orch state file(STATE_FILEcw-orch env variable) to use together with address-book entries (address book have higher priority)- --deployment-id <DEPLOYMENT_ID> - cw-orch state deployment-id, defaults to "default"