smewai 0.1.0 → 0.1.1

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 ADDED
@@ -0,0 +1,61 @@
1
+ # smewai
2
+
3
+ Smew Codex CLI one-command setup tool.
4
+
5
+ [中文说明](./README.zh-CN.md)
6
+
7
+ `smewai` configures the OpenAI Codex CLI to use the Smew API gateway by writing the local Codex configuration files under `~/.codex`.
8
+
9
+ ## Usage
10
+
11
+ Run the setup wizard:
12
+
13
+ ```bash
14
+ npx smewai
15
+ ```
16
+
17
+ Or pass your Smew API key directly:
18
+
19
+ ```bash
20
+ npx smewai sk-your-smew-api-key
21
+ ```
22
+
23
+ After setup, restart Codex if it is already running:
24
+
25
+ ```bash
26
+ codex
27
+ ```
28
+
29
+ ## What It Writes
30
+
31
+ The CLI updates:
32
+
33
+ - `~/.codex/config.toml`
34
+ - `~/.codex/auth.json`
35
+
36
+ It configures Codex with:
37
+
38
+ - provider: `Smew`
39
+ - base URL: `https://smew.ai/v1`
40
+ - wire API: `responses`
41
+ - default model: `gpt-5.5`
42
+
43
+ Existing Codex config fields outside the managed provider/model fields are preserved when possible.
44
+
45
+ ## Options
46
+
47
+ ```bash
48
+ npx smewai --version
49
+ npx smewai -v
50
+ ```
51
+
52
+ ## Requirements
53
+
54
+ - Node.js 18+
55
+ - OpenAI Codex CLI
56
+
57
+ Install Codex if needed:
58
+
59
+ ```bash
60
+ npm install -g @openai/codex@latest
61
+ ```
@@ -0,0 +1,59 @@
1
+ # smewai
2
+
3
+ Smew 的 Codex CLI 一键配置工具。
4
+
5
+ `smewai` 会通过写入本地 `~/.codex` 配置文件的方式,把 OpenAI Codex CLI 配置为使用 Smew API 网关。
6
+
7
+ ## 使用方式
8
+
9
+ 交互式运行:
10
+
11
+ ```bash
12
+ npx smewai
13
+ ```
14
+
15
+ 也可以直接传入 Smew API Key:
16
+
17
+ ```bash
18
+ npx smewai sk-your-smew-api-key
19
+ ```
20
+
21
+ 如果 Codex 已经在运行,配置完成后请重启:
22
+
23
+ ```bash
24
+ codex
25
+ ```
26
+
27
+ ## 会写入哪些文件
28
+
29
+ CLI 会更新:
30
+
31
+ - `~/.codex/config.toml`
32
+ - `~/.codex/auth.json`
33
+
34
+ 默认会写入以下配置:
35
+
36
+ - provider: `Smew`
37
+ - base URL: `https://smew.ai/v1`
38
+ - wire API: `responses`
39
+ - default model: `gpt-5.5`
40
+
41
+ 除受管的 provider / model 字段外,现有 Codex 配置会尽量保留。
42
+
43
+ ## 常用命令
44
+
45
+ ```bash
46
+ npx smewai --version
47
+ npx smewai -v
48
+ ```
49
+
50
+ ## 环境要求
51
+
52
+ - Node.js 18+
53
+ - OpenAI Codex CLI
54
+
55
+ 如果还没有安装 Codex,可先执行:
56
+
57
+ ```bash
58
+ npm install -g @openai/codex@latest
59
+ ```
package/lib/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const SMEW_RELAY_BASE_URL = 'https://smew.ai/v1';
2
2
  const CODEX_MODEL_PROVIDER = 'Smew';
3
- const CODEX_DEFAULT_MODEL = 'gpt-5.3-codex';
3
+ const CODEX_DEFAULT_MODEL = 'gpt-5.5';
4
4
  const CODEX_DEFAULT_REASONING_EFFORT = 'medium';
5
5
 
6
6
  module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smewai",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Smew Codex CLI 一键配置工具",
5
5
  "main": "cli.js",
6
6
  "bin": {
@@ -8,7 +8,9 @@
8
8
  },
9
9
  "files": [
10
10
  "cli.js",
11
- "lib/"
11
+ "lib/",
12
+ "README.md",
13
+ "README.zh-CN.md"
12
14
  ],
13
15
  "keywords": [
14
16
  "smew",