Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .cspell/words.txt
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
anthropic
anthropics
anyhow
claudemd
clippy
Expand All@@ -15,6 +16,7 @@ RAII
ratatui
replacen
reqwest
rfind
rustls
serde
strum
Expand All@@ -23,3 +25,4 @@ thiserror
tokio
tracing
venv
xxhash
41 changes: 21 additions & 20 deletions CLAUDE.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,42 +7,43 @@ oxide-code is a terminal-based AI coding assistant written in Rust, inspired by
### CLI

```bash
ox # Start an interactive session
ox # Start an interactive session
```

### Project Layout

```text
.
├── crates/oxide-code/ # Main binary crate
├── docs/ # Roadmap and research notes
└── target/ # Build output
├── crates/oxide-code/ # Main binary crate
├── docs/ # Roadmap and research notes
└── target/ # Build output
```

### Crate Structure (`crates/oxide-code/src/`)

```text
.
├── client.rs # Client module root
├── client.rs # Client module root
├── client/
│ └── anthropic.rs # Anthropic Messages API streaming client
├── config.rs # Configuration loading (env vars, model, base URL)
│ ├── anthropic.rs # Anthropic Messages API streaming client
│ └── billing.rs # Billing attribution header (fingerprint, cch attestation)
├── config.rs # Configuration loading (env vars, model, base URL)
├── config/
│ └── oauth.rs # Claude Code OAuth credentials (macOS Keychain + file), token refresh, file locking
├── main.rs # CLI entry point, agent loop, async REPL
├── message.rs # Conversation message types
├── prompt.rs # System prompt builder (section assembly, static content)
│ └── oauth.rs # Claude Code OAuth credentials (macOS Keychain + file), token refresh, file locking
├── main.rs # CLI entry point, agent loop, async REPL
├── message.rs # Conversation message types
├── prompt.rs # System prompt builder (section assembly, static content)
├── prompt/
│ ├── environment.rs # Runtime environment detection (platform, git, date)
│ └── instructions.rs # Instruction file discovery and loading (CLAUDE.md, AGENTS.md)
├── tool.rs # Tool trait, registry, definitions
│ ├── environment.rs # Runtime environment detection (platform, git, date)
│ └── instructions.rs # Instruction file discovery and loading (CLAUDE.md, AGENTS.md)
├── tool.rs # Tool trait, registry, definitions
└── tool/
├── bash.rs # Shell command execution with timeout
├── edit.rs # Exact string replacement in files
├── glob.rs # File pattern matching (glob)
├── grep.rs # Content search via regex
├── read.rs # File reading with line numbers and pagination
└── write.rs # File writing with directory creation
├── bash.rs # Shell command execution with timeout
├── edit.rs # Exact string replacement in files
├── glob.rs # File pattern matching (glob)
├── grep.rs # Content search via regex
├── read.rs # File reading with line numbers and pagination
└── write.rs # File writing with directory creation
```

## Coding Conventions
Expand Down
79 changes: 79 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,6 +32,7 @@ reqwest = { version = "0.12", default-features = false, features = [
security-framework = "3"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = "0.10"
tempfile = "3"
time = { version = "0.3", features = ["local-offset"] }
tokio = { version = "1", features = [
Expand All@@ -50,6 +51,7 @@ tracing-subscriber = { version = "0.3", default-features = false, features = [
"env-filter",
"fmt",
] }
xxhash-rust = { version = "0.8", features = ["xxh64"] }

[profile.release]
lto = true
Expand Down
2 changes: 2 additions & 0 deletions crates/oxide-code/Cargo.toml
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,10 +23,12 @@ regex.workspace = true
reqwest.workspace = true
serde.workspace = true
serde_json.workspace = true
sha2.workspace = true
time.workspace = true
tokio.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
xxhash-rust.workspace = true

[target.'cfg(target_os = "macos")'.dependencies]
security-framework.workspace = true
Expand Down
1 change: 1 addition & 0 deletions crates/oxide-code/src/client.rs
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
pub mod anthropic;
mod billing;
Loading