# Configure Saga CLI

## Configure `sagacli for Saga Mainnet`

The `sagacli` executable communicates with our Pegasus server applications securely over `HTTPS`. Before you can start using `sagacli`, you must configure it talk to the Saga Platform Chain as well as the Saga Controller.

{% hint style="warning" %}
If you've used sagacli in the past on Cassiopeia, we recommend carefully verifying that all of the config parameters below are set correctly otherwise your CLI might fail.
{% endhint %}

Execute the following commands provided below to configure `sagacli`:

```
sagacli config network-rpc https://spc.sagarpc.io
sagacli config controller https://controller.sagarpc.io
sagacli config platform-chain-id spc-1
sagacli config denom upsaga
sagacli config broadcast-mode sync
sagacli config faucet https://spc-faucet.sagarpc.io
```

Ok, now that we have configured the endpoints, it's time to check if they actually work. To do that, run the following command:

```
sagacli status
```

You should see the following output:

```
Saga Platform Chain     Controller
-------------------     ----------
Online                  Online                   

```

{% hint style="warning" %}
**IMPORTANT**: If either of the two applications indicate a value of `false`, the configuration was not successful. Check your local network connection to ensure that you are connected to the internet, and that your firewall application isn't blocking outgoing traffic over `HTTPS`.
{% endhint %}

## Configure `sagacli for Saga Testnet`

The `sagacli` executable communicates with our Pegasus server applications securely over `HTTPS`. Before you can start using `sagacli`, you must configure it talk to the Saga Platform Chain as well as the Saga Controller.

{% hint style="warning" %}
If you've used sagacli in the past on Cassiopeia, we recommend carefully verifying that all of the config parameters below are set correctly otherwise your CLI might fail.
{% endhint %}

Execute the following commands provided below to configure `sagacli`:

```
sagacli config network-rpc https://spc.testnet.sagarpc.io
sagacli config controller https://controller.testnet.sagarpc.io
sagacli config platform-chain-id spc-testnet-2
sagacli config denom upsaga
sagacli config broadcast-mode sync
sagacli config faucet https://spc-faucet.testnet.sagarpc.io
```

Ok, now that we have configured the endpoints, it's time to check if they actually work. To do that, run the following command:

```
sagacli status
```

You should see the following output:

```
Saga Platform Chain     Controller
-------------------     ----------
Online                  Online                   

```

{% hint style="warning" %}
**IMPORTANT**: If either of the two applications indicate a value of `false`, the configuration was not successful. Check your local network connection to ensure that you are connected to the internet, and that your firewall application isn't blocking outgoing traffic over `HTTPS`.
{% endhint %}

## Next Steps

To launch your very first chainlet, there are a few easy steps you will need to go through. Broadly:

* [Create a key,](/sagacli/key-management/adding-keys.md#creating-a-new-key-in-sagacli) or [import your existing key](/sagacli/key-management/adding-keys.md#import-an-existing-key-into-sagacli), in `sagacli` and provide that to your Saga contact person
* Your `sagacli` account will receive airdropped tokens. If you do not have tokens, please request them via the [Getting Access](/sagacli/getting-access.md) page
* [Launch your chainlet ](/sagacli/working-with-chainlet/launch-your-chainlet-on-mainnet.md)and run commands against it

{% hint style="info" %}
You can access the help for any of the commands by running `sagacli [command?] [subcommand?] --help`.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.saga.xyz/sagacli/configure-saga-cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
