intuition-cli
v2.0.0-alpha.2
Published
A CLI for the Intuition protocol.
Keywords
Readme
Intuition CLI
The Intuition CLI is a powerful command-line interface that allows you to interact with the Intuition protocol directly from your terminal. With this tool, you can manage accounts, create and manage Intuition Atoms, and configure your settings with ease.
Installation
To get started, install the Intuition CLI globally using npm:
npm install -g intuition-cliUsage
Once installed, you can use the intu command to access the CLI's features. To see a list of available commands, run:
intu --helpCommands
The Intuition CLI provides a range of commands to help you manage your interactions with the protocol. Below is an overview of the main commands and their functions.
Account Management
You can manage your Ethereum accounts using the account commands.
Generate a new account:
intu account generate [--name <NAME>] [--default]Flags:
-n, --name <value>: Name of the account to generate (optional)-d, --default: Set as default account (optional)
Import an account from a private key:
intu account import <PRIVATE_KEY> [--name <NAME>] [--default]Flags:
-n, --name <value>: Name of the account to import (optional)-d, --default: Set as default account (optional)
List your accounts:
intu account list [--export]Flags:
-e, --export: Show the private key for each account (optional)
Set your default account:
intu account default <ADDRESS>Flags: (No flags)
Check account balance:
intu account balance <ADDRESS?>Flags: (No flags)
Reset accounts:
intu account resetFlags: (No flags)
Creating Atoms
Atoms are the core of the Intuition protocol. You can create them one by one or in batches.
- Create a single Atom:
Flags:intu atom create [--network <NETWORK>] [--deposit <AMOUNT>]--network <value>: Target network (intuition, intuition-testnet) (optional)--deposit <value>: Deposit amount in ETH (optional)
Batch Atom Creation
For creating multiple Atoms at once, the batch functionality is recommended.
Setup a batch file:
intu atom batch setup [--name <FILENAME>.csv]Flags:
-n, --name <value>: Name of file to create (default: intuition-data.csv)
First, create a CSV file for your batch. The CLI provides a simple setup command to generate a template file.
By default the new CSV filename is intuition-data.csv
This will create a CSV file with the required headers. You can then open this file and add the data for the Atoms you want to create.
Example
things.csv:name,description,image,url "Example Name","Example description of thing.",https://example.com/logo.png,https://example.com/Start the batch creation:
intu atom batch start [--name <FILENAME>.csv] [--count <NUMBER>] [--list <LIST_IDS>] [--network <NETWORK>]Flags:
-n, --name <value>: Filename to load (default: intuition-data.csv)-c, --count <value>: Amount to batch together (default: 50)-l, --list <value>: Add atoms to a list (comma-separated for multiple)--network <value>: Network to use (optional)
Once your CSV file is ready, you can start the batch creation process.
New atoms can automatically be added to a list using the
listflag. Atoms can be added to multiple lists using comma separated values.The CLI will then read the CSV file and create the Atoms on the blockchain.
Configuration
You can manage the CLI's configuration using the config commands.
Set the default network:
intu config default-network <NETWORK>Flags: (No flags)
Show the current default network:
intu config default-networkFlags: (No flags)
Experimental features
Sync
intu experimental sync ./data.jsonMakes sure that current account has minimal position on triples. Creates missing atoms and triples.
Input file example:
{
"ipfs://QmVj1PW5khQLA9Dr9MqKpe2K1oaRkVTH7bj764jqb5KuKj": {
"https://schema.org/keywords": "ipfs://bafkreidz5oah73l7gacv4dmw5pu4sljbtejhvwptrc2mgfsgida2gaozqq"
},
"ipfs://bafkreiewmh2cajr5boy5r5lnfxhirgyvtnhazaexi2vy2jfyh3zajq5dca": {
"https://schema.org/keywords": "ipfs://bafkreidz5oah73l7gacv4dmw5pu4sljbtejhvwptrc2mgfsgida2gaozqq"
},
"ipfs://bafkreicwzlxcyrsmhqvclae76w74v3aogsre2jpo7mzf7oqcos2jewuq3a": {
"https://schema.org/keywords": "ipfs://bafkreidz5oah73l7gacv4dmw5pu4sljbtejhvwptrc2mgfsgida2gaozqq"
},
"did:example:abc": {
"type": "agent",
"name": "Claude",
"description": "Your ultimate ai assistant",
"url": "https://agent.example.com/a2a",
"capabilities": ["web_search"]
}
}Search
intu experimental search ./query.jsonExample input file:
[{"type": "agent"}, {"capabilities": "web_search"}]Contributing
Contributions are welcome! Please see the main repository for more information on how to contribute.
License
This project is licensed under the MIT License.
