240 lines
8.6 KiB
Markdown
240 lines
8.6 KiB
Markdown
# Codeg
|
|
|
|
[](https://github.com/xintaofei/codeg/releases)
|
|
[](./LICENSE)
|
|
[](https://tauri.app/)
|
|
[](https://nextjs.org/)
|
|
[](./Dockerfile)
|
|
|
|
<p>
|
|
<strong>English</strong> |
|
|
<a href="./docs/readme/README.zh-CN.md">简体中文</a> |
|
|
<a href="./docs/readme/README.zh-TW.md">繁體中文</a> |
|
|
<a href="./docs/readme/README.ja.md">日本語</a> |
|
|
<a href="./docs/readme/README.ko.md">한국어</a> |
|
|
<a href="./docs/readme/README.es.md">Español</a> |
|
|
<a href="./docs/readme/README.de.md">Deutsch</a> |
|
|
<a href="./docs/readme/README.fr.md">Français</a> |
|
|
<a href="./docs/readme/README.pt.md">Português</a> |
|
|
<a href="./docs/readme/README.ar.md">العربية</a>
|
|
</p>
|
|
|
|
Codeg (Code Generation) is an enterprise-grade multi-agent coding workspace.
|
|
It unifies local AI coding agents (Claude Code, Codex CLI, OpenCode, Gemini CLI,
|
|
OpenClaw, Cline, etc.) in a desktop app and web service — enabling remote development from
|
|
any browser — with session aggregation, parallel `git worktree` development,
|
|
MCP/Skills management, and integrated Git/file/terminal workflows.
|
|
|
|
## Main Interface
|
|

|
|

|
|
|
|
## Session tile display
|
|

|
|

|
|
|
|
## Settings
|
|
| Agents | MCP | Skills | Version Control | Web Service |
|
|
| :---: | :---: | :---: | :---: | :---: |
|
|
|   |   |   |   |   |
|
|
|
|
## Highlights
|
|
|
|
- Unified multi-agent workspace in the same project
|
|
- Local session ingestion with structured rendering
|
|
- Parallel development with built-in `git worktree` flows
|
|
- **Project Boot** — visually scaffold new projects with live preview
|
|
- MCP management (local scan + registry search/install)
|
|
- Skills management (global and project scope)
|
|
- Git remote account management (GitHub and other Git servers)
|
|
- Web service mode — access Codeg from any browser for remote work
|
|
- **Standalone server deployment** — run `codeg-server` on any Linux/macOS server, access via browser
|
|
- **Docker support** — deploy with `docker compose up` for zero-config server setup
|
|
- Integrated engineering loop (file tree, diff, git changes, commit, terminal)
|
|
|
|
## Project Boot
|
|
|
|
Create new projects visually with a split-pane interface: configure on the left, preview in real time on the right.
|
|
|
|

|
|

|
|
|
|
### What it does
|
|
|
|
- **Visual Configuration** — pick style, color theme, icon library, font, border radius, and more from dropdowns; the preview iframe updates instantly
|
|
- **Live Preview** — see your chosen look & feel rendered in real time before creating anything
|
|
- **One-Click Scaffolding** — hit "Create Project" and the launcher runs `shadcn init` with your preset, framework template (Next.js / Vite / React Router / Astro / Laravel), and package manager of choice (pnpm / npm / yarn / bun)
|
|
- **Package Manager Detection** — automatically checks which package managers are installed and shows their versions
|
|
- **Seamless Integration** — the newly created project opens in Codeg's workspace right away
|
|
|
|
Currently supports **shadcn/ui** project scaffolding, with a tab-based design ready for more project types in the future.
|
|
|
|
## Supported Scope
|
|
|
|
### 1) Session Ingestion (historical sessions)
|
|
|
|
| Agent | Environment Variable Path | macOS / Linux Default | Windows Default |
|
|
| --- | --- | --- | --- |
|
|
| Claude Code | `$CLAUDE_CONFIG_DIR/projects` | `~/.claude/projects` | `%USERPROFILE%\\.claude\\projects` |
|
|
| Codex CLI | `$CODEX_HOME/sessions` | `~/.codex/sessions` | `%USERPROFILE%\\.codex\\sessions` |
|
|
| OpenCode | `$XDG_DATA_HOME/opencode/opencode.db` | `~/.local/share/opencode/opencode.db` | `%USERPROFILE%\\.local\\share\\opencode\\opencode.db` |
|
|
| Gemini CLI | `$GEMINI_CLI_HOME/.gemini` | `~/.gemini` | `%USERPROFILE%\\.gemini` |
|
|
| OpenClaw | — | `~/.openclaw/agents` | `%USERPROFILE%\\.openclaw\\agents` |
|
|
| Cline | `$CLINE_DIR` | `~/.cline/data/tasks` | `%USERPROFILE%\\.cline\\data\\tasks` |
|
|
|
|
> Note: environment variables take precedence over fallback paths.
|
|
|
|
### 2) ACP real-time sessions
|
|
|
|
Currently supports 6 agents: Claude Code, Codex CLI, Gemini CLI, OpenCode, OpenClaw, and Cline.
|
|
|
|
### 3) Skills settings support
|
|
|
|
- Supported: `Claude Code / Codex / OpenCode / Gemini CLI / OpenClaw / Cline`
|
|
- More adapters will be added incrementally
|
|
|
|
### 4) MCP target apps
|
|
|
|
Current writable targets:
|
|
|
|
- Claude Code
|
|
- Codex
|
|
- OpenCode
|
|
|
|
## Quick Start
|
|
|
|
### Requirements
|
|
|
|
- Node.js `>=22` (recommended)
|
|
- pnpm `>=10`
|
|
- Rust stable (2021 edition)
|
|
- Tauri 2 build dependencies (desktop mode only)
|
|
|
|
Linux (Debian/Ubuntu) example:
|
|
|
|
```bash
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
libwebkit2gtk-4.1-dev \
|
|
libayatana-appindicator3-dev \
|
|
librsvg2-dev \
|
|
patchelf
|
|
```
|
|
|
|
### Development
|
|
|
|
```bash
|
|
pnpm install
|
|
|
|
# Frontend static export to out/
|
|
pnpm build
|
|
|
|
# Full desktop app (Tauri + Next.js)
|
|
pnpm tauri dev
|
|
|
|
# Frontend only
|
|
pnpm dev
|
|
|
|
# Desktop build
|
|
pnpm tauri build
|
|
|
|
# Standalone server (no Tauri/GUI required)
|
|
pnpm server:dev
|
|
|
|
# Build server release binary
|
|
pnpm server:build
|
|
|
|
# Lint
|
|
pnpm eslint .
|
|
|
|
# Rust checks (run in src-tauri/)
|
|
cargo check
|
|
cargo clippy
|
|
cargo build
|
|
```
|
|
|
|
### Server Deployment
|
|
|
|
Codeg can run as a standalone web server without a desktop environment.
|
|
|
|
#### Option 1: Direct binary
|
|
|
|
```bash
|
|
# Build the server binary
|
|
cd src-tauri
|
|
cargo build --release --bin codeg-server --no-default-features
|
|
|
|
# Run it
|
|
CODEG_PORT=3080 CODEG_STATIC_DIR=../out ./target/release/codeg-server
|
|
```
|
|
|
|
Environment variables:
|
|
|
|
| Variable | Default | Description |
|
|
| --- | --- | --- |
|
|
| `CODEG_PORT` | `3080` | HTTP port |
|
|
| `CODEG_HOST` | `0.0.0.0` | Bind address |
|
|
| `CODEG_TOKEN` | *(random)* | Auth token (printed to stderr on start) |
|
|
| `CODEG_DATA_DIR` | `~/.local/share/codeg` | SQLite database directory |
|
|
| `CODEG_STATIC_DIR` | `./web` or `./out` | Next.js static export directory |
|
|
|
|
#### Option 2: Docker
|
|
|
|
```bash
|
|
# Build and run
|
|
docker compose up -d
|
|
|
|
# Or build manually
|
|
docker build -t codeg .
|
|
docker run -p 3080:3080 -v codeg-data:/data codeg
|
|
```
|
|
|
|
## Architecture
|
|
|
|
```text
|
|
Next.js 16 (Static Export) + React 19
|
|
|
|
|
| invoke() (desktop) / fetch() + WebSocket (web)
|
|
v
|
|
┌─────────────────────────┐
|
|
│ Transport Abstraction │
|
|
│ (Tauri IPC or HTTP/WS) │
|
|
└─────────────────────────┘
|
|
|
|
|
v
|
|
┌─── Tauri Desktop ───┐ ┌─── codeg-server ───┐
|
|
│ Tauri 2 Commands │ │ Axum HTTP + WS │
|
|
│ (window management) │ │ (standalone mode) │
|
|
└──────────┬───────────┘ └──────────┬──────────┘
|
|
└──────────┬───────────────┘
|
|
v
|
|
Shared Rust Core
|
|
|- AppState
|
|
|- ACP Manager
|
|
|- Parsers (session ingestion)
|
|
|- Git / File Tree / Terminal
|
|
|- MCP marketplace + config
|
|
|- SeaORM + SQLite
|
|
|
|
|
v
|
|
Local Filesystem / Git Repos
|
|
```
|
|
|
|
## Constraints
|
|
|
|
- Frontend uses static export (`output: "export"`)
|
|
- No Next.js dynamic routes (`[param]`); use query params instead
|
|
- Tauri command params: frontend `camelCase`, Rust `snake_case`
|
|
- TypeScript strict mode
|
|
|
|
## Privacy & Security
|
|
|
|
- Local-first by default for parsing, storage, and project operations
|
|
- Network access happens only on user-triggered actions
|
|
- System proxy support for enterprise environments
|
|
- Web service mode uses token-based authentication
|
|
|
|
## License
|
|
|
|
Apache-2.0. See `LICENSE`.
|