Skip to main content
A practical reference for Cosmos chain and module developers: what each tool does and when to reach for it.

Code generation

Buf — Compiles .proto files into Go types, gRPC stubs, and REST gateway code. The standard way to run proto-gen in a Cosmos project. Also lints and formats proto files, and publishes generated docs to the Buf registry. See the Protobuf Documentation on the Buf registry. Protobuf Annotations — Cosmos SDK-specific proto field options (scalar descriptors, amino names, query pagination, etc.) that affect code generation output. Consult this when writing .proto files for a new module. AutoCLI — Generates CLI commands and gRPC-gateway routes for your module’s messages and queries directly from proto definitions. Use it instead of hand-writing CLI commands — it also handles pagination, output formatting, and custom flag mappings.

Client library

CosmJS — The official JavaScript and TypeScript library for building clients, frontends, and scripts that interact with Cosmos chains. Handles transaction signing, broadcasting, querying, and wallet integration in browser and Node.js environments.

State management

Collections — A typed abstraction over raw KVStore access. Handles key encoding, prefix isolation, iteration, and secondary indexes. Also produces a schema used automatically by simulation decoders. Use it for all new module state instead of raw byte keys. Store — Reference documentation for the SDK store layer: KVStore, CommitMultiStore, CacheKVStore, IAVL, pruning strategies, and store versioning. Read this when you need to understand what is happening under the collections abstraction or need to work with stores directly.

Testing

Testing — The SDK’s testing conventions: unit tests for keepers and message servers, integration tests wired with depinject, and end-to-end tests using the testnet package. Module Simulation — A fuzz-testing framework that runs your module’s messages with randomized inputs and genesis states. Checks for panics, non-determinism, and import/export inconsistencies. Use it to catch edge cases that unit tests miss.

Node setup and operations

Prerequisites — Required software and environment setup before running a node. Run a Node — How to initialize a chain, configure genesis, and start a node with simd. Run a Testnet — Running a local multi-node testnet using simd testnet. Production Deployment — Hardening and deployment guidance for running a node in production: systemd, state sync, backup strategies, and security considerations. Cosmovisor — A process manager for your chain binary that watches for on-chain upgrade proposals and automatically swaps in the new binary at the correct upgrade height. Required for zero-downtime upgrades in production. Confix — A CLI tool for reading, setting, migrating, and diffing app.toml and client.toml configuration files across SDK versions. Use it when upgrading a node between SDK versions or scripting config changes.

Keys and transactions

Keyring — The SDK’s key management layer. Covers keyring backends (os, file, test, memory), key types, and how to manage keys via simd keys. Use this to understand key storage security trade-offs in production deployments. Building Transactions — How to programmatically construct, sign, encode, and broadcast transactions using the SDK’s TxBuilder and TxConfig APIs. Interacting with a Node — Using the CLI and gRPC to query state and broadcast transactions against a running node.

Observability

Telemetry — OpenTelemetry-based metrics for the SDK and your modules. Emit counters, gauges, and histograms from keeper methods. Integrates with Prometheus and any OTLP-compatible backend. Logging — Structured logging via cosmossdk.io/log (backed by zerolog). Use it in keepers and servers to emit structured log lines, with support for log correlation and OpenTelemetry log export.

IBC

IBC Go — The canonical IBC implementation for Cosmos SDK chains. Use it to add cross-chain token transfers and arbitrary message passing to your chain.