forgexa-cli 1.0.3__tar.gz → 1.1.2__tar.gz

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.
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: forgexa-cli
3
- Version: 1.0.3
4
- Summary: Forgexa CLI — command-line client for managing workspaces, projects, requirements, and agent runtimes
5
- Author-email: Shinetech <dev@shinetechsoftware.com>
3
+ Version: 1.1.2
4
+ Summary: Forgexa CLI — command-line client and AI agent runtime for the Forgexa platform
5
+ Author-email: Jason Sun <dev.winds@gmail.com>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://forgexa.net
8
8
  Project-URL: Documentation, https://docs.forgexa.net
@@ -24,12 +24,15 @@ Classifier: Topic :: Software Development :: Build Tools
24
24
  Classifier: Topic :: Software Development :: Quality Assurance
25
25
  Requires-Python: >=3.9
26
26
  Description-Content-Type: text/markdown
27
+ Provides-Extra: daemon
28
+ Requires-Dist: httpx>=0.24; extra == "daemon"
27
29
 
28
30
  # Forgexa CLI
29
31
 
30
- Command-line client for the [[Forgexa](https://forgexa.net) platform.
32
+ Command-line client and agent runtime for the [Forgexa](https://forgexa.net) platform.
31
33
 
32
- Lightweight, zero-dependency — communicates with the Forgexa server via REST API using only Python stdlib.
34
+ Lightweight — communicates with the Forgexa server via REST API using only Python stdlib.
35
+ Includes a built-in **daemon** that discovers local AI agents (Claude Code, Codex, Gemini CLI, OpenCode, Kimi Code, etc.) and executes tasks on behalf of the server.
33
36
 
34
37
  ## Installation
35
38
 
@@ -94,6 +97,8 @@ forgexa board --project <project-id>
94
97
  | `forgexa workflow show --project <id>` | Show workflow policy |
95
98
  | `forgexa workflow reload --project <id>` | Reload workflow |
96
99
  | `forgexa budget --workspace <id>` | Budget overview |
100
+ | `forgexa daemon start` | Start local daemon (discover agents, run tasks) |
101
+ | `forgexa daemon start -d` | Start daemon in background |
97
102
  | `forgexa daemon status` | Show daemon statuses |
98
103
  | `forgexa daemon stop` | Stop local daemon |
99
104
  | `forgexa runtimes list` | List runtimes |
@@ -116,14 +121,56 @@ forgexa workspace list --format quiet # IDs only
116
121
 
117
122
  ## Daemon Management
118
123
 
119
- The `forgexa` CLI handles remote daemon queries. To **start** a daemon locally,
120
- use the `forgexa-daemon` command from the backend package:
124
+ The daemon discovers locally installed AI agents and registers them with the Forgexa server.
125
+ It then polls for tasks and executes them using your local agents.
126
+
127
+ ### Start Daemon
128
+
129
+ ```bash
130
+ # Foreground (default — see logs, Ctrl+C to stop)
131
+ forgexa daemon start
132
+
133
+ # Background (detached)
134
+ forgexa daemon start -d
135
+
136
+ # Connect to a specific server
137
+ forgexa daemon start --server-url https://your-server.example.com
138
+
139
+ # Or via the standalone entry point
140
+ forgexa-daemon
141
+ ```
142
+
143
+ ### Other Daemon Commands
121
144
 
122
145
  ```bash
123
- pip install ./backend
124
- forgexa-daemon # starts the runtime daemon
146
+ # Check daemon status (from server)
147
+ forgexa daemon status
148
+
149
+ # Stop background daemon
150
+ forgexa daemon stop
125
151
  ```
126
152
 
153
+ ### Supported AI Agents
154
+
155
+ The daemon automatically discovers these agents if installed on your system:
156
+
157
+ | Agent | Command |
158
+ |-------|---------|
159
+ | Claude Code | `claude` |
160
+ | OpenAI Codex | `codex` |
161
+ | Gemini CLI | `gemini` |
162
+ | OpenCode | `opencode` |
163
+ | Kimi Code | `kimi` |
164
+
165
+ ### Environment Variables (Daemon)
166
+
167
+ | Variable | Default | Description |
168
+ |----------|---------|-------------|
169
+ | `DAEMON_SERVER_URL` | `http://localhost:8000` | Server to connect to |
170
+ | `DAEMON_API_TOKEN` | — | Auth token (auto-read from `~/.forgexa/token`) |
171
+ | `DAEMON_MAX_CONCURRENT` | `5` | Max parallel tasks |
172
+ | `DAEMON_POLL_INTERVAL` | `3` | Poll interval (seconds) |
173
+
127
174
  ## Publishing to PyPI
128
175
 
129
176
  ### Prerequisites
@@ -181,3 +228,73 @@ password = pypi-AgEIcH...
181
228
  EOF
182
229
  chmod 600 ~/.pypirc
183
230
  ```
231
+
232
+ ## Local Development & Debugging
233
+
234
+ ### Editable Install
235
+
236
+ ```bash
237
+ cd cli
238
+ pip install -e .
239
+ ```
240
+
241
+ This installs the `forgexa` command pointing to your local source. Changes take effect immediately.
242
+
243
+ ### Testing Against Local Server
244
+
245
+ ```bash
246
+ # Point CLI to local backend
247
+ export FORGEXA_SERVER_URL=http://localhost:8000
248
+
249
+ # Login
250
+ forgexa login
251
+
252
+ # Test commands
253
+ forgexa workspace list
254
+ forgexa daemon start
255
+ ```
256
+
257
+ ### Testing Against Remote/LAN Server
258
+
259
+ ```bash
260
+ export FORGEXA_SERVER_URL=http://192.168.0.100:8000
261
+ forgexa login
262
+ forgexa daemon start
263
+ ```
264
+
265
+ ### Debugging the Daemon
266
+
267
+ ```bash
268
+ # Run in foreground to see all logs
269
+ forgexa daemon start
270
+
271
+ # Check which agents are discovered
272
+ forgexa runtimes list
273
+
274
+ # Verbose logging (if supported)
275
+ DAEMON_LOG_LEVEL=DEBUG forgexa daemon start
276
+ ```
277
+
278
+ ### Project Structure
279
+
280
+ ```
281
+ cli/
282
+ ├── forgexa_cli/
283
+ │ ├── __init__.py # Version constant
284
+ │ ├── main.py # CLI entry point (argparse)
285
+ │ ├── daemon.py # Daemon implementation
286
+ │ └── py.typed # PEP 561 marker
287
+ ├── scripts/
288
+ │ ├── bump-version.sh # Version management
289
+ │ ├── publish.sh # PyPI publishing
290
+ │ └── sync-daemon.sh # Sync daemon code from backend
291
+ ├── pyproject.toml # Package metadata
292
+ └── README.md # This file
293
+ ```
294
+
295
+ ### Design Principles
296
+
297
+ - **Zero external dependencies** — uses only Python stdlib (urllib, json, subprocess)
298
+ - **Lightweight** — installs in seconds, no compilation needed
299
+ - **Cross-platform** — works on Linux, macOS, Windows
300
+ - **Standalone daemon** — discovers local AI agents without server-side configuration
@@ -1,8 +1,9 @@
1
1
  # Forgexa CLI
2
2
 
3
- Command-line client for the [[Forgexa](https://forgexa.net) platform.
3
+ Command-line client and agent runtime for the [Forgexa](https://forgexa.net) platform.
4
4
 
5
- Lightweight, zero-dependency — communicates with the Forgexa server via REST API using only Python stdlib.
5
+ Lightweight — communicates with the Forgexa server via REST API using only Python stdlib.
6
+ Includes a built-in **daemon** that discovers local AI agents (Claude Code, Codex, Gemini CLI, OpenCode, Kimi Code, etc.) and executes tasks on behalf of the server.
6
7
 
7
8
  ## Installation
8
9
 
@@ -67,6 +68,8 @@ forgexa board --project <project-id>
67
68
  | `forgexa workflow show --project <id>` | Show workflow policy |
68
69
  | `forgexa workflow reload --project <id>` | Reload workflow |
69
70
  | `forgexa budget --workspace <id>` | Budget overview |
71
+ | `forgexa daemon start` | Start local daemon (discover agents, run tasks) |
72
+ | `forgexa daemon start -d` | Start daemon in background |
70
73
  | `forgexa daemon status` | Show daemon statuses |
71
74
  | `forgexa daemon stop` | Stop local daemon |
72
75
  | `forgexa runtimes list` | List runtimes |
@@ -89,14 +92,56 @@ forgexa workspace list --format quiet # IDs only
89
92
 
90
93
  ## Daemon Management
91
94
 
92
- The `forgexa` CLI handles remote daemon queries. To **start** a daemon locally,
93
- use the `forgexa-daemon` command from the backend package:
95
+ The daemon discovers locally installed AI agents and registers them with the Forgexa server.
96
+ It then polls for tasks and executes them using your local agents.
97
+
98
+ ### Start Daemon
99
+
100
+ ```bash
101
+ # Foreground (default — see logs, Ctrl+C to stop)
102
+ forgexa daemon start
103
+
104
+ # Background (detached)
105
+ forgexa daemon start -d
106
+
107
+ # Connect to a specific server
108
+ forgexa daemon start --server-url https://your-server.example.com
109
+
110
+ # Or via the standalone entry point
111
+ forgexa-daemon
112
+ ```
113
+
114
+ ### Other Daemon Commands
94
115
 
95
116
  ```bash
96
- pip install ./backend
97
- forgexa-daemon # starts the runtime daemon
117
+ # Check daemon status (from server)
118
+ forgexa daemon status
119
+
120
+ # Stop background daemon
121
+ forgexa daemon stop
98
122
  ```
99
123
 
124
+ ### Supported AI Agents
125
+
126
+ The daemon automatically discovers these agents if installed on your system:
127
+
128
+ | Agent | Command |
129
+ |-------|---------|
130
+ | Claude Code | `claude` |
131
+ | OpenAI Codex | `codex` |
132
+ | Gemini CLI | `gemini` |
133
+ | OpenCode | `opencode` |
134
+ | Kimi Code | `kimi` |
135
+
136
+ ### Environment Variables (Daemon)
137
+
138
+ | Variable | Default | Description |
139
+ |----------|---------|-------------|
140
+ | `DAEMON_SERVER_URL` | `http://localhost:8000` | Server to connect to |
141
+ | `DAEMON_API_TOKEN` | — | Auth token (auto-read from `~/.forgexa/token`) |
142
+ | `DAEMON_MAX_CONCURRENT` | `5` | Max parallel tasks |
143
+ | `DAEMON_POLL_INTERVAL` | `3` | Poll interval (seconds) |
144
+
100
145
  ## Publishing to PyPI
101
146
 
102
147
  ### Prerequisites
@@ -154,3 +199,73 @@ password = pypi-AgEIcH...
154
199
  EOF
155
200
  chmod 600 ~/.pypirc
156
201
  ```
202
+
203
+ ## Local Development & Debugging
204
+
205
+ ### Editable Install
206
+
207
+ ```bash
208
+ cd cli
209
+ pip install -e .
210
+ ```
211
+
212
+ This installs the `forgexa` command pointing to your local source. Changes take effect immediately.
213
+
214
+ ### Testing Against Local Server
215
+
216
+ ```bash
217
+ # Point CLI to local backend
218
+ export FORGEXA_SERVER_URL=http://localhost:8000
219
+
220
+ # Login
221
+ forgexa login
222
+
223
+ # Test commands
224
+ forgexa workspace list
225
+ forgexa daemon start
226
+ ```
227
+
228
+ ### Testing Against Remote/LAN Server
229
+
230
+ ```bash
231
+ export FORGEXA_SERVER_URL=http://192.168.0.100:8000
232
+ forgexa login
233
+ forgexa daemon start
234
+ ```
235
+
236
+ ### Debugging the Daemon
237
+
238
+ ```bash
239
+ # Run in foreground to see all logs
240
+ forgexa daemon start
241
+
242
+ # Check which agents are discovered
243
+ forgexa runtimes list
244
+
245
+ # Verbose logging (if supported)
246
+ DAEMON_LOG_LEVEL=DEBUG forgexa daemon start
247
+ ```
248
+
249
+ ### Project Structure
250
+
251
+ ```
252
+ cli/
253
+ ├── forgexa_cli/
254
+ │ ├── __init__.py # Version constant
255
+ │ ├── main.py # CLI entry point (argparse)
256
+ │ ├── daemon.py # Daemon implementation
257
+ │ └── py.typed # PEP 561 marker
258
+ ├── scripts/
259
+ │ ├── bump-version.sh # Version management
260
+ │ ├── publish.sh # PyPI publishing
261
+ │ └── sync-daemon.sh # Sync daemon code from backend
262
+ ├── pyproject.toml # Package metadata
263
+ └── README.md # This file
264
+ ```
265
+
266
+ ### Design Principles
267
+
268
+ - **Zero external dependencies** — uses only Python stdlib (urllib, json, subprocess)
269
+ - **Lightweight** — installs in seconds, no compilation needed
270
+ - **Cross-platform** — works on Linux, macOS, Windows
271
+ - **Standalone daemon** — discovers local AI agents without server-side configuration
@@ -1,2 +1,2 @@
1
1
  """forgexa-cli — Forgexa command-line client."""
2
- __version__ = "1.0.3"
2
+ __version__ = "1.1.2"
@@ -0,0 +1,2 @@
1
+ # Auto-generated by publish.sh — do not edit manually.
2
+ BUILD_SERVER_URL = "https://api.forgexa.net"