# DSCC

**DSCC** (DS Claw Code) is a local coding-agent CLI written in safe Rust. It forks the clean-room Claw Code implementation and re-brands the project while preserving wire-compatibility with the Anthropic Messages API and OpenAI-compatible providers. DSCC is **not** a port or copy of Claude Code; it is a re-branded continuation of a clean-room Rust agent.

The `dscc` binary provides interactive sessions, one-shot prompts, workspace-aware tools, local agent workflows, and plugin-capable operation from a single workspace.

## Current status

- **Version:** `0.1.0`
- **Release stage:** initial public release from the `oMygpt/dscc` source tree
- **Primary implementation:** Rust workspace in this repository
- **Platform focus:** macOS, Linux, and Windows developer workstations (release CI covers all three)

## Install, build, and run

### Prerequisites

- Rust stable toolchain
- Cargo
- Provider credentials for the model you want to use

### Model selection (required)

DSCC has **no hard-coded default model**. You must pick one of:

1. `--model <id>` on the command line, or
2. `export DSCC_MODEL=<id>` in the environment.

Missing both produces a bilingual error and exits. Typical values: `claude-opus-4-6`, `claude-sonnet-4-6`, `grok-4`, or any provider-compatible identifier.

### Authentication

Anthropic-compatible models (default protocol layer):

```bash
export ANTHROPIC_API_KEY="..."
# Optional when routing through a compatible endpoint
export ANTHROPIC_BASE_URL="https://api.anthropic.com"
```

xAI / Grok models:

```bash
export XAI_API_KEY="..."
export XAI_BASE_URL="https://api.x.ai/v1"   # optional
```

Generic OpenAI-compatible providers (e.g. doubao/ARK, OpenAI itself, DeepSeek aliases that you want to route manually):

```bash
export DSCC_API_KEY="..."
export DSCC_BASE_URL="https://ark.cn-beijing.volces.com/api/v3"
# then pass the provider-specific model id
dscc --model doubao-seed-1-6-250615 "summarize this workspace"
```

OAuth login is also available when the upstream OAuth service is reachable:

```bash
cargo run --bin dscc -- login
```

### Install locally

```bash
cargo install --path crates/dscc-cli --locked
```

### Build from source

```bash
cargo build --release -p dscc-cli
```

### Run

From the workspace:

```bash
cargo run --bin dscc -- --help
cargo run --bin dscc -- --model claude-opus-4-6
cargo run --bin dscc -- --model claude-sonnet-4-6 prompt "summarize this workspace"
```

From the release build:

```bash
./target/release/dscc --model claude-opus-4-6
./target/release/dscc --model claude-sonnet-4-6 prompt "explain crates/runtime"
```

## Supported capabilities

- Interactive REPL and one-shot prompt execution
- Saved-session inspection and resume flows
- Built-in workspace tools for shell, file read/write/edit, search, web fetch/search, todos, and notebook updates
- Slash commands for status, compaction, config inspection, diff, export, session management, and version reporting
- Local agent and skill discovery with `dscc agents` and `dscc skills`
- Plugin discovery and management through the CLI and slash-command surfaces
- OAuth login/logout plus model/provider selection from the command line
- Workspace-aware instruction/config loading (`DSCC.md`, `.dscc.json`, `.dscc/settings.json`, permissions, plugin settings)

## Current limitations

- Public distribution is source-build plus multi-platform release artifacts; crates.io publishing is not set up
- Some live-provider integration coverage is opt-in because it requires external credentials and network access
- The command surface may continue to evolve during the `0.x` series

## Implementation

The Rust workspace is the active product implementation. It currently includes these crates:

- `dscc-cli` — user-facing `dscc` binary
- `api` — provider clients and streaming (Anthropic protocol + OpenAI-compatible fanout)
- `runtime` — sessions, config, permissions, prompts, and runtime loop
- `tools` — built-in tool implementations
- `commands` — slash-command registry and handlers
- `plugins` — plugin discovery, registry, and lifecycle support
- `lsp` — language-server protocol support types and process helpers
- `server` and `compat-harness` — supporting services and compatibility tooling

## Release notes

- Draft 0.1.0 release notes: [`docs/releases/0.1.0.md`](docs/releases/0.1.0.md)

## License

DSCC is dual-licensed:

- **Open source:** AGPL-3.0-only — see [`LICENSE`](LICENSE)
- **Commercial:** contact the maintainers for a proprietary license if AGPL-3.0 does not fit your distribution model — see [`LICENSE-COMMERCIAL.md`](LICENSE-COMMERCIAL.md)

Commercial inquiries are coordinated through GitHub Issues on `oMygpt/dscc`.
