Set up a modern Cosmos app by running one command ⚛️
Overview
First, install create-interchain-app globally using npm:
npm install -g create-interchain-app
Then, create your new Cosmos app by running the following command:
# you can also use `cia` instead of `create-interchain-app` for shortcut ;)
create-interchain-appDuring the setup process, you'll be prompted to enter the name of your app. For example:
Once the app is created, move into the app directory and start the development server:
cd my-app pnpm install && pnpm dev
Now your app should be running on http://localhost:3000!
Get Started Immediately
Interchain JavaScript Stack Template
This template provides everything you need to build modern Interchain applications. You don't need to install or configure interchainjs, keplr, nextjs, webpack or Babel.
Everything is preconfigured, ready-to-go, so you can focus on your code!
- ⚡️ Connect easily to 20+ wallets via Interchain Kit — including Ledger, Keplr, Cosmostation, Leap, Trust Wallet, OKX, XDEFI, Exodus, Wallet Connect and more!
- ⚛️ Sign and broadcast with InterchainJS
- 🎨 Build awesome UI with Interchain UI
- 🛠 Render pages with next.js hybrid static & server rendering
- 📝 Leverage chain-registry for Chain and Asset info for all IBC-connected chains
Education & Resources
🎥 Checkout our videos to learn to learn more about create-interchain-app and tooling for building frontends in the Cosmos!
Checkout interchain-kit for more docs as well as interchain-kit/react for getting cosmjs stargate and cosmjs signers.
Creating an App
To create a new app, you may choose one of the following methods:
global install
npm install -g create-interchain-app
Then run the command:
we also made an alias cia if you don't want to type create-interchain-app:
npx
npx create-interchain-app
npm
Yarn
pnpm create interchain-app
Examples
The create-interchain-app tool provides a range of examples to help you understand and test various features and integrations. By executing the examples, you can quickly see how to implement specific functionalities in your Cosmos app.
If you know the example name, you can do
cia --example <example-name>
Alternatively, you can use the shorthand -e flag to achieve the same:
This command will generate a new project configured with the selected example, allowing you to dive into the code and functionality right away.
Stake Tokens
Initiate and manage staking operations directly within your application, allowing users to stake tokens securely and efficiently.
cia --name stake-example --example stake-tokens
Vote Proposal
Facilitate on-chain governance by enabling users to vote on proposals, enhancing community engagement and decision-making.
cia --name vote-example --example vote-proposal
Authz
Leverage the Authz module to grant and manage authorizations, allowing users to perform actions on behalf of others.
cia --name authz-example --example authz
Asset List
Create and manage an asset list, offering comprehensive insights into the available assets, and empower your application with Inter-Blockchain Communication (IBC) capabilities for transferring tokens across different chains.
cia --name ibc-asset-list-example --example ibc-asset-list
Options
| Argument | Description | Default |
|---|---|---|
--repo |
Set custom repository for cia templates | None |
--install |
Automatically install dependencies | true |
--printCmd |
Print the command to run after setup | true |
-n, --name |
Provide a project name | None |
-e, --example |
Provide an example name | None |
-t, --template |
Define the template to use | None |
-b, --fromBranch |
Specify the branch to use for cloning | None |
Development
Because the nature of how template boilerplates are generated, we generate pnpm-lock.yaml files inside of nested packages so we can fix versions to avoid non-deterministic installations.
When adding packages, pnpm workspaces will use the root pnpm-lock.yaml. It could be ideal to remove it while adding packages, and when publishing or pushing new changes, generating the nested lock files.
In the root, to remove all nested lock files:
When you need to remove/generate locks for all nested packages, simply run pnpm locks in the root:
Interchain JavaScript Stack
A unified toolkit for building applications and smart contracts in the Interchain ecosystem ⚛️
| Category | Tools | Status |
|---|---|---|
| Chain Information | Chain Registry, Utils, Client | Everything from token symbols, logos, and IBC denominations for all assets you want to support in your application. |
| Wallet Connectors | Interchain Kitbeta, Cosmos Kit | Experience the convenience of connecting with a variety of web3 wallets through a single, streamlined interface. |
| Signing Clients | InterchainJSbeta, CosmJS | A single, universal signing interface for any network |
| SDK Clients | Telescope | Your Frontend Companion for Building with TypeScript with Cosmos SDK Modules. |
| Starter Kits | Create Interchain Appbeta, Create Cosmos App | Set up a modern Interchain app by running one command. |
| UI Kits | Interchain UI | The Interchain Design System, empowering developers with a flexible, easy-to-use UI kit. |
| Testing Frameworks | Starship | Unified Testing and Development for the Interchain. |
| TypeScript Smart Contracts | Create Hyperweb App | Build and deploy full-stack blockchain applications with TypeScript |
| CosmWasm Contracts | CosmWasm TS Codegen | Convert your CosmWasm smart contracts into dev-friendly TypeScript classes. |
Credits
🛠 Built by the Constructive team — makers of Hyperweb
Disclaimer
AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.
No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.