@agiflowai/agent-cli 0.0.7 → 0.0.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.9
4
+ Update:
5
+ - Improve Claude Code tool permissions detection.
6
+
7
+ ## 0.0.8
8
+ Update:
9
+ - Add `claude --standalone` command to support launching claude without backend connection.
10
+
3
11
  ## 0.0.7
4
12
  Add:
5
13
  - Add `router` command to enable switching provider to openai chatgpt sub.
package/README.md CHANGED
@@ -6,7 +6,9 @@
6
6
 
7
7
  @agiflowai/agent-cli - Command-line interface for connecting and managing AI agents (Claude Code, Gemini) with Agiflow remotely.
8
8
 
9
- **Note**: for `agent-cli claude` and `agent-cli router` you don't need to authenticate with Agiflow server.
9
+ **Note**:
10
+ - For `agent-cli claude` and `agent-cli router` you don't need to authenticate with Agiflow server.
11
+ - Use `agent-cli claude --standalone` to run Claude Code locally without any backend connection.
10
12
 
11
13
  **🔗 Related Project**: Check out the [AgiFlow AI Code Toolkit](https://github.com/AgiFlow/aicode-toolkit) - an open-source collection of AI development tools and utilities.
12
14
 
@@ -51,7 +53,10 @@ agent-cli connect --verbose
51
53
  Launch a Claude Code agent with full functionality.
52
54
 
53
55
  ```bash
54
- # Basic Claude agent launch (requires session ID)
56
+ # Basic Claude agent launch in standalone mode (no backend)
57
+ agent-cli claude --standalone
58
+
59
+ # With backend connection (requires session ID)
55
60
  agent-cli claude --agent-session-id your-session-id
56
61
 
57
62
  # With custom alias for easy identification
@@ -71,6 +76,9 @@ agent-cli claude \
71
76
  --llm-provider chatgpt \
72
77
  --llm-model gpt-5 \
73
78
  --alias "gpt5-experiment"
79
+
80
+ # Standalone mode (no backend connection)
81
+ agent-cli claude --standalone --verbose
74
82
  ```
75
83
 
76
84
  **Options:**
@@ -85,6 +93,7 @@ agent-cli claude \
85
93
  - `--args <args...>` - Additional arguments to pass to Claude
86
94
  - `-v, --verbose` - Enable verbose logging
87
95
  - `--alias <alias>` - Custom session alias for easy identification
96
+ - `--standalone` - Run in standalone mode without backend connection
88
97
 
89
98
  **LLM Routing Options:**
90
99
  - `--llm-provider <provider>` - LLM provider to route requests to (e.g., `chatgpt`, `openai`)
@@ -92,6 +101,39 @@ agent-cli claude \
92
101
 
93
102
  **Note:** LLM routing configuration is saved to `~/.agiflow/sessions.json` and can be changed later using the `agent-cli router` command without restarting the agent.
94
103
 
104
+ ##### Standalone Mode
105
+
106
+ Run Claude Code agent locally without connecting to the Agiflow backend server. This is useful for:
107
+ - Development and testing
108
+ - Running in environments without backend access
109
+ - Privacy-focused local-only usage
110
+
111
+ **Usage:**
112
+
113
+ ```bash
114
+ # Explicit standalone mode
115
+ agent-cli claude --standalone
116
+
117
+ # Standalone mode with verbose logging
118
+ agent-cli claude --standalone --verbose
119
+
120
+ # Standalone mode with custom working directory
121
+ agent-cli claude --standalone --working-directory /path/to/project
122
+ ```
123
+
124
+ **How It Works:**
125
+
126
+ When `--standalone` is enabled:
127
+ - ✅ Claude Code launches normally with full functionality
128
+ - ✅ All local features work (file operations, code analysis, etc.)
129
+ - ❌ No WebSocket connection to Agiflow backend
130
+ - ❌ No remote session management
131
+ - ❌ No backend authentication required
132
+
133
+ **Automatic Standalone Detection:**
134
+
135
+ If no server URL is configured (via `--server-url` or environment variables), the agent automatically runs in standalone mode even without the `--standalone` flag.
136
+
95
137
  ##### Running Claude with ChatGPT/OpenAI
96
138
 
97
139
  You can route Claude Code requests to ChatGPT/OpenAI using the LLM routing feature. This allows you to use GPT models while keeping the Claude Code interface.
@@ -313,6 +355,16 @@ agent-cli logout --verbose
313
355
  - Check network connectivity
314
356
  - Verify server URL is accessible
315
357
  - Use `--verbose` flag for detailed logging
358
+ - Use `--standalone` flag to run without backend connection
359
+
360
+ 5. **WebSocket 401 Unauthorized (Production)**
361
+ ```
362
+ Error: Unexpected server response: 401
363
+ ```
364
+ Solution: Use `--standalone` flag to run without backend authentication:
365
+ ```bash
366
+ agent-cli claude --standalone --verbose
367
+ ```
316
368
 
317
369
  **LLM Routing Issues:**
318
370