SolanaSolana Pre-Alpha is live! dWallets now support Solana for native cross-chain signing.
Ika LogoIka Docs

Config Commands

Configuration commands manage the Ika CLI config file (ika_sui_config.yaml), which maps Sui network environments to Ika contract addresses. They also manage corresponding Sui CLI environments (ika-mainnet, ika-testnet, ika-localnet).

ika config init

Fetch deployed contract addresses from GitHub, generate the Ika config file, and create Sui CLI environments for all networks.

ika config init

This:

  1. Downloads current contract addresses for testnet and mainnet from the Ika GitHub repository
  2. Writes them to ~/.ika/ika_sui_config.yaml keyed by ika-{network} (e.g., ika-testnet, ika-mainnet)
  3. Creates Sui CLI environments (ika-testnet, ika-mainnet, ika-localnet) pointing to the correct RPC URLs
FlagRequiredDescription
--output <PATH>NoOutput path for Ika config file. Default: ~/.ika/ika_sui_config.yaml

After initialization, switch to an Ika environment:

sui client switch --env ika-testnet

For localnet, add the contract addresses from a local config file (see add-env below).

Sui Environment Naming

ika config init creates Sui environments prefixed with ika- (e.g., ika-testnet, ika-mainnet). The active Sui environment alias must match the Ika config key for dWallet commands to work. Always use sui client switch --env ika-testnet (not --env testnet) when working with Ika.


ika config add-env

Add or update a network environment from a local ika_config.json file. Use this to configure localnet (or any custom network) from the config generated by ika system initialize or ika-swarm-config.

ika config add-env --network localnet --from-file ./ika_config.json
FlagRequiredDescription
--network <NAME>YesNetwork name (e.g., localnet, devnet). Stored as ika-{name}
--from-file <PATH>YesPath to the ika_config.json file containing contract addresses
--rpc <URL>NoSui RPC URL for this environment. Default: auto-detected (http://127.0.0.1:9000 for localnet)
--config <PATH>NoPath to the Ika config file to update. Default: ~/.ika/ika_sui_config.yaml

Typical localnet setup:

# 1. Initialize (creates Sui envs including ika-localnet)
ika config init
 
# 2. Start local Ika network (generates ika_config.json)
# ... (via ika-swarm-config or ika system initialize)
 
# 3. Add localnet addresses from the generated config
ika config add-env --network localnet --from-file ./ika_config.json
 
# 4. Switch and use
sui client switch --env ika-localnet
ika dwallet create --curve secp256k1

ika config sync

Re-fetch the latest deployed contract addresses from GitHub and update the existing Ika config file. Useful after contract upgrades.

ika config sync
FlagRequiredDescription
--network <NET>NoNetworks to sync (comma-separated). Default: testnet,mainnet
--config <PATH>NoPath to the Ika config file to update. Default: ~/.ika/ika_sui_config.yaml

Example: sync only testnet:

ika config sync --network testnet

Existing entries for networks not listed in --network are preserved. Only the specified networks are re-fetched and updated.


ika config show

Display the current Ika CLI config file contents.

ika config show
FlagRequiredDescription
--config <PATH>NoPath to config file. Default: ~/.ika/ika_sui_config.yaml

If the config file doesn't exist, the command will suggest running ika config init first.

On this page