This guide walks you through the complete setup process for the DIN CLI (dincli) from installation to first use.
Tip
Hit an error or get stuck anywhere in this guide? Post it in the DevNet 2.0 pre-launch discussion.
It is recommended to install dincli inside a Python virtual environment.
# Create a virtual environment
python3 -m venv venv
# Activate the virtual environment
source venv/bin/activateNote
Recommended python version is 3.12.3
# Download the wheel file
wget https://github.com/InfiniteZeroFoundation/DevNet/raw/refs/heads/main/dist/dincli-0.1.0-py3-none-any.whl
# Install it
pip install dincli-0.1.0-py3-none-any.whlpip install git+https://github.com/InfiniteZeroFoundation/devnet.git@main#subdirectory=distfor any missing dependency please install it using pip. Please see a complete dependency list in requirements.txt
dincli --version
# or
dincli system welcomedincli system initCreates the required config and cache directories and generates an empty configuration file.
# Disable demo mode to use your own wallet and private keys
dincli system configure-demo --mode no
# Set the default network [local | sepolia_devnet | sepolia_op_devnet | mainnet]
dincli system configure-network --network sepolia_op_devnet
> [!NOTE]
> Use `sepolia_op_devnet` for devnet. Testnet and Mainnet support will be rolled out in a future release.
# Set the log level [debug | info | warning | error | critical]
dincli system configure-logging --level infoCreate a .env file in the root directory of your project and populate it with the variables below.
The DIN CLI encrypts your private key using this password.
DIN_WALLET_PASSWORD=your_secure_passwordThe CLI needs an RPC endpoint to communicate with the blockchain. The variable name follows the pattern [NETWORK]_RPC_URL (uppercase).
You can obtain an RPC URL from providers such as Alchemy, Infura, or Ankr. You must set the RPC URL for optimism-sepolia network as SEPOLIA_OP_DEVNET_RPC_URL in .env file at root of your project.
# Sepolia - Optimism Devnet
# must set this for devnet usage
SEPOLIA_OP_DEVNET_RPC_URL=https://optimism-sepolia.infura.io/v3/<auth_token>
# Local network (e.g. a Hardhat node) - OPTIONAL
# LOCAL_RPC_URL=http://127.0.0.1:8545
⚠️ Local development only. TheETH_PRIVATE_KEY_<n>pattern stores raw private keys in plaintext. If you are running a production validator node, use the encrypted keystore instead — see wallet-setup.md.
Store private keys using the pattern ETH_PRIVATE_KEY_<account_index> in .env file at root of your project. You can define as many accounts as needed by incrementing the index.
ETH_PRIVATE_KEY_0 = 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
ETH_PRIVATE_KEY_1 = 0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890Note
Be sure to use your own private keys, as the private keys provided in the example are for demonstration purposes only.
Important
register-wallet is for your own real key material and refuses to run while demo mode
is on — disable it first (dincli system init already defaults it off, so this is only
needed if you turned it on earlier):
dincli system configure-demo --mode noRegister a stored account with:
dincli system register-wallet --account 0For local Hardhat testing with a well-known dev key instead of your own .env key, see
dincli system connect-demo-wallet in cli-reference.md.
dincli requires an IPFS provider to store and retrieve model data.
Detailed reference: IPFS Configuration Guide
Obtain an API key from Filebase and configure it:
dincli system configure-ipfs --provider filebase --api-key <your_api_key>Note
Please create a bucket on Filebase and get bucket's IPFS RPC API token from Filebase Console. Use that as your_api_key in the command above.
IPFS RPC API token dashboard is located at bottom of the page.
If you do not configure a provider, dincli uses the env provider automatically.
Add the following to the project .env:
IPFS_API_URL_ADD=http://127.0.0.1:5001/api/v0
IPFS_API_URL_RETRIEVE=http://127.0.0.1:5001/api/v0You can set it explicitly if you want:
dincli system configure-ipfs --provider envEnsure your IPFS backend retains uploaded artifacts. If using a local node, manage pinning and garbage collection carefully.
When the built-in env and filebase providers are not enough, point dincli at your own Python module:
dincli system configure-ipfs --provider custom --service-path /abs/path/to/custom_ipfs.pyThe module must implement upload_to_ipfs(...) and retrieve_from_ipfs(...). See the IPFS Configuration Guide for the full contract.