Quick Start (CLI)
Platform Support (OS)
At the moment, the KRNL CLI is built using a Foundry project as a template.
macOS
Sequoia (15+)
Linux
Ubuntu 24.04.1, Debian (X)
Windows
WSL2
Prerequisite
node and npm (node ≥ 18)
Installation and Setup
The KRNL CLI is an application that unifies the setup, deployment, verification, and registration of smart contracts on the KRNL platform into one place.
Installation
# Install the tap and then the cli
brew tap krnl-labs/krnl
brew install krnl-cli
# To verify the installation
krnl --help
# To upgrade
brew upgrade krnl-cli
Note: Make sure to restart the terminal after the installation to avoid "forge not found error"
Init
This initializes a sample project, containing everything you need to get started with kOS.
krnl init
Setup
krnl setup
When running the setup command, the CLI will ask you for the following information:
Etherscan API Key - Used to verify your deployed smart contracts
Sepolia RPC URL - Can be configured to point to a local node, otherwise it will default to: https://1rpc.io/sepolia
Kernel ID(s) - Choose your desired functionalities from the KRNL Platform "Explore" page.
Oasis Sapphire Wallet Private Key - Used for deploying your Token Authority contract
Ethereum (Sepolia) Wallet Private Key - Used for deploying your Smart Contract
Deploy, Verify, and Register
krnl deploy-all
This command will execute several functions:
Deploy Token Authority smart contract on Oasis Sapphire network
Verify Token Authority contract on Sourcify
Deploy your main smart contract on Sepolia testnet
Verify your main smart contract on Etherscan, using your Etherscan API Key
Register your deployed smart contracts on the KRNL Registry
After successfully executing this command, the CLI puts you in a stronger position to add new functionalities to your dApp via kOS.
What's Next?
Create a dApp by following our tutorial or by using the KRNL Sandbox.
Explore different kernel examples here.
Frequently Asked Questions
Last updated
Was this helpful?