# Introduction to Chromia CLI · Chromia Docs (concept)

> Official Chromia CLI documentation - command-line tool for developing, building, testing, and deploying Rell dapps on Chromia blockchain

Source: https://docs.chromia.com/build/cli/introduction/

# Introduction to Chromia CLI

On this page

* [How the CLI Works](#how-the-cli-works)
* [Local Development vs Remote Operations](#local-development-vs-remote-operations)
* [Common Development Workflow](#common-development-workflow)
* [Database Requirement](#database-requirement)
* [Understanding Key Management](#understanding-key-management)

Chromia [CLI](https://gitlab.com/chromaway/core-tools/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 Chromia CLI](https://docs.chromia.com/get-started/installation/). Once installed, you can
use Chromia CLI to interact with the Chromia blockchain and build decentralized applications and services.

tip

You can use Chromia CLI in Gitlab CI and Bitbucket Pipeline. Read the
[continuous integration article](https://chromia.com/learn/continuous-integration/introduction/) for more
information.

## How the CLI Works

The Chromia CLI is your main tool for building and deploying dapps. Understanding how different commands work together
will help you build more efficiently.

### Local Development vs Remote Operations

**Local commands** (work with your local node):

* `chr node start` - Starts a local blockchain node on your machine
* `chr query` - Queries a local or remote blockchain
* `chr test` - Runs your test files
* `chr build` - Builds your blockchain configuration

**Remote commands** (work with Testnet/Mainnet):

* `chr deployment create` - Deploys your dapp to a remote network
* `chr deployment update` - Updates an existing deployment

### Common Development Workflow

Here's a typical workflow when building a Chromia dapp:

**1. Create your project**

Terminal

```
chr create-rell-dapp
```

This generates a new Rell project with a basic structure including `chromia.yml`, `main.rell`, and test files.
In `main.rell` you will see some basic Rell code, including the query `hello_world`

**2. Start local node** (requires PostgreSQL)

Terminal

```
chr node start
```

This compiles your Rell code and starts a blockchain locally.

**3. Query your dapp**

Terminal

```
chr query hello_world
```

Tests a query against your running node. When running a single local blockchain, no additional options are needed—`chr query` targets the local node by default.
**4. Run tests**

Terminal

```
chr test
```

Execute your Rell test files to verify your dapp works correctly.

**5. Deploy to Testnet**
See how to deploy your code to testnet [here](https://docs.chromia.com/get-started/create-dapp/deploy-to-testnet/).

Terminal

```
chr deployment create
```

Once your dapp is ready, deploy it to Chromia's public Testnet for others to interact with.

### Database Requirement

Chromia is built on relational blockchain technology, leveraging SQL databases for efficient data storage and querying.
For local development, this means you need a running database when using CLI commands that interact with a local blockchain.

See [Database setup](https://docs.chromia.com/build/database/getting-started/) for installation instructions.

### Understanding Key Management

The CLI automatically manages keys stored in `~/.chromia/`. When you run deployment commands, the CLI uses your
configured key to sign transactions.

Keys are used to:

* Sign transactions when deploying or updating dapps
* Authenticate operations on the blockchain
* Prove ownership of accounts

See [Key Pair Management](https://docs.chromia.com/build/cli/key-pair-management/) for detailed information on generating and managing keys.

[View this page on docs.chromia.com](https://docs.chromia.com/build/cli/introduction/)Content mirrored from the live docs
