mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-18 21:00:49 +00:00
feat: gigacode
This commit is contained in:
parent
0a73d1d8e8
commit
8663f5070c
40 changed files with 2736 additions and 1327 deletions
17
server/packages/gigacode/Cargo.toml
Normal file
17
server/packages/gigacode/Cargo.toml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
[package]
|
||||
name = "gigacode"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
authors.workspace = true
|
||||
license.workspace = true
|
||||
description = "Sandbox Agent CLI with OpenCode attach by default"
|
||||
repository.workspace = true
|
||||
|
||||
[[bin]]
|
||||
name = "gigacode"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
clap.workspace = true
|
||||
sandbox-agent.workspace = true
|
||||
tracing.workspace = true
|
||||
80
server/packages/gigacode/README.md
Normal file
80
server/packages/gigacode/README.md
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
# GigaCode
|
||||
|
||||
Use [OpenCode](https://opencode.ai)'s UI with any coding agent.
|
||||
|
||||
Supports Claude Code, Codex, and Amp.
|
||||
|
||||
This is __not__ a fork. It's powered by [Sandbox Agent SDK](https://sandboxagent.dev)'s wizardry.
|
||||
|
||||
> **Experimental**: This project is under active development. Please report bugs on [GitHub Issues](https://github.com/rivet-dev/sandbox-agent/issues) or join our [Discord](https://rivet.dev/discord).
|
||||
|
||||
## How It Works
|
||||
|
||||
```
|
||||
┌─ GigaCode ────────────────────────────────────────────────────────┐
|
||||
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
|
||||
│ │ OpenCode TUI │───▶│ Sandbox Agent │───▶│ Claude Code / │ │
|
||||
│ │ │ │ │ │ Codex / Amp │ │
|
||||
│ └─────────────────┘ └─────────────────┘ └─────────────────┘ │
|
||||
└───────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
- [Sandbox Agent SDK](https://sandboxagent.dev) provides a universal HTTP API for controlling Claude Code, Codex, and Amp
|
||||
- Sandbox Agent SDK exposes an [OpenCode-compatible endpoint](https://sandboxagent.dev/opencode-compatibility) so OpenCode can talk to any agent
|
||||
- OpenCode connects to Sandbox Agent SDK via [`attach`](https://opencode.ai/docs/cli/#attach)
|
||||
|
||||
## Install
|
||||
|
||||
**macOS / Linux / WSL (Recommended)**
|
||||
|
||||
```bash
|
||||
curl -fsSL https://releases.rivet.dev/sandbox-agent/latest/gigacode-install.sh | sh
|
||||
```
|
||||
|
||||
**npm i -g**
|
||||
|
||||
```bash
|
||||
npm install -g gigacode
|
||||
gigacode --help
|
||||
```
|
||||
|
||||
**bun add -g**
|
||||
|
||||
```bash
|
||||
bun add -g gigacode
|
||||
# Allow Bun to run postinstall scripts for native binaries.
|
||||
bun pm -g trust gigacode-linux-x64 gigacode-linux-arm64 gigacode-darwin-arm64 gigacode-darwin-x64 gigacode-win32-x64
|
||||
gigacode --help
|
||||
```
|
||||
|
||||
**npx**
|
||||
|
||||
```bash
|
||||
npx gigacode --help
|
||||
```
|
||||
|
||||
**bunx**
|
||||
|
||||
```bash
|
||||
bunx gigacode --help
|
||||
```
|
||||
|
||||
> **Note:** Windows is unsupported. Please use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install).
|
||||
|
||||
## Usage
|
||||
|
||||
**TUI**
|
||||
|
||||
Launch the OpenCode TUI with any coding agent:
|
||||
|
||||
```bash
|
||||
gigacode
|
||||
```
|
||||
|
||||
**Web UI**
|
||||
|
||||
Use the [OpenCode Web UI](https://sandboxagent.dev/opencode-compatibility) to control any coding agent from the browser.
|
||||
|
||||
**OpenCode SDK**
|
||||
|
||||
Use the [`@opencode-ai/sdk`](https://sandboxagent.dev/opencode-compatibility) to programmatically control any coding agent.
|
||||
28
server/packages/gigacode/src/main.rs
Normal file
28
server/packages/gigacode/src/main.rs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
use clap::Parser;
|
||||
use sandbox_agent::cli::{
|
||||
CliConfig, CliError, Command, GigacodeCli, OpencodeArgs, init_logging, run_command,
|
||||
};
|
||||
|
||||
fn main() {
|
||||
if let Err(err) = run() {
|
||||
tracing::error!(error = %err, "gigacode failed");
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
fn run() -> Result<(), CliError> {
|
||||
let cli = GigacodeCli::parse();
|
||||
let config = CliConfig {
|
||||
token: cli.token,
|
||||
no_token: cli.no_token,
|
||||
gigacode: true,
|
||||
};
|
||||
let command = cli
|
||||
.command
|
||||
.unwrap_or_else(|| Command::Opencode(OpencodeArgs::default()));
|
||||
if let Err(err) = init_logging(&command) {
|
||||
eprintln!("failed to init logging: {err}");
|
||||
return Err(err);
|
||||
}
|
||||
run_command(&command, &config)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue