> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sei.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Installing seid CLI

> Complete guide to installing and setting up the Sei CLI (seid) tool, including wallet creation, EVM imports, and troubleshooting common installation issues.

export const VersionTable = () => {
  const networks = [{
    label: 'Mainnet',
    chainId: 'pacific-1',
    rpcEndpoint: 'https://rpc.sei-apis.com',
    evmChainId: '1329'
  }, {
    label: 'Testnet',
    chainId: 'atlantic-2',
    rpcEndpoint: 'https://rpc-testnet.sei-apis.com',
    evmChainId: '1328'
  }];
  const [versions, setVersions] = useState({});
  useEffect(() => {
    const oneHour = 3600000;
    const setVersionFor = (chainId, version) => {
      setVersions(prev => ({
        ...prev,
        [chainId]: version
      }));
    };
    const fetchVersion = async (chainId, rpcEndpoint) => {
      try {
        const response = await fetch(`${rpcEndpoint}/abci_info`);
        const data = await response.json();
        const info = data && data.result && data.result.response || data && data.response || ({});
        const version = info.version;
        if (typeof version === 'string' && version) {
          setVersionFor(chainId, version);
          localStorage.setItem(`${chainId}-version`, version);
          localStorage.setItem(`${chainId}-version-timestamp`, Date.now().toString());
          return;
        }
        throw new Error('abci_info response had no version field');
      } catch (error) {
        console.error('Error fetching version:', error);
        if (!localStorage.getItem(`${chainId}-version`)) {
          setVersionFor(chainId, 'Unavailable');
        }
      }
    };
    networks.forEach(({chainId, rpcEndpoint}) => {
      const storedVersion = localStorage.getItem(`${chainId}-version`);
      const storedTimestamp = localStorage.getItem(`${chainId}-version-timestamp`);
      const isFresh = storedVersion && storedTimestamp && Date.now() - parseInt(storedTimestamp, 10) < oneHour;
      if (storedVersion) {
        setVersionFor(chainId, storedVersion);
      }
      if (!isFresh) {
        fetchVersion(chainId, rpcEndpoint);
      }
    });
  }, []);
  return <table className="min-w-full divide-y divide-neutral-200 dark:divide-neutral-800">
      <thead className="bg-neutral-50 dark:bg-neutral-900/50">
        <tr>
          <th className="px-4 py-3 text-left text-sm font-medium text-neutral-900 dark:text-neutral-100">Network</th>
          <th className="px-4 py-3 text-left text-sm font-medium text-neutral-900 dark:text-neutral-100">Version</th>
          <th className="px-4 py-3 text-left text-sm font-medium text-neutral-900 dark:text-neutral-100">Chain ID</th>
          <th className="px-4 py-3 text-left text-sm font-medium text-neutral-900 dark:text-neutral-100">EVM Chain ID</th>
        </tr>
      </thead>
      <tbody className="divide-y divide-neutral-200 dark:divide-neutral-800 bg-neutral-50 dark:bg-neutral-900/30">
        {networks.map(({label, chainId, evmChainId}) => <tr key={chainId}>
            <td className="px-4 py-3 text-sm font-medium text-neutral-900 dark:text-neutral-100">{label}</td>
            <td className="px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400">
              <code style={{
    fontFamily: 'var(--sei-font-mono)'
  }}>{versions[chainId] || 'Fetching...'}</code>
            </td>
            <td className="px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400">{chainId}</td>
            <td className="px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400">{evmChainId}</td>
          </tr>)}
      </tbody>
    </table>;
};

## What is seid CLI?

The `seid` CLI is the command-line tool for interacting with the Sei blockchain. It allows you to manage wallets, send transactions, query network data, and perform validator operations.

## Prerequisites

