This guide walks you through the complete setup process for the DIN CLI (dincli) from installation to first use.
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
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.
Connect a stored account with:
dincli system connect-wallet --account 0Important
To use dincli with your own wallet (Non-Demo Mode from .env file), you must first disable demo mode:
dincli system configure-demo --mode nodincli requires an IPFS provider to store and retrieve model data. Choose one of the options below.
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.
You may use ipfs daemon or any other provider. Just add the following in .env file at root of your project folder.
IPFS_API_URL_ADD=http://127.0.0.1:5001/api/v0/add
IPFS_API_URL_RETRIEVE=http://127.0.0.1:5001/api/v0/cat/Ensure your IPFS provider is configured to pin uploaded artifacts. If using a local node, garbage collection must be managed to prevent the loss of registered artifacts.
also configure IPFS provider in dincli using dincli system configure-ipfs command.
dincli system configure-ipfs --provider custom