# opencode一键安装window版 **Repository Path**: ddxydbl/onekeyinstallopencode ## Basic Information - **Project Name**: opencode一键安装window版 - **Description**: No description available - **Primary Language**: PowerShell - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-15 - **Last Updated**: 2026-05-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # OpenCode Offline Installation Package ## Overview This package contains all necessary components for offline installation of OpenCode AI Agent and Oh-My-OpenCode plugin system. No internet connection is required. ## Directory Structure ``` opencode离线安装资料/ ├── nodejs/ # Node.js v20.18.1 installer │ └── node-v20.18.1-win-x64.exe ├── opencode-core/ # OpenCode AI core package │ └── opencode-ai-1.14.48.tgz ├── opencode-desktop/ # OpenCode Desktop v1.14.50 (GUI) │ ├── opencode-desktop-windows-x64-v1.14.50.exe (needs download) │ └── DOWNLOAD_INSTRUCTIONS.txt ├── oh-my-opencode/ # Oh-My-OpenCode plugins │ ├── oh-my-opencode-4.0.0.tgz │ └── oh-my-opencode-windows-x64-4.0.0.tgz ├── npm-cache/ # NPM offline cache ├── install-scripts/ # Installation scripts (ENGLISH PATHS) │ ├── install-opencode.ps1 # Main installation script │ └── install-plugins.ps1 # Batch plugin installer ├── plugins/ # Office plugins │ └── dependencies/ # 20 offline plugins ├── docs/ # Documentation └── README.md # This file ``` ## System Requirements - Windows 10/11 x64 - Administrator privileges recommended - No internet connection required - Total size: ~200MB ## Quick Installation ### Method 1: Install OpenCode Core (Recommended) **Option A: Using PowerShell (Recommended)** ```powershell # Right-click the file and select "Run with PowerShell" install-scripts/install-opencode.ps1 ``` **Option B: Manual Installation** ```powershell # 1. Install Node.js (if not installed) nodejs/node-v20.18.1-win-x64.exe # 2. Install OpenCode core npm install -g opencode-core/opencode-ai-1.14.48.tgz # 3. Install Oh-My-OpenCode npm install -g oh-my-opencode/oh-my-opencode-4.0.0.tgz npm install -g oh-my-opencode/oh-my-opencode-windows-x64-4.0.0.tgz # 4. Configure Oh-My-OpenCode node "$env:APPDATA\npm\node_modules\oh-my-opencode\bin\oh-my-opencode.js" install --no-tui --claude=no --gemini=no --copilot=no --opencode-zen=yes ``` ### Method 2: Install OpenCode Desktop (GUI Application) OpenCode Desktop is the graphical version of OpenCode. **Download Required** Due to size limitations, the Desktop installer is not included in this offline package. Please download it first: 1. Visit: https://github.com/anomalyco/opencode/releases/download/v1.14.50/opencode-desktop-windows-x64.exe 2. Save the file as: `opencode-desktop-windows-x64-v1.14.50.exe` 3. Place it in: `opencode-desktop/` folder **Installation** ```powershell # Double-click the installer or run from command line .\opencode-desktop\opencode-desktop-windows-x64-v1.14.50.exe ``` ### Method 3: Install Office Plugins **Option A: Using PowerShell** ```powershell # Right-click the file and select "Run with PowerShell" install-scripts/install-plugins.ps1 ``` **Option B: Manual Installation** ```powershell # Install all plugins from the dependencies folder Get-ChildItem -Path plugins/dependencies/*.tgz | ForEach-Object { npm install -g $_.FullName } ``` ## Installation Verification ```powershell # Verify OpenCode installation opencode --version # Expected output: 1.14.48 # Verify Oh-My-OpenCode installation node "$env:APPDATA\npm\node_modules\oh-my-opencode\bin\oh-my-opencode.js" version # Expected output: oh-my-opencode v4.0.0 ``` ## Usage ```powershell # Basic usage opencode # Enhanced mode with ultrawork opencode "ultrawork help me refactor this project" # Short form opencode "ulw write a Python script for data analysis" ``` For detailed usage instructions, including examples for document polishing, PPT creation, and more, please refer to: [docs/USER_GUIDE.md](docs/USER_GUIDE.md) ## Included Plugins (20 Total) ### Text Processing (4) | Plugin | Description | |--------|-------------| | opencode-localmemory | Local persistent memory across sessions | | opencode-snippets | Text snippet management | | markdown-table-formatter | Markdown table formatting | | md-to-pdf | Markdown to PDF conversion | ### Data Analysis (6) | Plugin | Description | |--------|-------------| | opencode-data-agent | Data analysis sub-agent | | exceljs | Excel read/write operations | | xlsx (SheetJS) | Excel file parsing | | csv | CSV data processing | | json2csv | JSON to CSV conversion | | chart.js | Data visualization charts | ### Document Processing (6) | Plugin | Description | |--------|-------------| | pdf-lib | PDF creation and editing | | pdf-parse | PDF text extraction | | pdfkit | PDF document generation | | docx | Word document creation | | docx-templates | Word template filling | | mammoth | DOCX to HTML/text conversion | ### Office Automation (4) | Plugin | Description | |--------|-------------| | pptxgenjs | PowerPoint presentation generation | | babysitter-opencode | Workflow orchestration | | skill-activation | Dynamic skill activation | | skill-creator | Skill creation tool | ## Important Notes 1. **No Chinese Paths**: The installation scripts now use ENGLISH directory names to avoid encoding issues on Windows. 2. **PowerShell Execution Policy**: If you encounter execution policy errors, run this command first: ```powershell Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser ``` 3. **Node.js Installation**: The script will automatically launch the Node.js installer if Node.js is not detected. After installation, restart your terminal. 4. **Subscription Selection**: During installation, you can select your AI subscription. Choose option 6 if you want to configure later. 5. **Offline Operation**: All plugins work completely offline without requiring authentication or internet access. ## Troubleshooting ### Issue: Script won't run due to execution policy ```powershell Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser ``` ### Issue: Node.js not found after installation - Restart your terminal to refresh environment variables - Verify Node.js installation: `node --version` ### Issue: Permission errors - Run PowerShell as Administrator - Check file permissions on the installation directory ## Support For documentation and tutorials, refer to the `docs/` folder or visit the official OpenCode documentation. --- *Last updated: May 2026*