* Go 1.23+: Installation instructions are available [here](https://go.dev/doc/install).

## Installation

To install seid, locate the version you wish to use on the [sei-chain releases page](https://github.com/sei-protocol/sei-chain/releases). A list of the currently used versions on mainnet and testnet are displayed right below.

<VersionTable />

Then, execute the following commands with the version that you picked:

```bash theme={"dark"}
git clone https://github.com/sei-protocol/sei-chain
cd sei-chain
git checkout [VERSION]
make install
```

You can verify that seid was installed correctly by running:

```bash theme={"dark"}
seid version
```

## Troubleshooting Installation

<Warning>If you encounter an error like `command not found: seid`, you may need to set your GOPATH environment variable.</Warning>

* Use `go env GOPATH` to find your GOPATH
* Add the following lines to your `~/.bashrc` or `~/.zshrc`:

```bash theme={"dark"}
export GOPATH=[your GOPATH from step 1]
export PATH=$PATH:$GOPATH/bin
```

For more information see [here](https://pkg.go.dev/cmd/go#hdr-GOPATH_environment_variable).

## Command Overview

Seid supports all the commands you need to interact with the chain. To see a list of available commands and explanations of what they do, run seid:

```bash theme={"dark"}
seid
Start sei app

Usage:
  seid [command]

Available Commands:
  add-genesis-account      Add a genesis account to genesis.json
  add-wasm-genesis-message Wasm genesis subcommands
  blocktest                run EF blocktest
  collect-gentxs           Collect genesis txs and output a genesis.json file
  compact                  Compact the application DB fully (only if it is a levelDB)
  config                   Create or query an application CLI configuration file
  debug                    Tool for helping with debugging your application
  ethreplay                replay EVM transactions
  export                   Export state to JSON
  gentx                    Generate a genesis tx carrying a self delegation
  help                     Help about any command
  init                     Initialize private validator, p2p, genesis, and application configuration files
  keys                     Manage your application's keys
  latest_version           Prints the latest version of the app DB
  migrate                  Migrate genesis to a specified target version
  prune                    Prune app history states by keeping the recent heights and deleting old heights
  query                    Querying subcommands
  rollback                 rollback cosmos-sdk and tendermint state by one height
  start                    Run the full node
  status                   Query remote node for status
  tendermint               Tendermint subcommands
  tools                    A set of useful tools for sei chain
  tx                       Transactions subcommands
  validate-genesis         validates the genesis file at the default location or at the location passed as an arg
  version                  Print the application binary version information

Flags:
  -h, --help                help for seid
      --home string         directory for config and data (default "~/.sei")
      --log_format string   The logging format (json|plain)
      --log_level string    The logging level (trace|debug|info|warn|error|fatal|panic)
      --trace               print out full stack trace on errors

Use "seid [command] --help" for more information about a command.
```

## Adding a Wallet

You can create a new wallet using the seid keys command:

```bash theme={"dark"}
seid keys add $NAME
```

Output:

```bash theme={"dark"}
- name: [YOUR_KEY_NAME]
  type: local
  address: sei1[GENERATED_ADDRESS]
  evm_address: ""
  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"[PUBLIC_KEY]"}'
  mnemonic: ""

**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.

[YOUR_24_WORD_MNEMONIC_PHRASE]

```

<Info>Please replace `$NAME` with the name you would like to use for this key. This will generate a seed phrase and store the account in the CLI for use.</Info>

<Danger>**Important**: Write this mnemonic down and store it in a safe place. Never share your seed phrase with anyone.</Danger>

Alternatively, if you would like to import an existing seed phrase, you can add the `--recover` flag:

```bash theme={"dark"}
seid keys add $NAME --recover
```

Output:

This will prompt you to enter your seed phrase, allowing you to import an existing wallet into the CLI.

```bash theme={"dark"}
> Enter your bip39 mnemonic
[ENTER_YOUR_EXISTING_MNEMONIC_PHRASE_HERE]

- name: [YOUR_WALLET_NAME]
  type: local
  address: sei1[RECOVERED_ADDRESS]
  evm_address: ""
  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"[PUBLIC_KEY]"}'
  mnemonic: ""
```

## EVM Wallet Compatibility

### Understanding Coin Types

Sei supports two coin types:

* Coin type 118 (default): Standard Cosmos address format
* Coin type 60: Ethereum-compatible address format for EVM wallets

### Creating an EVM-Compatible Wallet

To create a new wallet that's compatible with EVM wallets like MetaMask:

```bash theme={"dark"}
seid keys add $NAME --coin-type=60
```

Output:

```bash theme={"dark"}
- name: [YOUR_KEY_NAME]
  type: local
  address: sei1[GENERATED_ADDRESS]
  evm_address: ""
  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"[PUBLIC_KEY]"}'
  mnemonic: ""

**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.

[YOUR_24_WORD_MNEMONIC_PHRASE]

```

<Info>`evm_address` is shown as empty here because it's only displayed after the key first broadcasts a transaction or is associated on-chain. The `0x` address is deterministically derived from the secp256k1 public key.</Info>

### Importing an Existing EVM Wallet

To import an existing wallet from MetaMask or other EVM wallets:

```bash theme={"dark"}
seid keys add $NAME --coin-type=60 --recover
```

Output:

```bash theme={"dark"}
> Enter your bip39 mnemonic
> [ENTER_YOUR_EXISTING_MNEMONIC_PHRASE_HERE]

- name: [YOUR_WALLET_NAME]
  type: local
  address: sei1[RECOVERED_ADDRESS]
  evm_address: ""
  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"[PUBLIC_KEY]"}'
  mnemonic: ""
```

You'll be prompted to enter your existing 12 or 24-word mnemonic phrase.

<Info>Use coin type 60 when you want to use the same address across EVM-compatible chains or import from MetaMask. Use the default coin type 118 for standard Cosmos operations.</Info>

## Managing Wallets

To see your local wallets, you can run:

```bash theme={"dark"}
seid keys list
```

Output:

```bash theme={"dark"}
- name: [YOUR_WALLET_NAME]
  type: local
  address: sei1[WALLET_ADDRESS]
  evm_address: [EVM_ADDRESS]
  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"[PUBLIC_KEY]"}'
  mnemonic: ""
  ...
```

to see a list of all wallets added, or

```bash theme={"dark"}
seid keys show $NAME
```

Output:

```bash theme={"dark"}
- name: [YOUR_WALLET_NAME]
  type: local
  address: sei1[WALLET_ADDRESS]
  evm_address: [EVM_ADDRESS]
  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"[PUBLIC_KEY]"}'
  mnemonic: ""
```

to see details about a specific wallet.

## Deleting Wallets

To delete a wallet/key, you can use the following command:

```bash theme={"dark"}
seid keys delete $NAME
```

Output:

```bash theme={"dark"}
Key reference will be deleted. Continue? [y/N]: y
Key deleted forever (uh oh!)
```

This will remove the specified wallet from your local keyring. Be cautious, as this action cannot be undone.

## Uninstalling seid

If you need to remove `seid` from your system, you can delete the binary from your `$GOPATH/bin` directory:

```bash theme={"dark"}
rm $(go env GOPATH)/bin/seid
```
