Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ The following command line options are available for the `start` command:
| --wait | Wait instead of error when rate limit is hit | false | -w |
| --github-token | Provide GitHub token directly (must be generated using the `auth` subcommand) | none | -g |
| --claude-code | Generate a command to launch Claude Code with Copilot API config | false | -c |
| --claude-code-env | Generate Claude Code Environment variables | true | none |
| --show-token | Show GitHub and Copilot tokens on fetch and refresh | false | none |

### Auth Command Options
Expand Down Expand Up @@ -305,7 +304,16 @@ Here is an example `.claude/settings.json` file:
"ANTHROPIC_BASE_URL": "http://localhost:4141",
"ANTHROPIC_AUTH_TOKEN": "dummy",
"ANTHROPIC_MODEL": "gpt-4.1",
"ANTHROPIC_SMALL_FAST_MODEL": "gpt-4.1"
"ANTHROPIC_DEFAULT_SONNET_MODEL": "gpt-4.1",
"ANTHROPIC_SMALL_FAST_MODEL": "gpt-4.1",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "gpt-4.1",
"DISABLE_NON_ESSENTIAL_MODEL_CALLS": "1",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
},
"permissions": {
"deny": [
"WebSearch"
]
}
}
```
Expand Down
13 changes: 5 additions & 8 deletions src/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ interface RunServerOptions {
githubToken?: string
claudeCode: boolean
showToken: boolean
claudeCodeEnv?: boolean
}

export async function runServer(options: RunServerOptions): Promise<void> {
Expand Down Expand Up @@ -61,7 +60,7 @@ export async function runServer(options: RunServerOptions): Promise<void> {

const serverUrl = `http://localhost:${options.port}`

if (options.claudeCode && options.claudeCodeEnv) {
if (options.claudeCode) {
invariant(state.models, "Models should be loaded by now")

const selectedModel = await consola.prompt(
Expand All @@ -85,7 +84,11 @@ export async function runServer(options: RunServerOptions): Promise<void> {
ANTHROPIC_BASE_URL: serverUrl,
ANTHROPIC_AUTH_TOKEN: "dummy",
ANTHROPIC_MODEL: selectedModel,
ANTHROPIC_DEFAULT_SONNET_MODEL: selectedModel,
ANTHROPIC_SMALL_FAST_MODEL: selectedSmallModel,
ANTHROPIC_DEFAULT_HAIKU_MODEL: selectedSmallModel,
DISABLE_NON_ESSENTIAL_MODEL_CALLS: "1",
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1",
},
"claude",
)
Expand Down Expand Up @@ -170,11 +173,6 @@ export const start = defineCommand({
default: false,
description: "Show GitHub and Copilot tokens on fetch and refresh",
},
"claude-code-env": {
type: "boolean",
default: true,
description: "Generate Claude Code Environment variables",
},
},
run({ args }) {
const rateLimitRaw = args["rate-limit"]
Expand All @@ -192,7 +190,6 @@ export const start = defineCommand({
githubToken: args["github-token"],
claudeCode: args["claude-code"],
showToken: args["show-token"],
claudeCodeEnv: args["claude-code-env"],
})
},
})