CLI reference

This document covers the regentx CLI for managing Regent agents on-chain.

Installation

npm install -g @regent/regentx
# or use without installing
bunx @regent/regentx

Commands

agent:init

Initialize a new Regent agent project.

regentx agent:init [options]

Options:

Option
Description
Default

--name <name>

Agent name

my-regent-agent

--chain <chain>

Default chain ID or name

-

--owner-wallet <id>

Wallet connector ID

local-eoa

--metadata-uri <uri>

Initial metadata URI

ipfs://TODO

--mode <mode>

Deployment mode

mock

-y, --yes

Accept defaults, overwrite

-

Example:

Creates regent.config.ts and .env.example.


agent:create

Create a new agent via the factory contract.

Options:

Option
Description

--name <name>

Override agent name

--metadata-uri <uri>

Override metadata URI

--owner-wallet <id>

Override wallet connector

--rake-bps <bps>

Rake in basis points (0-10000)

--initial-bond <wei>

Initial bond amount

--skip-identity

Don't register with ERC-8004

--dry-run

Show what would be created

--json

Output JSON

Example:


agent:status

Show the on-chain and ERC-8004 state of an agent.

Arguments:

Argument
Description
Default

agentId

Agent ID to query

From config

Options:

Option
Description

--json

Output JSON

Example:


agent:list

List all agents owned by a wallet.

Options:

Option
Description
Default

--owner <address>

Override owner address

Current wallet

--limit <n>

Max agents to show

50

--json

Output JSON

-

Example:


Global Options

Available on all commands:

Option
Description

--config <path>

Path to config file

--chain <chain>

Chain ID or name

--rpc-url <url>

Override RPC URL

--wallet <id>

Wallet connector ID

--factory <address>

Factory contract address

--mode <mode>

Deployment mode: mock or onchain


Configuration File

The CLI reads from regent.config.ts (or .js, .json):


Chain Aliases

Supported chain names:

Alias
Chain ID

ethereum

1

base

8453

polygon

137

sepolia

11155111

base-sepolia

84532

polygon-amoy

80002

localhost

31337


Environment Variables


Exit Codes

Code
Meaning

0

Success

1

General error

2

Invalid config or input


Examples

Development Workflow

Production Workflow

CI/CD Integration

Last updated