|
@@ -42,8 +42,8 @@ export const initCommand = new Command("init")
|
|
|
language: opts.lang ?? "zh",
|
|
language: opts.lang ?? "zh",
|
|
|
llm: {
|
|
llm: {
|
|
|
provider: process.env.INKOS_LLM_PROVIDER ?? "openai",
|
|
provider: process.env.INKOS_LLM_PROVIDER ?? "openai",
|
|
|
- baseUrl: process.env.INKOS_LLM_BASE_URL ?? "https://api.openai.com/v1",
|
|
|
|
|
- model: process.env.INKOS_LLM_MODEL ?? "gpt-4o",
|
|
|
|
|
|
|
+ baseUrl: process.env.INKOS_LLM_BASE_URL ?? "",
|
|
|
|
|
+ model: process.env.INKOS_LLM_MODEL ?? "",
|
|
|
},
|
|
},
|
|
|
notify: [],
|
|
notify: [],
|
|
|
daemon: {
|
|
daemon: {
|
|
@@ -71,9 +71,9 @@ export const initCommand = new Command("init")
|
|
|
"# Global config at ~/.inkos/.env will be used by default.",
|
|
"# Global config at ~/.inkos/.env will be used by default.",
|
|
|
"# Uncomment below to override for this project only:",
|
|
"# Uncomment below to override for this project only:",
|
|
|
"# INKOS_LLM_PROVIDER=openai",
|
|
"# INKOS_LLM_PROVIDER=openai",
|
|
|
- "# INKOS_LLM_BASE_URL=https://api.openai.com/v1",
|
|
|
|
|
- "# INKOS_LLM_API_KEY=your-api-key-here",
|
|
|
|
|
- "# INKOS_LLM_MODEL=gpt-4o",
|
|
|
|
|
|
|
+ "# INKOS_LLM_BASE_URL=",
|
|
|
|
|
+ "# INKOS_LLM_API_KEY=",
|
|
|
|
|
+ "# INKOS_LLM_MODEL=",
|
|
|
"",
|
|
"",
|
|
|
"# Web search (optional):",
|
|
"# Web search (optional):",
|
|
|
"# TAVILY_API_KEY=tvly-xxxxx",
|
|
"# TAVILY_API_KEY=tvly-xxxxx",
|
|
@@ -88,9 +88,9 @@ export const initCommand = new Command("init")
|
|
|
"# Tip: Run 'inkos config set-global' to set once for all projects.",
|
|
"# Tip: Run 'inkos config set-global' to set once for all projects.",
|
|
|
"# Provider: openai (OpenAI / compatible proxy), anthropic (Anthropic native)",
|
|
"# Provider: openai (OpenAI / compatible proxy), anthropic (Anthropic native)",
|
|
|
"INKOS_LLM_PROVIDER=openai",
|
|
"INKOS_LLM_PROVIDER=openai",
|
|
|
- "INKOS_LLM_BASE_URL=https://api.openai.com/v1",
|
|
|
|
|
- "INKOS_LLM_API_KEY=your-api-key-here",
|
|
|
|
|
- "INKOS_LLM_MODEL=gpt-4o",
|
|
|
|
|
|
|
+ "INKOS_LLM_BASE_URL=",
|
|
|
|
|
+ "INKOS_LLM_API_KEY=",
|
|
|
|
|
+ "INKOS_LLM_MODEL=",
|
|
|
"",
|
|
"",
|
|
|
"# Optional parameters (defaults shown):",
|
|
"# Optional parameters (defaults shown):",
|
|
|
"# INKOS_LLM_TEMPERATURE=0.7",
|
|
"# INKOS_LLM_TEMPERATURE=0.7",
|
|
@@ -103,8 +103,9 @@ export const initCommand = new Command("init")
|
|
|
"",
|
|
"",
|
|
|
"# Anthropic example:",
|
|
"# Anthropic example:",
|
|
|
"# INKOS_LLM_PROVIDER=anthropic",
|
|
"# INKOS_LLM_PROVIDER=anthropic",
|
|
|
- "# INKOS_LLM_BASE_URL=https://api.anthropic.com",
|
|
|
|
|
- "# INKOS_LLM_MODEL=claude-sonnet-4-5-20250514",
|
|
|
|
|
|
|
+ "# INKOS_LLM_PROVIDER=anthropic",
|
|
|
|
|
+ "# INKOS_LLM_BASE_URL=",
|
|
|
|
|
+ "# INKOS_LLM_MODEL=",
|
|
|
].join("\n"),
|
|
].join("\n"),
|
|
|
"utf-8",
|
|
"utf-8",
|
|
|
);
|
|
);
|
|
@@ -128,7 +129,7 @@ export const initCommand = new Command("init")
|
|
|
log("Next steps:");
|
|
log("Next steps:");
|
|
|
if (name) log(` cd ${name}`);
|
|
if (name) log(` cd ${name}`);
|
|
|
log(" # Option 1: Set global config (recommended, one-time):");
|
|
log(" # Option 1: Set global config (recommended, one-time):");
|
|
|
- log(" inkos config set-global --provider openai --base-url https://api.openai.com/v1 --api-key sk-xxx --model gpt-4o");
|
|
|
|
|
|
|
+ log(" inkos config set-global --provider openai --base-url <your-api-url> --api-key <your-key> --model <your-model>");
|
|
|
log(" # Option 2: Edit .env for this project only");
|
|
log(" # Option 2: Edit .env for this project only");
|
|
|
log("");
|
|
log("");
|
|
|
log(" inkos book create --title '我的小说' --genre xuanhuan --platform tomato");
|
|
log(" inkos book create --title '我的小说' --genre xuanhuan --platform tomato");
|