smewai 0.1.0 → 0.1.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 ADDED
@@ -0,0 +1,65 @@
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
+ Create or copy your Smew API key first:
18
+
19
+ - https://smew.ai/keys
20
+
21
+ Or pass your Smew API key directly:
22
+
23
+ ```bash
24
+ npx smewai sk-your-smew-api-key
25
+ ```
26
+
27
+ After setup, restart Codex if it is already running:
28
+
29
+ ```bash
30
+ codex
31
+ ```
32
+
33
+ ## What It Writes
34
+
35
+ The CLI updates:
36
+
37
+ - `~/.codex/config.toml`
38
+ - `~/.codex/auth.json`
39
+
40
+ It configures Codex with:
41
+
42
+ - provider: `Smew`
43
+ - base URL: `https://smew.ai/v1`
44
+ - wire API: `responses`
45
+ - default model: `gpt-5.5`
46
+
47
+ Existing Codex config fields outside the managed provider/model fields are preserved when possible.
48
+
49
+ ## Options
50
+
51
+ ```bash
52
+ npx smewai --version
53
+ npx smewai -v
54
+ ```
55
+
56
+ ## Requirements
57
+
58
+ - Node.js 18+
59
+ - OpenAI Codex CLI
60
+
61
+ Install Codex if needed:
62
+
63
+ ```bash
64
+ npm install -g @openai/codex@latest
65
+ ```
@@ -0,0 +1,63 @@
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
+ - https://smew.ai/keys
18
+
19
+ 也可以直接传入 Smew API Key:
20
+
21
+ ```bash
22
+ npx smewai sk-your-smew-api-key
23
+ ```
24
+
25
+ 如果 Codex 已经在运行,配置完成后请重启:
26
+
27
+ ```bash
28
+ codex
29
+ ```
30
+
31
+ ## 会写入哪些文件
32
+
33
+ CLI 会更新:
34
+
35
+ - `~/.codex/config.toml`
36
+ - `~/.codex/auth.json`
37
+
38
+ 默认会写入以下配置:
39
+
40
+ - provider: `Smew`
41
+ - base URL: `https://smew.ai/v1`
42
+ - wire API: `responses`
43
+ - default model: `gpt-5.5`
44
+
45
+ 除受管的 provider / model 字段外,现有 Codex 配置会尽量保留。
46
+
47
+ ## 常用命令
48
+
49
+ ```bash
50
+ npx smewai --version
51
+ npx smewai -v
52
+ ```
53
+
54
+ ## 环境要求
55
+
56
+ - Node.js 18+
57
+ - OpenAI Codex CLI
58
+
59
+ 如果还没有安装 Codex,可先执行:
60
+
61
+ ```bash
62
+ npm install -g @openai/codex@latest
63
+ ```
package/cli.js CHANGED
@@ -17,6 +17,8 @@ function extractApiKeyArg() {
17
17
 
18
18
  async function getApiKeyInput() {
19
19
  console.log('');
20
+ logInfo('请先前往 https://smew.ai/keys 创建或复制你的 API Key');
21
+ console.log('');
20
22
 
21
23
  let response;
22
24
  try {
@@ -75,6 +77,8 @@ async function main() {
75
77
  await checkForUpdates(cliVersion);
76
78
 
77
79
  logInfo(`Smew Codex 一键配置 v${cliVersion}`);
80
+ logInfo('创建 API Key: https://smew.ai/keys');
81
+ console.log('');
78
82
 
79
83
  const quickApiKey = extractApiKeyArg();
80
84
  if (quickApiKey) {
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.2",
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",