Skip to content
Open
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: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ benchmark-report.md
*.sqlite
*.sqlite3
rtk_tracking.db
claudedocs
claudedocs
PROMPT.md
6 changes: 4 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ PYTHON ruff_cmd.rs ruff check/format 80%+ ✓
GO go_cmd.rs go test/build/vet 75-90% ✓
golangci_cmd.rs golangci-lint 85% ✓

CLOUDFLARE wrangler_cmd.rs wrangler deploy/dev 80-90% ✓

NETWORK wget_cmd.rs wget 85-95% ✓

DEPENDENCIES deps.rs deps 80-90% ✓
Expand All @@ -240,7 +242,7 @@ SHARED utils.rs Helpers N/A ✓
tee.rs Full output recovery N/A ✓
```

**Total: 48 modules** (30 command modules + 18 infrastructure modules)
**Total: 49 modules** (31 command modules + 18 infrastructure modules)

### Module Count Breakdown

Expand Down Expand Up @@ -1435,4 +1437,4 @@ When implementing a new command, consider:

**Last Updated**: 2026-02-12
**Architecture Version**: 2.1
**rtk Version**: 0.20.1
**rtk Version**: 0.21.1
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This is a fork with critical fixes for git argument parsing and modern JavaScrip

**Verify correct installation:**
```bash
rtk --version # Should show "rtk 0.20.1" (or newer)
rtk --version # Should show "rtk 0.21.1" (or newer)
rtk gain # Should show token savings stats (NOT "command not found")
```

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rtk filters and compresses command outputs before they reach your LLM context, s

**How to verify you have the correct rtk:**
```bash
rtk --version # Should show "rtk 0.20.1"
rtk --version # Should show "rtk 0.21.1"
rtk gain # Should show token savings stats
```

Expand Down
47 changes: 47 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ mod tsc_cmd;
mod utils;
mod vitest_cmd;
mod wget_cmd;
mod wrangler_cmd;

use anyhow::{Context, Result};
use clap::{Parser, Subcommand};
Expand Down Expand Up @@ -526,6 +527,12 @@ enum Commands {
#[arg(short, long, default_value = "7")]
since: u64,
},

/// Wrangler (Cloudflare Workers CLI) with compact output
Wrangler {
#[command(subcommand)]
command: WranglerCommands,
},
}

#[derive(Subcommand)]
Expand Down Expand Up @@ -841,6 +848,31 @@ enum GoCommands {
Other(Vec<OsString>),
}

#[derive(Subcommand)]
enum WranglerCommands {
/// Deploy Workers with compact output (URL + size + version)
Deploy {
/// Additional wrangler deploy arguments
#[arg(trailing_var_arg = true, allow_hyphen_values = true)]
args: Vec<String>,
},
/// Pages deploy with compact output
Pages {
/// Additional wrangler pages arguments
#[arg(trailing_var_arg = true, allow_hyphen_values = true)]
args: Vec<String>,
},
/// Dev server (passthrough with inherited I/O)
Dev {
/// Additional wrangler dev arguments
#[arg(trailing_var_arg = true, allow_hyphen_values = true)]
args: Vec<String>,
},
/// Passthrough: runs any unsupported wrangler subcommand directly
#[command(external_subcommand)]
Other(Vec<OsString>),
}

fn main() -> Result<()> {
let cli = Cli::parse();

Expand Down Expand Up @@ -1410,6 +1442,21 @@ fn main() -> Result<()> {
hook_audit_cmd::run(since, cli.verbose)?;
}

Commands::Wrangler { command } => match command {
WranglerCommands::Deploy { args } => {
wrangler_cmd::run_deploy(&args, cli.verbose)?;
}
WranglerCommands::Pages { args } => {
wrangler_cmd::run_pages(&args, cli.verbose)?;
}
WranglerCommands::Dev { args } => {
wrangler_cmd::run_dev(&args, cli.verbose)?;
}
WranglerCommands::Other(args) => {
wrangler_cmd::run_passthrough(&args, cli.verbose)?;
}
},

Commands::Proxy { args } => {
use std::process::Command;

Expand Down
Loading