iflow-comm 1.0.4 → 1.0.5

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
@@ -110,27 +110,45 @@ npm uninstall -g iflow-comm
110
110
 
111
111
  ## 🔑 Authentication
112
112
 
113
- iFlow offers two authentication options:
113
+ iFlow CLI uses OpenAI-compatible API authentication. It supports any service provider that complies with the OpenAI API standard, including:
114
+ - OpenAI (ChatGPT)
115
+ - Claude (via compatible interface)
116
+ - DeepSeek
117
+ - Qwen (Tongyi Qianwen)
118
+ - Other OpenAI-compatible API services
114
119
 
115
- 1. **Recommended**: Use iFlow's native authentication
116
- 2. **Alternative**: Connect via OpenAI-compatible APIs
120
+ ### Configuration Steps
117
121
 
118
- ![iFlow CLI Login](./assets/login.jpg)
122
+ 1. Get an API key from your chosen API service provider
123
+ 2. Edit the configuration file `~/.iflow/settings.json`
124
+ 3. Configure your API information
119
125
 
120
- Choose option 1 to login directly, which will open iFlow account authentication in a web page. After completing authentication, you can use it for free.
126
+ ### First Time Use
121
127
 
122
- ![iFlow CLI Web Login](./assets/web-login.jpg)
128
+ When you start `iflow-comm` for the first time, the system will guide you through the configuration:
123
129
 
124
- If you are in an environment like a server where you cannot open a web page, please use option 2 to login.
130
+ ```shell
131
+ iflow-comm
132
+ ```
125
133
 
