diff --git a/docs/WINDOWS_SETUP.md b/docs/WINDOWS_SETUP.md new file mode 100644 index 000000000..d61342eff --- /dev/null +++ b/docs/WINDOWS_SETUP.md @@ -0,0 +1,184 @@ +# Windows Setup and Troubleshooting Guide + +This guide provides Windows-specific setup instructions and troubleshooting for jcode users on Windows 10/11. + +## Installation + +### Quick Install (PowerShell) + +```powershell +irm https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/install.ps1 | iex +``` + +### Installation Details + +The PowerShell installer: +- Downloads the latest jcode release for your architecture (x86_64 or ARM64) +- Installs to `%LOCALAPPDATA%\jcode\bin\jcode.exe` (launcher) +- Stores versioned binaries in `%LOCALAPPDATA%\jcode\builds\versions\\jcode.exe` +- Adds the installation directory to your user PATH +- Optionally installs Alacritty terminal emulator +- Optionally sets up Alt+; global hotkey to launch jcode + +### Manual Installation + +If the automated installer fails: + +1. Download the appropriate release from [GitHub Releases](https://github.com/1jehuang/jcode/releases) +2. Extract `jcode.exe` to a directory of your choice +3. Add that directory to your system PATH +4. Verify installation: `jcode --version` + +## Configuration Locations + +Windows-specific configuration paths: + +| File/Directory | Windows Path | +|----------------|--------------| +| Main config | `%USERPROFILE%\.jcode\config.toml` | +| Auth credentials | `%USERPROFILE%\.jcode\auth.json` | +| Provider env files | `%APPDATA%\jcode\` | +| Build artifacts | `%LOCALAPPDATA%\jcode\builds\` | +| Browser components | `%LOCALAPPDATA%\jcode\browser\` | +| Logs | `%USERPROFILE%\.jcode\logs\` | + +## Login and Authentication + +### CLI Login (Recommended for Windows) + +The CLI provides flags to avoid interactive TUI issues: + +```powershell +# OpenAI-compatible provider with all options +jcode login --provider openai-compatible --api-base https://api.deepseek.com --model deepseek-v4-flash --api-key YOUR_API_KEY + +# Skip API key prompt (will prompt securely) +jcode login --provider openai-compatible --api-base https://api.deepseek.com --model deepseek-v4-flash +``` + +Available login flags: +- `--provider `: Provider to use (openai, claude, openrouter, etc.) +- `--api-base `: OpenAI-compatible API base URL +- `--api-key `: API key (omitted = secure prompt) +- `--model `: Model to use +- `--account