Skip to content

SDK-first CLI for SEKAI blockchain with 222 commands, scenario automation, and shell completion

Notifications You must be signed in to change notification settings

KiraCore/sekai-cli

Repository files navigation

SEKAI-CLI

CI Release Go Version License

A zero-dependency, SDK-first CLI for interacting with SEKAI blockchain.

Features

  • 159 SDK Commands - Full coverage of all SEKAI blockchain modules
  • Scenario Automation - YAML-based playbooks for complex workflows
  • SDK-First Architecture - Core logic in reusable pkg/sdk/ library
  • Zero External Dependencies - Uses only Go standard library
  • Multiple Clients - Docker exec, REST API support
  • XDG Compliant - Standard Linux config/cache paths

Installation

Debian/Ubuntu (.deb)

# Download latest release
curl -LO https://github.com/kiracore/sekai-cli/releases/latest/download/sekai-cli_VERSION_amd64.deb

# Install
sudo dpkg -i sekai-cli_*_amd64.deb

Binary (Linux/macOS)

# Linux amd64
curl -LO https://github.com/kiracore/sekai-cli/releases/latest/download/sekai-cli-linux-amd64
chmod +x sekai-cli-linux-amd64
sudo mv sekai-cli-linux-amd64 /usr/local/bin/sekai-cli

# macOS arm64 (Apple Silicon)
curl -LO https://github.com/kiracore/sekai-cli/releases/latest/download/sekai-cli-darwin-arm64
chmod +x sekai-cli-darwin-arm64
sudo mv sekai-cli-darwin-arm64 /usr/local/bin/sekai-cli

Build from Source

git clone https://github.com/kiracore/sekai-cli.git
cd sekai-cli
make docker-build
# Binary at ./build/sekai-cli

Quick Start

# Initialize and detect network
sekai-cli init

# Check status
sekai-cli status

# List keys
sekai-cli keys list

# Query balance
sekai-cli bank balances kira1...

# Send tokens
sekai-cli bank send alice kira1... 100ukex --fees 100ukex

Scenario Automation

Execute complex workflows with YAML playbooks:

# transfer-and-delegate.yaml
name: Transfer and Delegate
steps:
  - name: send-tokens
    module: bank
    action: send
    params:
      from: genesis
      to: kira1abc...
      amount: 1000ukex

  - name: delegate-stake
    module: multistaking
    action: delegate
    params:
      from: genesis
      validator: kiravaloper1...
      amount: 500ukex
sekai-cli scenario run transfer-and-delegate.yaml

Using the SDK

The SDK can be imported and used by other Go applications:

package main

import (
    "context"
    "fmt"

    "github.com/kiracore/sekai-cli/pkg/sdk/client/docker"
    "github.com/kiracore/sekai-cli/pkg/sdk/modules/bank"
)

func main() {
    client, _ := docker.NewClient("sekai-node",
        docker.WithChainID("localnet-1"),
    )
    defer client.Close()

    bankMod := bank.New(client)
    balances, _ := bankMod.Balances(context.Background(), "kira1...")
    fmt.Println(balances)
}

Configuration

Config files are stored following XDG Base Directory Specification:

Path Purpose
~/.config/sekai-cli/config.json User configuration
~/.cache/sekai-cli/cache.json Network cache
/etc/sekai-cli/config.json System-wide config

Configure via flags, environment variables, or config file:

# Via flags
sekai-cli --container sekai-node --chain-id localnet-1 status

# Via environment
export SEKAI_CONTAINER=sekai-node
export SEKAI_CHAIN_ID=localnet-1
sekai-cli status

# Via config file
sekai-cli config init

Shell Completion

Enable tab-completion for commands, subcommands, and flags.

Bash

# System-wide (requires sudo)
sekai-cli completion bash | sudo tee /etc/bash_completion.d/sekai-cli

# Current session only
source <(sekai-cli completion bash)

# Add to ~/.bashrc for persistence
echo 'source <(sekai-cli completion bash)' >> ~/.bashrc

Zsh

# Add to fpath
sekai-cli completion zsh > "${fpath[1]}/_sekai-cli"

# Or source directly
echo 'source <(sekai-cli completion zsh)' >> ~/.zshrc

Fish

sekai-cli completion fish > ~/.config/fish/completions/sekai-cli.fish

Modules

Module Commands Description
auth 6 Account queries
bank 7 Token transfers and supply
basket 16 Token baskets
bridge 4 Cross-chain bridge
collectives 11 Collectives management
custody 4 Custody queries
distributor 5 Fee distribution
gov 46 Governance (roles, proposals, voting)
keys 4 Key management
layer2 3 Layer2 dApps
multistaking 13 Multi-asset staking
recovery 4 Recovery tokens
slashing 6 Slashing info
spending 11 Spending pools
staking 4 Validator staking
tokens 7 Token rates
ubi 4 Universal Basic Income
upgrade 4 Network upgrades
Total 159

Development

# Build
make docker-build

# Run tests
make docker-test

# Build .deb package
make deb

# Format code
make docker-fmt

# Lint
make docker-lint

Branch Conventions

  • feature/* - New features (auto-creates PR, bumps minor version)
  • bugfix/* - Bug fixes (auto-creates PR, bumps patch version)
  • hotfix/* - Urgent fixes (auto-creates PR, bumps patch version)
  • release/* - Release preparation (auto-creates PR)
  • major/* - Breaking changes (auto-creates PR, bumps major version)

Documentation

License

Copyright 2025 KIRA Network. Licensed under Apache 2.0.

About

SDK-first CLI for SEKAI blockchain with 222 commands, scenario automation, and shell completion

Resources

Contributing

Stars

Watchers

Forks

Packages

No packages published