126
- To get your API key:
127
- 1. Register for an iFlow account
128
- 2. Go to your profile settings or click [this direct link](https://iflow.cn/?open=setting)
129
- 3. Click "Reset" in the pop-up dialog to generate a new API key
134
+ Follow the prompts to enter:
135
+ - Base URL (API service address)
136
+ - API Key (your key)
137
+ - Model Name (model name)
130
138
 
131
- ![iFlow Profile Settings](./assets/profile-settings.jpg)
139
+ ### Manual Configuration
132
140
 
133
- After generating your key, paste it into the terminal prompt to complete setup.
141
+ You can also manually edit the `~/.iflow/settings.json` file:
142
+
143
+ ```json
144
+ {
145
+ "theme": "Default",
146
+ "selectedAuthType": "openai",
147
+ "apiKey": "your-api-key",
148
+ "baseUrl": "https://api.openai.com/v1",
149
+ "modelName": "gpt-4"
150
+ }
151
+ ```
134
152
 
135
153
  ## 🚀 Getting Started
136
154
 
@@ -226,14 +244,37 @@ iFlow CLI extends beyond coding to handle a wide range of tasks:
226
244
  iFlow CLI can connect to any OpenAI-compatible API. Edit the settings file in `~/.iflow/settings.json` to change the model you use.
227
245
 
228
246
  Here is a settings demo file:
247
+
248
+ ### OpenAI Configuration Example
249
+ ```json
250
+ {
251
+ "theme": "Default",
252
+ "selectedAuthType": "openai",
253
+ "apiKey": "sk-your-openai-api-key",
254
+ "baseUrl": "https://api.openai.com/v1",
255
+ "modelName": "gpt-4"
256
+ }
257
+ ```
258
+
259
+ ### DeepSeek Configuration Example
260
+ ```json
261
+ {
262
+ "theme": "Default",
263
+ "selectedAuthType": "openai",
264
+ "apiKey": "your-deepseek-api-key",
265
+ "baseUrl": "https://api.deepseek.com/v1",
266
+ "modelName": "deepseek-chat"
267
+ }
268
+ ```
269
+
270
+ ### Claude Configuration Example
229
271
  ```json
230
272
  {
231
273
  "theme": "Default",
232
- "selectedAuthType": "iflow",
233
- "apiKey": "your iflow key",
234
- "baseUrl": "https://apis.iflow.cn/v1",
235
- "modelName": "Qwen3-Coder",
236
- "searchApiKey": "your iflow key"
274
+ "selectedAuthType": "openai",
275
+ "apiKey": "your-anthropic-api-key",
276
+ "baseUrl": "https://api.anthropic.com/v1",
277
+ "modelName": "claude-3-5-sonnet-20241022"
237
278
  }
238
279
  ```
239
280
 
@@ -3,6 +3,7 @@
3
3
  /**
4
4
  * iflow-comm - A wrapper for iflow CLI
5
5
  * This script forwards all arguments to the iflow command
6
+ * Forces OpenAI-compatible API authentication by default
6
7
  */
7
8
 
8
9
  const { spawn } = require('child_process');
@@ -11,11 +12,24 @@ const path = require('path');
11
12
  // Get the path to iflow entry point (local bundle)
12
13
  const entryPath = path.join(__dirname, '../bundle/entry.js');
13
14
 
15
+ // Force OpenAI authentication by setting environment variables
16
+ // This overrides any iflow authentication settings
17
+ const env = {
18
+ ...process.env,
19
+ IFLOW_selectedAuthType: 'openai', // Force OpenAI authentication type
20
+ IFLOW_disableIFlowAuth: 'true', // Disable iFlow authentication features
21
+ IFLOW_disableWebSearch: 'true', // Disable WebSearch (iFlow-only feature)
22
+ IFLOW_disableWebFetch: 'true', // Disable WebFetch (iFlow-only feature)
23
+ IFLOW_disableMultimodal: 'true', // Disable multimodal features (iFlow-only)
24
+ IFLOW_disableOpenMarket: 'true' // Disable open market (iFlow-only)
25
+ };
26
+
14
27
  // Spawn iflow with all arguments using Node.js
15
28
  const child = spawn('node', [entryPath, ...process.argv.slice(2)], {
16
29
  stdio: 'inherit',
17
30
  shell: false,
18
- windowsHide: true
31
+ windowsHide: true,
32
+ env: env
19
33
  });
20
34
 
21
35
  // Handle exit
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"iflow-comm","version":"1.0.4","description":"A fork of iFlow CLI with custom command name iflow-comm - Now independent from @iflow-ai/iflow-cli","main":"index.js","bin":{"iflow-comm":"bin/iflow-comm.cjs"},"type":"module","engines":{"node":">=20.0.0"},"scripts":{"postinstall":"node scripts/iflow/postinstall-ripgrep.js"},"dependencies":{"asciify-image":"^0.1.10","gifuct-js":"^2.1.2","ink":"^6.5.0","node-notifier":"^10.0.1","react-devtools-core":"^6.1.5","shell-quote":"^1.8.3"},"optionalDependencies":{"@lydell/node-pty":"1.1.0","@lydell/node-pty-darwin-arm64":"1.1.0","@lydell/node-pty-darwin-x64":"1.1.0","@lydell/node-pty-linux-arm64":"1.1.0","@lydell/node-pty-linux-x64":"1.1.0","@lydell/node-pty-win32-arm64":"1.1.0","@lydell/node-pty-win32-x64":"1.1.0","node-pty":"^1.0.0"},"keywords":["ai","cli","assistant","iflow","iflow-comm"],"author":"","license":"MIT","repository":{"type":"git","url":"https://gitee.com/QQsakura/iflow-cli-comm.git"},"files":["bin/","bundle/","vendors/","scripts/iflow/","index.js","README.md","LICENSE"]}
1
+ {"name": "iflow-comm", "version": "1.0.5", "description": "A fork of iFlow CLI with custom command name iflow-comm - OpenAI-only authentication, independent from @iflow-ai/iflow-cli", "main": "index.js", "bin": {"iflow-comm": "bin/iflow-comm.cjs"}, "type": "module", "engines": {"node": ">=20.0.0"}, "scripts": {"postinstall": "node scripts/iflow/postinstall-ripgrep.js"}, "dependencies": {"asciify-image": "^0.1.10", "gifuct-js": "^2.1.2", "ink": "^6.5.0", "node-notifier": "^10.0.1", "react-devtools-core": "^6.1.5", "shell-quote": "^1.8.3"}, "optionalDependencies": {"@lydell/node-pty": "1.1.0", "@lydell/node-pty-darwin-arm64": "1.1.0", "@lydell/node-pty-darwin-x64": "1.1.0", "@lydell/node-pty-linux-arm64": "1.1.0", "@lydell/node-pty-linux-x64": "1.1.0", "@lydell/node-pty-win32-arm64": "1.1.0", "@lydell/node-pty-win32-x64": "1.1.0", "node-pty": "^1.0.0"}, "keywords": ["ai", "cli", "assistant", "iflow", "iflow-comm"], "author": "", "license": "MIT", "repository": {"type": "git", "url": "https://gitee.com/QQsakura/iflow-cli-comm.git"}, "files": ["bin/", "bundle/", "vendors/", "scripts/iflow/", "index.js", "README.md", "LICENSE"]}