@circuitorg/agent-cli 1.1.17 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,117 +8,57 @@ The official command-line tool for creating, testing, and publishing agents on t
8
8
  - [📑 Table of Contents](#-table-of-contents)
9
9
  - [🚀 Features](#-features)
10
10
  - [📦 Installation](#-installation)
11
- - [Installation Methods Explained](#installation-methods-explained)
12
- - [Option 1: Install via Bun (Requires Bun runtime)](#option-1-install-via-bun-requires-bun-runtime)
13
11
  - [🎯 Quick Start](#-quick-start)
14
- - [First Steps](#first-steps)
15
- - [Creating Your First Agent](#creating-your-first-agent)
16
12
  - [📚 Command Reference](#-command-reference)
17
13
  - [Core Commands](#core-commands)
18
- - [Agent Management Commands](#agent-management-commands)
19
14
  - [Wallet Commands](#wallet-commands)
20
- - [Run Command Flags](#run-command-flags)
15
+ - [Command Details](#command-details)
16
+ - [`circuit init`](#circuit-init)
17
+ - [`circuit run`](#circuit-run)
18
+ - [`circuit stop`](#circuit-stop)
21
19
  - [Getting Started with Agents](#getting-started-with-agents)
22
20
  - [🔧 Troubleshooting](#-troubleshooting)
23
- - [Common Issues](#common-issues)
24
- - ["No supported project type detected"](#no-supported-project-type-detected)
25
- - ["Server failed to start within timeout"](#server-failed-to-start-within-timeout)
26
- - ["Authentication Required"](#authentication-required)
27
- - [Need Help?](#need-help)
28
21
  - [🔗 Related](#-related)
29
22
 
30
23
  ## 🚀 Features
31
24
 
32
- - **Easy Setup**: Initialize new agents with a single command
33
- - **Local Testing**: Test your agents locally before publishing
34
- - **Interactive Mode**: User-friendly menus for all commands
35
- - **Multi-Language**: Support for both TypeScript and Python agents
36
- - **Zero Dependencies**: Standalone executables work out of the box
37
- - **Cross-Platform**: Works on macOS, Linux, and Windows
25
+ - Initialize new agents with a single command
26
+ - Test agents locally before publishing
27
+ - Support for TypeScript and Python
28
+ - Cross-platform: macOS, Linux, and Windows
38
29
 
39
30
  ## 📦 Installation
40
31
 
41
- ### Installation Methods Explained
42
-
43
- **How to install Circuit CLI:**
44
-
45
- 1. **Bun package manager** - Requires Bun runtime
46
- 2. **NPM package manager** - Coming soon
47
-
48
-
49
- #### Option 1: Install via Bun (Requires Bun runtime)
50
-
51
- **⚠️ Prerequisites**:
52
- - You must have Bun or node installed - bun install link: (`curl -fsSL https://bun.sh/install | bash`)
32
+ **Prerequisites**: Bun or Node.js installed ([Install Bun](https://bun.sh))
53
33
 
54
34
  ```bash
55
35
  bun install -g @circuitorg/agent-cli
56
36
  ```
57
37
 
58
- **Note**: This method installs a minified JavaScript bundle, not a compiled binary. The `circuit` command will run using your local Bun runtime.
59
-
60
38
 
61
39
  ## 🎯 Quick Start
62
40
 
63
- ### First Steps
64
-
65
- ```bash
66
- # Verify installation
67
- circuit --version
68
-
69
- # RECOMMENDED FIRST STEP: Get an overview of the tooling and quick start guide
70
- circuit help
71
- ```
72
-
73
- ### Creating Your First Agent
74
-
75
- **Streamlined Workflow:**
76
-
77
41
  ```bash
78
- # 1. Authenticate your cli tool with your circuit account
42
+ # Authenticate
79
43
  circuit login
80
44
 
81
- # 2. Initialize a new agent project (optionally pass --no-dir to use an existing folder)
45
+ # Create a new agent
82
46
  circuit init
83
- # Follow the prompts to:
84
- # - Choose TypeScript or Python
85
- # - Name your agent
86
- # - Set up the project structure
87
47
 
88
- # 3. Navigate to your new agent (Skip if you passed --no-dir above)
89
- cd <generated-folder>
48
+ # Navigate to agent directory
49
+ cd <agent-name>
90
50
 
91
- # 4. Install dependencies
92
- bun install # For TypeScript agents
93
- # OR
94
- uv sync # For Python agents
51
+ # Install dependencies
52
+ bun install # TypeScript
53
+ uv sync # Python
95
54
 
96
- # 5. Test your agent (handles setup, session creation automatically)
55
+ # Test locally
97
56
  circuit run
98
57
 
99
- # 6. Publish to production when ready
58
+ # Publish to production
100
59
  circuit publish
101
60
  ```
102
61
 
103
- **Existing Agent Setup:**
104
-
105
- ```bash
106
- # Navigate to your existing agent directory
107
- cd <existing-agent-dir>
108
-
109
- # Initialize with --no-dir to configure existing project
110
- circuit init --no-dir
111
- # This adds the agent to CLI registry and updates config files
112
-
113
- # Install dependencies
114
- bun install # or uv sync for Python
115
-
116
- # Test your agent
117
- circuit run
118
- ```
119
-
120
- > **Note**: For existing agents, copy your execution logic into the execute/stop functions in the generated template files. See the SDK documentation for details on the Agent class structure.
121
-
122
62
 
123
63
  ## 📚 Command Reference
124
64
 
@@ -130,16 +70,11 @@ circuit run
130
70
  | `circuit login` | Authenticate with Circuit platform |
131
71
  | `circuit logout` | Sign out from Circuit platform |
132
72
  | `circuit init` | Initialize a new agent project |
133
- | `circuit run` | Run/test your agent (handles setup automatically) |
73
+ | `circuit run` | Test your agent locally |
74
+ | `circuit stop` | Stop a running agent session |
134
75
  | `circuit publish` | Publish agent to production |
135
76
  | `circuit help` | Show detailed help and getting started guide |
136
-
137
- ### Agent Management Commands
138
-
139
- | Command | Description |
140
- |---------|-------------|
141
- | `circuit agent info` | Show current agent information |
142
- | `circuit agent status` | Check agent ment status |
77
+ | `circuit info` | Display CLI and current agent information |
143
78
 
144
79
  ### Wallet Commands
145
80
 
@@ -148,88 +83,54 @@ circuit run
148
83
  | `circuit wallet list` | List your available wallets |
149
84
  | `circuit wallet import` | Import a new wallet for testing |
150
85
 
151
- ### Run Command Flags
86
+ ### Command Details
87
+
88
+ #### `circuit init`
89
+ Creates a new agent project:
90
+ - Prompts for language (TypeScript or Python) and agent name
91
+ - Generates project structure with `.circuit.toml` config file
92
+
93
+ Each agent stores its configuration in a local `.circuit.toml` file.
152
94
 
153
- The `circuit run` command supports these optional flags to skip interactive prompts:
95
+ #### `circuit run`
96
+ Runs your un-published agent code:
97
+ - Creates a session if needed
98
+ - Starts local agent server
99
+ - Executes your agent's run command
154
100
 
155
- | Flag | Description |
156
- |------|-------------|
157
- | `--wallet <address>` | Use specific wallet address |
158
- | `--mode local\|live\|custom` | Set simulation mode |
159
- | `--action execute\|stop` | Choose action to perform |
160
- | `--port <number>` | Port for custom server mode |
101
+ **Flags:**
102
+ - `--wallet <address>` or `-w <address>` - Specify wallet address
161
103
 
162
- **Examples:**
163
104
  ```bash
164
- # Interactive mode (recommended)
165
105
  circuit run
106
+ circuit run --wallet 0x123...
107
+ ```
166
108
 
167
- # Skip prompts with flags
168
- circuit run --wallet 0x123... --mode local --action execute
109
+ #### `circuit stop`
110
+ Stops a running agent session and cleans up resources.
169
111
 
170
- # Connect to custom server
171
- circuit run --mode custom --port 8080
112
+ **Flags:**
113
+ - `--wallet <address>` or `-w <address>` - Specify wallet address
172
114
 
173
- # Stop simulation with custom server
174
- circuit run --mode custom --port 8080 --action stop
115
+ ```bash
116
+ circuit stop
117
+ circuit stop --wallet 0x123...
175
118
  ```
176
119
 
177
120
  ### Getting Started with Agents
178
121
 
179
- When you run `circuit init`, the CLI will:
180
-
181
- 1. Prompt you to choose TypeScript or Python
182
- 2. For TypeScript: Select from available templates (bare, self-send)
183
- 3. Create a complete project structure with:
184
- - Main agent file with example code
185
- - Configuration file (`circuit.json`)
186
- - Dependencies file (`package.json` or `pyproject.toml`)
187
- - Ready-to-run agent template
122
+ `circuit init` generates:
123
+ - Main agent file: `index.ts` (TypeScript) or `main.py` (Python)
124
+ - Configuration: `.circuit.toml`
125
+ - Dependencies: `package.json` or `pyproject.toml`
188
126
 
189
- The generated agent includes:
190
- - HTTP server setup
191
- - Health check endpoint
192
- - Execute and stop functions
193
- - Proper error handling
194
- - Circuit SDK v1.0 integration with new unified API
195
- - Template-specific examples (balance checking, transfers, custom transactions)
127
+ Your agent code implements two commands:
128
+ - `run` - Executes your agent logic
129
+ - `stop` - Handles cleanup when stopping
196
130
 
197
131
 
198
132
  ## 🔧 Troubleshooting
199
-
200
- ### Common Issues
201
-
202
- #### "No supported project type detected"
203
-
204
- Make sure you're in a directory with the correct project structure:
205
-
206
- - **TypeScript**: `index.ts` + `package.json`
207
- - **Python**: `main.py` + `pyproject.toml`
208
-
209
- #### "Server failed to start within timeout"
210
-
211
- Check that your agent server:
212
- 1. Has a `/health` endpoint
213
- 2. Starts within the timeout period (default: 30 seconds)
214
- 3. Binds to the correct port
215
-
216
- #### "Authentication Required"
217
-
218
- Run `circuit login` to authenticate with the Circuit platform.
219
-
220
- ### Need Help?
221
-
222
- ```bash
223
- # Show available commands
224
- circuit --help
225
-
226
- # Show help for specific command
227
- circuit agent --help
228
-
229
- # Enable verbose output
230
- circuit --verbose
231
- ```
232
-
133
+ **User feedback and common questions will be populated here as it comes in**
233
134
  ## 🔗 Related
234
135
 
235
136
  - [Circuit Agents SDK Typescript](https://www.npmjs.com/package/@circuitorg/agent-sdk)
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@circuitorg/agent-cli",
3
- "version": "1.1.17",
3
+ "version": "1.2.2",
4
4
  "description": "A CLI tool for publishing agents to the Circuit platform",
5
5
  "type": "module",
6
6
  "bin": {