mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 09:01:17 +00:00
chore: update readme (#98)
This commit is contained in:
parent
c0800e1a43
commit
dc2a2b1687
19 changed files with 379 additions and 136 deletions
17
gigacode/Cargo.toml
Normal file
17
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
|
||||
97
gigacode/README.md
Normal file
97
gigacode/README.md
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
<p align="center">
|
||||
<img src="../.github/media/gigacode-header.jpeg" alt="Gigacode. Use OpenCode's UI with any coding agent." />
|
||||
</p>
|
||||
|
||||
<h3 align="center">Supports Claude Code, Codex, and Amp.</h3>
|
||||
|
||||
<p align="center">
|
||||
<i>This is <u>not</u> a fork (and never will be).<br/>It's powered by <a href="https://sandboxagent.dev">Sandbox Agent SDK</a>'s wizardry.<br/>Experimental & just for fun.</i>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/rivet-dev/sandbox-agent/issues">Issues</a> — <a href="https://rivet.dev/discord">Discord</a> — <a href="https://sandboxagent.dev/docs/opencode-compatibility#endpoint-coverage">Supported OpenCode Features</a>
|
||||
</p>
|
||||
|
||||
|
||||
## 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/docs/opencode-compatibility) so OpenCode can talk to any agent
|
||||
- OpenCode connects to Sandbox Agent SDK via [`attach`](https://opencode.ai/docs/cli/#attach)
|
||||
|
||||
## OpenCode Models vs Gigacode Agents
|
||||
|
||||
- **OpenCode** supports **switching between inference providers** (Anthropic, OpenAI, etc.). This is OpenCode talking directly to the models with its own tools, system prompts, and agentic loop.
|
||||
- **Gigacode** automates other coding agent harnesses, so it's using the **exact same logic that you would if you ran Claude Code**, Codex, or Amp natively.
|
||||
|
||||
```
|
||||
OpenCode (native): Model → OpenCode's tool loop → result
|
||||
Gigacode: Model → Claude Code / Codex / Amp CLI → result
|
||||
```
|
||||
|
||||
This means you get each agent's specialized capabilities (such as Claude Code's `Read`/`Write`/`Bash` tools, Codex's sandboxed execution, and Amp's permission rules) rather than a single tool loop with different models behind it.
|
||||
|
||||
## 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/docs/opencode-compatibility) to control any coding agent from the browser.
|
||||
|
||||
**OpenCode SDK**
|
||||
|
||||
Use the [`@opencode-ai/sdk`](https://sandboxagent.dev/docs/opencode-compatibility) to programmatically control any coding agent.
|
||||
28
gigacode/src/main.rs
Normal file
28
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