Skip to main content

Introduction

Chromia CLI simplifies the development cycle and deployment of Rell dapps, where all the needed capability is available in one CLI. It's a command-line tool that provides a way to interact with the Chromia blockchain using a set of commands.

The Chromia CLI tool is designed to be user-friendly and easy to use. It provides a set of commands that can be used in a terminal or console window and supports a range of options and flags to customize the behavior of the commands.

For information about installing Chromia CLI, see Install and configure Chromia CLI. Once installed, you can use Chromia CLI to interact with the Chromia blockchain and build decentralized applications and services.

Here's the list of commands in Chromia CLI:

Usage: chr [OPTIONS] COMMAND [ARGS]...

╭─ Options ───────────────────────────────────────────────────────────────────╮
│ --generate-completion=(bash|zsh|fish)
--version Show the version and exit
│ -h, --help Show this message and exit
╰─────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────╮
│ build Build an application and create a blockchain │
│ configuration │
│ create-rell-dapp Generates a template project │
│ deployment Create and maintain deployments │
│ eif Ethereum Integration Framework commands │
│ generate Generate client stubs and documentation for a rell │
│ project │
install Install library dependencies, if no library specified all│
│ will be installed │
│ keygen Generates public/private key pair │
node Interact with a test node
│ query Make a query towards a running node
│ repl Run rell commands in shell │
test Run tests in working directory │
│ tx Make a transaction towards a node. │
╰─────────────────────────────────────────────────────────────────────────────╯
note

The default option of using Chromia CLI to interact with the Chromia blockchain is --use-db. If you want to use it without the database, then use --no-db.

Set up auto completion

The command chr --generate-completion [bash|zsh|fish] generates shell-specific completion scripts. It enhances the command-line experience when using the chr command by providing auto-completion suggestions for command names, options, and arguments.

You need to provide one of the specified shell options (bash, zsh, or fish) to indicate which type of completion script you want to generate. You have to choose the corresponding option depending on the shell you use.

For example:

  • chr --generate-completion bash >> ~/chr.sh generates a file with Bash completion script for the chr command.
  • chr --generate-completion zsh >> ~/chr.zsh generates a file with Zsh completion script for the chr command.
  • chr --generate-completion fish >> ~/chr.fish generates a file with Fish completion script for the chr command.

These generated files shall then be sourced or included in your respective shell configuration files (such as .bashrc, .zshrc, or config.fish) to enable auto-completion for the chr command whenever you use that shell.

note

You can also use the first two letters of each command and subcommands as a command shortcut. For example, chr de cr is the same as chr deployment create.