Files
openwork/README.md
Omar McAdam 2b91b4d777 refactor: repo folder structure (#1038)
* refactor(repo): move OpenWork apps into apps and ee layout

Rebase the monorepo layout migration onto the latest dev changes so the moved app, desktop, share, and cloud surfaces keep working from their new paths. Carry the latest deeplink, token persistence, build, Vercel, and docs updates forward to avoid stale references and broken deploy tooling.

* chore(repo): drop generated desktop artifacts

Ignore the moved Tauri target and sidecar paths so local cargo checks do not pollute the branch. Remove the accidentally committed outputs from the repo while keeping the layout migration intact.

* fix(release): drop built server cli artifact

Stop tracking the locally built apps/server/cli binary so generated server outputs do not leak into commits. Also update the release workflow to check the published scoped package name for @openwork/server before deciding whether npm publish is needed.

* fix(workspace): add stable CLI bin wrappers

Point the server and router package bins at committed wrapper scripts so workspace installs can create shims before dist outputs exist. Keep the wrappers compatible with built binaries and source checkouts to avoid Vercel install warnings without changing runtime behavior.
2026-03-19 11:41:38 -07:00

256 lines
9.7 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
English | [简体中文](./README_ZH.md) | [日本語](./TRANSLATIONS.md) | [Tiếng Việt](./TRANSLATIONS.md) | [Hindi](./TRANSLATIONS.md) | [Spanish](./TRANSLATIONS.md) | [French](./TRANSLATIONS.md) | [German](./TRANSLATIONS.md) | [Farsi](./TRANSLATIONS.md) | [Turkish](./TRANSLATIONS.md) | [Thai](./TRANSLATIONS.md) | [繁體中文](./README_ZH_hk.md) | [Catalan](./TRANSLATIONS.md)
![OpenWork banner](./.github/assets/github-banner.png)
> OpenWork is an AI coworker for you an your team. It helps you run your agents, skills, and MCPs. It's an open-source alternative to Claude Cowork/Codex (desktop app).
<div align="center">
<p align="center">
<a href="https://openwork.software/docs"><img src="https://img.shields.io/badge/openwork.software%2Fdocs-orange" alt="Docs"></a>
<a href="https://discord.gg/VEhNQXxYMB"><img src="https://img.shields.io/badge/discord-join-5865F2?logo=discord&logoColor=white" alt="Discord"></a>
<a href="https://github.com/different-ai/openwork/"><img src="https://img.shields.io/github/stars/different-ai/openwork" alt="Github Stars"></a>
<a href="https://github.com/different-ai/openwork/pulse"><img src="https://img.shields.io/github/commit-activity/w/different-ai/openwork" alt="Commits-per-week"></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License: MIT"></a>
</p>
<br />
<div>
<a href="https://openworklabs.com/docs"><strong>Docs</strong></a> ·
<a href="https://github.com/different-ai/openwork/issues/new?template=bug.yml"><strong>Report Bug</strong></a> |
<a href="https://github.com/different-ai/openwork/issues/new?template=feature.yml"><strong>Request a Feature</strong></a> |
<a href="https://discord.gg/VEhNQXxYMB"><strong>Join Discord</strong></a> |
<a href="https://openworklabs.com/download"><strong>Download App</strong></a>
</div>
</div>
## Core Philosophy
- Local-first, cloud-ready: OpenWork runs on your machine in one click. Send a message instantly.
- Composable: desktop app, WhatsApp/Slack/Telegram connector, or server. Use what fits, no lock-in.
- Ejectable: OpenWork is powered by OpenCode, so everything OpenCode can do works in OpenWork, even without a UI yet.
- Sharing is caring: start solo, then share. One CLI or desktop command spins up an instantly shareable instance.
<p align="center">
<img src="./app-demo.gif" alt="OpenWork demo" width="800" />
</p>
OpenWork is designed around the idea that you can easily ship your agentic workflows as a repeatable, productized process.
## Alternate UIs
- **OpenWork Orchestrator (CLI host)**: run OpenCode + OpenWork server without the desktop UI.
- install: `npm install -g openwork-orchestrator`
- run: `openwork start --workspace /path/to/workspace --approval auto`
- docs: [apps/orchestrator/README.md](./apps/orchestrator/README.md)
## Quick start
Download the correct version in [here](https://openworklabs.com/download), in the latest [releases](https://github.com/different-ai/openwork/releases) or install from source below.
## Why
Current CLI and GUIs for opencode are anchored around developers. That means a focus on file diffs, tool names, and hard to extend capabilities without relying on exposing some form of cli.
OpenWork is designed to be:
- **Extensible**: skill and opencode plugins are installable modules.
- **Auditable**: show what happened, when, and why.
- **Permissioned**: access to privileged flows.
- **Local/Remote**: OpenWork works locally as well as can connect to remote servers.
## Whats Included
- **Host mode**: runs opencode locally on your computer
- **Client mode**: connect to an existing OpenCode server by URL.
- **Sessions**: create/select sessions and send prompts.
- **Live streaming**: SSE `/event` subscription for realtime updates.
- **Execution plan**: render OpenCode todos as a timeline.
- **Permissions**: surface permission requests and reply (allow once / always / deny).
- **Templates**: save and re-run common workflows (stored locally).
- **Skills manager**:
- list installed `.opencode/skills` folders
- install from OpenPackage (`opkg install ...`)
- import a local skill folder into `.opencode/skills/<skill-name>`
## Skill Manager
<img width="1292" height="932" alt="image" src="https://github.com/user-attachments/assets/b500c1c6-a218-42ce-8a11-52787f5642b6" />
## Works on local computer or servers
<img width="1292" height="932" alt="Screenshot 2026-01-13 at 7 05 16PM" src="https://github.com/user-attachments/assets/9c864390-de69-48f2-82c1-93b328dd60c3" />
## Quick Start
### Requirements
- Node.js + `pnpm`
- Rust toolchain (for Tauri): install via `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
- Tauri CLI: `cargo install tauri-cli`
- OpenCode CLI installed and available on PATH: `opencode`
### Local Dev Prerequisites (Desktop)
Before running `pnpm dev`, ensure these are installed and active in your shell:
- Node + pnpm (repo uses `pnpm@10.27.0`)
- **Bun 1.3.9+** (`bun --version`)
- Rust toolchain (for Tauri), with Cargo from current `rustup` stable (supports `Cargo.lock` v4)
- Xcode Command Line Tools (macOS)
- On Linux, WebKitGTK 4.1 development packages so `pkg-config` can resolve `webkit2gtk-4.1` and `javascriptcoregtk-4.1`
### One-minute sanity check
Run from repo root:
```bash
git checkout dev
git pull --ff-only origin dev
pnpm install --frozen-lockfile
which bun
bun --version
pnpm --filter @openwork/desktop exec tauri --version
```
### Install
```bash
pnpm install
```
OpenWork now lives in `apps/app` (UI) and `apps/desktop` (desktop shell).
### Run (Desktop)
```bash
pnpm dev
```
`pnpm dev` now enables `OPENWORK_DEV_MODE=1` automatically, so desktop dev uses an isolated OpenCode state instead of your personal global config/auth/data.
### Run (Web UI only)
```bash
pnpm dev:ui
```
All repo `dev` entrypoints now opt into the same dev-mode isolation so local testing uses the OpenWork-managed OpenCode state consistently.
### Arch Users:
```bash
sudo pacman -S --needed webkit2gtk-4.1
yay -s opencode # Releases version
```
## Architecture (high-level)
- In **Host mode**, OpenWork runs a local host stack and connects the UI to it.
- Default runtime: `openwork` (installed from `openwork-orchestrator`), which orchestrates `opencode`, `openwork-server`, and optionally `opencode-router`.
- Fallback runtime: `direct`, where the desktop app spawns `opencode serve --hostname 127.0.0.1 --port <free-port>` directly.
When you select a project folder, OpenWork runs the host stack locally using that folder and connects the desktop UI.
This lets you run agentic workflows, send prompts, and see progress entirely on your machine without a remote server.
- The UI uses `@opencode-ai/sdk/v2/client` to:
- connect to the server
- list/create sessions
- send prompts
- subscribe to SSE events(Server-Sent Events are used to stream real-time updates from the server to the UI.)
- read todos and permission requests
## Folder Picker
The folder picker uses the Tauri dialog plugin.
Capability permissions are defined in:
- `apps/desktop/src-tauri/capabilities/default.json`
## OpenPackage Notes
If `opkg` is not installed globally, OpenWork falls back to:
```bash
pnpm dlx opkg install <package>
```
## OpenCode Plugins
Plugins are the **native** way to extend OpenCode. OpenWork now manages them from the Skills tab by
reading and writing `opencode.json`.
- **Project scope**: `<workspace>/opencode.json`
- **Global scope**: `~/.config/opencode/opencode.json` (or `$XDG_CONFIG_HOME/opencode/opencode.json`)
You can still edit `opencode.json` manually; OpenWork uses the same format as the OpenCode CLI:
```json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-wakatime"]
}
```
## Useful Commands
```bash
pnpm dev
pnpm dev:ui
pnpm typecheck
pnpm build
pnpm build:ui
pnpm test:e2e
```
## Troubleshooting
### Linux / Wayland (Hyprland)
If OpenWork crashes on launch with WebKitGTK errors like `Failed to create GBM buffer`, disable dmabuf or compositing before launch. Try one of the following environment flags.
```bash
WEBKIT_DISABLE_DMABUF_RENDERER=1 openwork
```
```bash
WEBKIT_DISABLE_COMPOSITING_MODE=1 openwork
```
## Security Notes
- OpenWork hides model reasoning and sensitive tool metadata by default.
- Host mode binds to `127.0.0.1` by default.
## Contributing
- Review `AGENTS.md` plus `VISION.md`, `PRINCIPLES.md`, `PRODUCT.md`, and `ARCHITECTURE.md` to understand the product goals before making changes.
- Ensure Node.js, `pnpm`, the Rust toolchain, and `opencode` are installed before working inside the repo.
- Run `pnpm install` once per checkout, then verify your change with `pnpm typecheck` plus `pnpm test:e2e` (or the targeted subset of scripts) before opening a PR.
- Use `.github/pull_request_template.md` when opening PRs and include exact commands, outcomes, manual verification steps, and evidence.
- If CI fails, classify failures in the PR body as either code-related regressions or external/environment/auth blockers.
- Add new PRDs to `apps/app/pr/<name>.md` following the `.opencode/skills/prd-conventions/SKILL.md` conventions described in `AGENTS.md`.
Community docs:
- `CODE_OF_CONDUCT.md`
- `SECURITY.md`
- `SUPPORT.md`
- `TRIAGE.md`
First contribution checklist:
- [ ] Run `pnpm install` and baseline verification commands.
- [ ] Confirm your change has a clear issue link and scope.
- [ ] Add/update tests for behavioral changes.
- [ ] Include commands run and outcomes in your PR.
- [ ] Add screenshots/video for user-facing flow changes.
## For Teams & Businesses
Interested in using OpenWork in your organization? We'd love to hear from you — reach out at [ben@openworklabs.com](mailto:ben@openworklabs.com) to chat about your use case.
## License
MIT — see `LICENSE`.