Files
openclaude/docs/quick-start-windows.md
T
Kevin CodexandOpenClaude 50d4058861 feat: publish as @twigpine/openclaude (#2269)
The npm package moves from the @gitlawb scope to @twigpine. Everything that
names the package now uses the new name, and the release workflow can create
the new package and close out the old one.

Rename
- package.json, bun.lock, release-please config, docs, website, VS Code
  extension and tests use @twigpine/openclaude.
- scripts/build.ts takes the baked-in package name from package.json instead
  of repeating it; scripts/verify-clean-install.ts does the same.

One final release under the old name, then nothing
- Shipped builds have no working auto-updater (the no-telemetry plugin stubs
  it out), so people update by re-running the install command. Anyone still
  typing the old name lands on whatever is latest there.
- release.yml publishes this release once more as @gitlawb/openclaude. That
  build shows a startup notice, and `openclaude update` and `/update` print
  the same note and stop, saying the package moved and how to switch.
- legacy-scope-gate limits this to a single release. It only runs while the
  old name's latest version is still 0.31.0.
- There is no in-place migration. Both packages own the `openclaude` bin, so
  npm refuses to install one over the other, and a forced install is undone
  by uninstalling the old package. The docs give the safe order.

Tokenless releases (OIDC only)
- Both publish steps authenticate through npm trusted publishing and attach
  provenance; no npm token is used anywhere. npm only attaches a trusted
  publisher to a package that already exists, so @twigpine/openclaude is
  created once by hand as an empty 0.0.0 placeholder before its first release.
- Publish steps skip a version that is already on the registry, publish the
  verified dist/ with --ignore-scripts, and report provenance and whether a
  trusted publisher was used in the run summary
  (scripts/npm-publish-report.ts).
- The legacy-named build is built and install-verified before anything is
  published.

Co-authored-by: OpenClaude <openclaude@gitlawb.com>
2026-10-12 11:21:36 +08:00

5.2 KiB

OpenClaude Quick Start for Windows

This guide uses Windows PowerShell.

1. Install Node.js

Install Node.js 22 LTS or newer from:

  • https://nodejs.org/

Then open PowerShell and check it:

node --version
npm --version

2. Install OpenClaude

npm install -g @twigpine/openclaude@latest

Upgrading from @gitlawb/openclaude? The package moved to the @twigpine scope and the old one is no longer updated. npm will not install one over the other because both provide the openclaude command, so remove the old package first:

npm uninstall -g @gitlawb/openclaude
npm install -g @twigpine/openclaude@latest

If you set up the optional PowerShell aliases, your $PROFILE still loads them from the old package folder and will show an error in every new window. See Upgrading from @gitlawb/openclaude.

3. Pick One Provider

Option A: OpenAI

Replace sk-your-key-here with your real key.

$env:CLAUDE_CODE_USE_OPENAI="1"
$env:OPENAI_API_KEY="sk-your-key-here"
$env:OPENAI_MODEL="gpt-4o"

openclaude

Option B: DeepSeek

$env:CLAUDE_CODE_USE_OPENAI="1"
$env:OPENAI_API_KEY="sk-your-key-here"
$env:OPENAI_BASE_URL="https://api.deepseek.com/v1"
$env:OPENAI_MODEL="deepseek-v4-flash"

openclaude

Use deepseek-v4-pro when you want the stronger model. deepseek-chat and deepseek-reasoner still work as DeepSeek's legacy API aliases.

Option C: Ollama

Install Ollama first from:

  • https://ollama.com/download/windows

Then run:

ollama pull llama3.1:8b

$env:CLAUDE_CODE_USE_OPENAI="1"
$env:OPENAI_BASE_URL="http://localhost:11434/v1"
$env:OPENAI_MODEL="llama3.1:8b"

openclaude

No API key is needed for Ollama local models.

OpenClaude asks Ollama for a 32768-token context window on each chat request. If you need a different size, set OPENCLAUDE_OLLAMA_NUM_CTX before launching OpenClaude, or start Ollama with a global context setting:

# Quit any existing Ollama app/server first, then run:
$env:OLLAMA_CONTEXT_LENGTH="32768"
ollama serve

After a chat request, run ollama ps in another PowerShell window and check the CONTEXT column. It should show the requested size. If it still shows a small value such as 4K, restart the Ollama app/server and try again.

Option D: LM Studio

Install LM Studio first from:

  • https://lmstudio.ai/

Then in LM Studio:

  1. Download a model (e.g., Llama 3.1 8B, Mistral 7B)
  2. Go to the "Developer" tab
  3. Select your model and enable the server via the toggle

Then run:

$env:CLAUDE_CODE_USE_OPENAI="1"
$env:OPENAI_BASE_URL="http://localhost:1234/v1"
$env:OPENAI_MODEL="your-model-name"
# $env:OPENAI_API_KEY="lmstudio"  # optional: some users need a dummy key

openclaude

Replace your-model-name with the model name shown in LM Studio.

No API key is needed for LM Studio local models (but uncomment the OPENAI_API_KEY line if you hit auth errors).

Option E: Using a .env file (Optional)

If you prefer to keep your keys in a .env file instead of exporting them individually, note that OpenClaude does not load .env files automatically. You must explicitly pass it:

openclaude --provider-env-file .env

Keep .env out of git because it contains secrets. The explicit loader accepts provider/setup variables. Set runtime/debug variables in PowerShell or your launcher instead.

4. If openclaude Is Not Found

Close PowerShell, open a new one, and try again:

openclaude

If PowerShell still says openclaude is not recognized, npm's global bin folder may be missing from your user Path. Add it, then open a new PowerShell window:

$npmPrefix = npm config get prefix
$currentUserPath = [Environment]::GetEnvironmentVariable("Path", "User")

if (($currentUserPath -split ';') -notcontains $npmPrefix) {
    [Environment]::SetEnvironmentVariable(
        "Path",
        "$currentUserPath;$npmPrefix",
        "User"
    )
}

5. If Your Provider Fails

Check the basics:

For OpenAI or DeepSeek

  • make sure the key is real
  • make sure you copied it fully

For Ollama

  • make sure Ollama is installed
  • make sure Ollama is running
  • make sure the model was pulled successfully
  • if same-session chat history appears missing, verify the active CONTEXT value with ollama ps; OpenClaude requests 32K by default

For LM Studio

  • make sure LM Studio is installed
  • make sure LM Studio is running
  • make sure the server is enabled (toggle on in the "Developer" tab)
  • make sure a model is loaded in LM Studio
  • make sure the model name matches what you set in OPENAI_MODEL

6. Updating OpenClaude

npm install -g @twigpine/openclaude@latest

7. Uninstalling OpenClaude

npm uninstall -g @twigpine/openclaude

Need Advanced Setup?

For advanced provider setup, custom endpoints, environment variables, and enterprise launch workflows, see the advanced setup guide:

For Windows helper aliases and launcher shortcuts such as oc, oc-init, oc-local, oc-provider, and oc-check, see: