### Build Installer from Source Source: https://github.com/opencoworkai/open-cowork/blob/main/readme.md Builds the installer package locally from the source code. ```bash npm run build ``` -------------------------------- ### Install Open Cowork Source: https://github.com/opencoworkai/open-cowork/blob/main/CONTRIBUTING.md Clones the repository and installs dependencies. ```bash git clone https://github.com/OpenCoworkAI/open-cowork.git cd open-cowork npm install # also runs postinstall: downloads Node binaries + rebuilds native modules ``` -------------------------------- ### Conventional Commits Examples Source: https://github.com/opencoworkai/open-cowork/blob/main/CONTRIBUTING.md Examples of Conventional Commits. ```bash feat(mcp): add Streamable HTTP transport support fix(sandbox): handle WSL2 path with spaces docs: update README setup instructions test(session): add unit tests for session-manager ``` -------------------------------- ### Using the LanguageSwitcher Component Source: https://github.com/opencoworkai/open-cowork/blob/main/src/renderer/i18n/README.md Example of how to import and use the pre-created `LanguageSwitcher` component in your application. ```tsx import { LanguageSwitcher } from './components/LanguageSwitcher'; ``` -------------------------------- ### Translation File Structure Example Source: https://github.com/opencoworkai/open-cowork/blob/main/src/renderer/i18n/README.md Recommended structure for organizing translation JSON files by feature module. ```json { "common": { ... }, // 通用词汇 "welcome": { ... }, // 欢迎页 "settings": { ... }, // 设置页 "mcp": { ... }, // MCP 相关 "credentials": { ... } // 凭证相关 } ``` -------------------------------- ### macOS Installation via Homebrew Source: https://github.com/opencoworkai/open-cowork/blob/main/website/public/llms.txt Instructions for installing Open Cowork on macOS using Homebrew. ```bash brew tap OpenCoworkAI/tap brew install --cask --no-quarantine open-cowork ``` -------------------------------- ### Build from Source Source: https://github.com/opencoworkai/open-cowork/blob/main/website/public/llms-full.txt Steps to clone the repository, install dependencies, and build Open Cowork from source. ```bash git clone https://github.com/OpenCoworkAI/open-cowork.git cd open-cowork npm install npm run rebuild npm run dev ``` -------------------------------- ### Switching Languages Source: https://github.com/opencoworkai/open-cowork/blob/main/src/renderer/i18n/README.md Example of how to programmatically change the current language using the `i18n` object from `useTranslation`. ```tsx import { useTranslation } from 'react-i18next'; function LanguageSwitcher() { const { i18n } = useTranslation(); const changeLanguage = (lang: 'en' | 'zh') => { i18n.changeLanguage(lang); }; return ( ); } ``` -------------------------------- ### Test File Placement Source: https://github.com/opencoworkai/open-cowork/blob/main/CONTRIBUTING.md Examples of how to place test files relative to their source files. ```bash src/main/mcp/mcp-manager.ts → src/tests/mcp/mcp-manager.test.ts src/main/session/session-manager.ts → src/tests/session/session-manager.test.ts ``` -------------------------------- ### macOS Installation via Homebrew Source: https://github.com/opencoworkai/open-cowork/blob/main/readme.md This command installs Open Cowork AI on macOS using Homebrew, avoiding potential security warnings associated with direct DMG downloads. ```bash brew tap OpenCoworkAI/tap && brew install --cask --no-quarantine open-cowork ``` -------------------------------- ### Using Translation in a Component Source: https://github.com/opencoworkai/open-cowork/blob/main/src/renderer/i18n/README.md Example of how to use the `useTranslation` hook to translate text within a React component. ```tsx import { useTranslation } from 'react-i18next'; function MyComponent() { const { t } = useTranslation(); return (

{t('welcome.title')}

); } ``` -------------------------------- ### Install Lima on macOS Source: https://github.com/opencoworkai/open-cowork/blob/main/readme.md Installs Lima, a dependency for enhanced sandbox security on macOS. ```bash brew install lima ``` -------------------------------- ### Pluralization in Translations Source: https://github.com/opencoworkai/open-cowork/blob/main/src/renderer/i18n/README.md Example of handling plural forms in translations using `react-i18next`, including the JSON structure and usage for different counts. ```json // en.json { "mcp": { "toolsAvailable": "{{count}} tool available", "toolsAvailable_plural": "{{count}} tools available" } } // 使用 {t('mcp.toolsAvailable', { count: 1 })} // "1 tool available" {t('mcp.toolsAvailable', { count: 5 })} // "5 tools available" ``` -------------------------------- ### Translation with Variables Source: https://github.com/opencoworkai/open-cowork/blob/main/src/renderer/i18n/README.md Demonstrates how to use variables within translations, showing the JSON structure and the usage in code. ```json // en.json { "welcome": { "greeting": "Hello, {{name}}!" } } // 使用 {t('welcome.greeting', { name: 'John' })} ``` -------------------------------- ### i18next Usage Source: https://github.com/opencoworkai/open-cowork/blob/main/CONTRIBUTING.md Example of using react-i18next for internationalization, contrasting good and bad practices. ```tsx // Good import { useTranslation } from 'react-i18next'; const { t } = useTranslation(); return ; // Bad return ; ``` -------------------------------- ### Run Tests Source: https://github.com/opencoworkai/open-cowork/blob/main/CONTRIBUTING.md Commands to run tests in watch mode, for a single run, and with coverage. ```bash npm run test # watch mode npx vitest run # single run (used in CI) npx vitest run --coverage # with v8 coverage report ``` -------------------------------- ### Open Cowork AI Project Structure Source: https://github.com/opencoworkai/open-cowork/blob/main/readme.md An overview of the directory structure for the Open Cowork AI project, detailing the main components and their purposes. ```tree open-cowork/ ├── src/ │ ├── main/ # Electron Main Process (Node.js) │ │ ├── index.ts # Main entry point │ │ ├── claude/ # Agent SDK & Runner │ │ │ └── agent-runner.ts # AI agent execution logic │ │ ├── config/ # Configuration management │ │ │ └── config-store.ts # Persistent settings storage │ │ ├── db/ # Database layer │ │ │ └── database.ts # SQLite/data persistence │ │ ├── ipc/ # IPC handlers │ │ ├── memory/ # Memory management │ │ │ └── memory-manager.ts │ │ ├── sandbox/ # Security & Path Resolution │ │ │ └── path-resolver.ts # Sandboxed file access │ │ ├── session/ # Session management │ │ │ └── session-manager.ts │ │ ├── skills/ # Skill Loader & Manager │ │ │ └── skills-manager.ts │ │ └── tools/ # Tool execution │ │ └── tool-executor.ts # Tool call handling │ ├── preload/ # Electron preload scripts │ │ └── index.ts # Context bridge setup │ └── renderer/ # Frontend UI (React + Tailwind) │ ├── App.tsx # Root component │ ├── main.tsx # React entry point │ ├── components/ # UI Components │ │ ├── ChatView.tsx # Main chat interface │ │ ├── ConfigModal.tsx # Settings dialog │ │ ├── ContextPanel.tsx # File context display │ │ ├── MessageCard.tsx # Chat message component │ │ ├── PermissionDialog.tsx │ │ ├── Sidebar.tsx # Navigation sidebar │ │ ├── Titlebar.tsx # Custom window titlebar │ │ ├── TracePanel.tsx # AI reasoning trace │ │ └── WelcomeView.tsx # Onboarding screen │ ├── hooks/ # Custom React hooks │ │ └── useIPC.ts # IPC communication hook │ ├── store/ # State management │ │ └── index.ts │ ├── styles/ # CSS styles │ │ └── globals.css │ ├── types/ # TypeScript types │ │ └── index.ts │ └── utils/ # Utility functions ├── .claude/ │ └── skills/ # Default Skill Definitions │ ├── pptx/ # PowerPoint generation │ ├── docx/ # Word document processing │ ├── pdf/ # PDF handling & forms │ ├── xlsx/ # Excel spreadsheet support │ └── skill-creator/ # Skill development toolkit ├── resources/ # Static Assets (icons, images) ├── electron-builder.yml # Build configuration ├── vite.config.ts # Vite bundler config └── package.json # Dependencies & scripts ``` -------------------------------- ### Robots.txt Configuration Source: https://github.com/opencoworkai/open-cowork/blob/main/website/public/robots.txt This robots.txt file specifies which user-agents are allowed to crawl the website and its content. ```robots.txt User-agent: * Allow: / User-agent: Googlebot Allow: / User-agent: Bingbot Allow: / User-agent: OAI-SearchBot Allow: / User-agent: ChatGPT-User Allow: / User-agent: GPTBot Allow: / User-agent: PerplexityBot Allow: / User-agent: ClaudeBot Allow: / User-agent: Claude-User Allow: / User-agent: anthropic-ai Allow: / Sitemap: https://opencoworkai.github.io/open-cowork/sitemap.xml ``` -------------------------------- ### Conventional Commits Structure Source: https://github.com/opencoworkai/open-cowork/blob/main/CONTRIBUTING.md Enforces Conventional Commits for commit messages. ```bash (): ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.