Florian BRUNIAUX
0fc06f9509
feat: add shared utils module for JS stack commands
...
Add utils.rs with common utilities used across modern JavaScript
tooling commands:
- truncate(): Smart string truncation with ellipsis
- strip_ansi(): Remove ANSI escape codes from output
- execute_command(): Centralized command execution with error handling
These utilities enable consistent output formatting and filtering
across multiple command modules.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-01-29 11:23:26 +01:00
patrick szymkowiak
52b4ed3ea0
Merge pull request #8 from FlorianBruniaux/docs/installation-guide
...
Add installation guide for AI coding assistants
2026-01-28 23:15:54 +01:00
patrick szymkowiak
542eca5783
Merge branch 'master' into docs/installation-guide
2026-01-28 23:15:24 +01:00
patrick szymkowiak
09b939040d
Merge pull request #1 from pszymkowiak/feature/v0.2.1
...
Release v0.2.1
v0.2.1
2026-01-28 23:07:28 +01:00
Patrick szymkowiak
50f501c92a
adding benchmark
2026-01-28 23:03:49 +01:00
Patrick szymkowiak
d30b3e2fd0
correcting ls bug
...
adding benchmark script for local performance monitoring in dev
2026-01-28 23:03:36 +01:00
Patrick szymkowiak
4b6887906f
adding in readme exemple of multiple days sessions
2026-01-28 22:54:51 +01:00
Patrick szymkowiak
97ed27ad12
feat: add chaining instructions to init command
2026-01-28 22:54:51 +01:00
Patrick szymkowiak
bd61f6db50
chore: bump version to 0.2.1 and trigger release on master push
2026-01-28 22:54:51 +01:00
patrick szymkowiak
5f7adc98ed
Merge pull request #7 from FlorianBruniaux/feat/vitest-support
...
Add Vitest test runner support with 99.6% token reduction
2026-01-28 22:43:04 +01:00
patrick szymkowiak
e574b6df3a
Merge pull request #6 from FlorianBruniaux/feat/pnpm-support
...
feat: add pnpm support + fix git argument parsing for modern stacks
2026-01-28 22:38:10 +01:00
Florian BRUNIAUX
da5233f85c
docs: add installation guide for AI coding assistants
...
- Add INSTALL.md with step-by-step installation instructions
- Mandatory pre-installation verification check (rtk --version)
- Troubleshooting section for common issues
- Production-validated token savings metrics (anonymized)
- AI assistant integration checklist
- Fork vs upstream installation strategy
2026-01-28 17:00:50 +01:00
Florian BRUNIAUX
0e5b690947
docs: add fork features section with Vitest metrics to README
...
- Add comprehensive Fork Features section
- Document git argument parsing fix
- Add pnpm support with token savings table
- Add Vitest support with validated metrics (99.6% reduction)
- Include installation instructions for fork
- Metrics validated on production Méthode Aristote codebase
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-01-28 16:41:23 +01:00
Florian BRUNIAUX
fc1ed38f40
fix(vitest): improve parser to handle real Vitest output format
...
- Update regex patterns to match 'X failed | Y passed' format
- Fix duration parsing to handle decimal seconds (3.05s)
- Tested on production Méthode Aristote codebase
- Validated: 99.6% token reduction (102,199 → 377 chars)
- Add comprehensive ROADMAP.md for project evolution
Test results:
- ✅ 2/2 failures detected accurately
- ✅ Error context preserved (line numbers + code)
- ✅ Timing information included
- ⚠️ Pass count approximately accurate (±1 tolerance)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-01-28 16:38:29 +01:00
Florian BRUNIAUX
62c9b19689
feat(vitest): add module with ANSI stripping and test filtering
...
- Add vitest_cmd.rs module (315 LOC) with:
- ANSI escape sequence stripping
- Test statistics parsing (pass/fail counts)
- Failure detail extraction
- 90% token reduction filtering
- Integrate VitestCommands enum in main.rs CLI
- Add comprehensive unit tests (6 test cases)
- Add CLAUDE.md project documentation
Target: rtk vitest run → PASS (n) FAIL (n) + failures + timing
Achieves ~90% token reduction (10.5K → 1K chars)
2026-01-28 15:48:44 +01:00
Florian BRUNIAUX
be4cd591a2
merge: combine git argument parsing fix with pnpm support
2026-01-28 15:35:23 +01:00
Florian BRUNIAUX
9ff4c56f2a
docs: add fork improvements section to README
...
Documents 3 upstream PRs (git fix, pnpm support, issues) with:
- Before/after examples
- Token savings metrics
- Production testing notes
- Security improvements
- Installation instructions
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-01-28 15:18:37 +01:00
Florian BRUNIAUX
f87be329b5
fix: add security validation and error handling to pnpm
...
Based on code review feedback:
- Add package name validation (prevent command injection)
- Fix error propagation (return Err instead of Ok on failures)
- Add comprehensive tests for validation
Security improvements:
- Validate package names against npm rules (alphanumeric + @/-/_/.)
- Reject path traversal attempts (..)
- Reject shell metacharacters and excessive length (>214 chars)
- Tests cover injection attempts like "lodash; rm -rf /"
Error handling:
- pnpm failures now return proper errors (fixes CI/CD false positives)
- Error messages include pnpm's stderr for debugging
Testing:
- 4 new tests for package name validation (valid + invalid cases)
- Existing filter tests preserved
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-01-28 15:14:44 +01:00
Florian BRUNIAUX
d3b7301e21
fix: improve error handling and merge commit detection
...
Based on code review feedback:
- Detect --merges flag and skip --no-merges injection
- Propagate git exit codes properly (fixes CI/CD reliability)
- Allows users to see merge commits when explicitly requested
Changes:
- run_log: Check for --merges/--min-parents=2 before adding --no-merges
- run_log + run_diff: Use std::process::exit() to propagate git failures
- Exit codes now match git's behavior (128 for errors, 1 for failures)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-01-28 15:10:25 +01:00
Florian BRUNIAUX
681729d205
feat: add pnpm support (list, outdated, install)
...
Adds ultra-compact output for pnpm commands to support modern
JavaScript stacks (T3 Stack, Turborepo, Nx).
Commands added:
- rtk pnpm list --depth=0 (filter box-drawing, keep packages)
- rtk pnpm outdated (extract upgrades: "pkg: old → new")
- rtk pnpm install <pkg> (filter progress bars, keep summary)
Implementation:
- New module: src/pnpm_cmd.rs
- Filters: box-drawing chars, legend, metadata, progress bars
- Output format: "package: current → latest" for upgrades
- Testing: Verified on production T3 Stack codebase (Méthode Aristote)
Market impact:
- pnpm = 40% of npm downloads (rising rapidly)
- T3 Stack = dominant Next.js starter
- Reduction: 80-90% for outdated, ~70% for list (depth >0)
Related: Issue #3
Test cases verified:
- rtk pnpm list --depth=0 ✓
- rtk pnpm outdated ✓ (shows "All packages up-to-date ✓")
- Unit tests for filter functions ✓
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-01-28 14:55:19 +01:00
Florian BRUNIAUX
93f9fbedb4
fix: pass git flags transparently to git command
...
Fixes argument parsing bug where git flags like --oneline, --graph,
--stat were intercepted by clap instead of being passed to git.
Changes:
- Remove RTK-specific flags (count, max_lines) from GitCommands
- Use trailing_var_arg + allow_hyphen_values for all git subcommands
- Pass all arguments directly to git, preserving user intent
- Maintain RTK defaults only when user doesn't specify format
Closes #2
Test cases verified:
- rtk git log --oneline -20 ✓
- rtk git log --graph --all ✓
- rtk git diff --stat HEAD~1 ✓
- rtk git log --pretty=format:"%h" ✓
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-01-28 14:48:09 +01:00
Patrick szymkowiak
7548f67b1d
chore: remove demo section from README
2026-01-23 16:52:30 +01:00
Patrick szymkowiak
561446254e
chore: disable homebrew step for now
2026-01-23 15:41:48 +01:00
Patrick szymkowiak
964601f710
fix: correct install.sh URL (master not main)
2026-01-23 15:33:54 +01:00
Patrick szymkowiak
49b50c8f99
docs: add deb/rpm install commands
2026-01-23 14:24:58 +01:00
Patrick szymkowiak
1b762318e7
docs: update to v0.2.0, add install instructions and gain command
2026-01-23 14:23:26 +01:00
Patrick szymkowiak
2d40c7c02d
fix: correct rust-toolchain action and macos runner
2026-01-23 14:16:12 +01:00
Patrick szymkowiak
f8c9a8165f
feat: add SQLite tracking, gain command, and CI/CD
...
- Add SQLite tracking for all commands (90-day history)
- Add rtk gain command with ASCII graph visualization
- Add config.rs for TOML configuration support
- Integrate tracking in all command modules
- Add CI/CD workflow for multi-platform releases (deb, rpm, win, mac)
- Add LICENSE file and improve .gitignore
2026-01-23 14:02:10 +01:00
Patrick szymkowiak
26796da96a
feat: add wget command for compact download output
2026-01-23 11:31:43 +01:00
Patrick szymkowiak
5ed6799117
feat: ultra-compact kubectl output (summary only, show issues)
2026-01-23 09:13:38 +01:00
Patrick szymkowiak
06816b3685
feat: add -A flag to kubectl pods/services for all namespaces
2026-01-23 09:09:12 +01:00
Patrick szymkowiak
5932ba1d66
docs: add README with token savings analysis and asciinema demo
2026-01-23 07:49:17 +01:00
Patrick szymkowiak
1f1576a657
fix: show full error output on git command failures
2026-01-23 07:28:59 +01:00
Patrick szymkowiak
ed9a0c5c57
v0.1.7: Add git add/commit/push/pull + grep with minimal output
2026-01-23 07:27:35 +01:00
Patrick szymkowiak
de17768543
v0.6.0: Add rtk grep - compact search results
...
Features:
- Strips leading/trailing whitespace
- Groups results by file with counts
- Truncates long lines (keeps match visible)
- Shows compact file paths
- -c flag for context-only (just the match)
- -l flag for max line length
Example: rtk grep "pattern" src/ -l 60
Total: 17 commands
2026-01-23 07:23:37 +01:00
Patrick szymkowiak
0eed484994
v0.5.0: Add rtk init command for CLAUDE.md setup
...
New command:
- rtk init # Add rtk instructions to local ./CLAUDE.md
- rtk init --global # Add rtk instructions to global ~/CLAUDE.md
- rtk init --show # Show current rtk configuration
Total: 16 commands
2026-01-22 21:03:54 +01:00
Patrick szymkowiak
d6ac7815ca
v0.4.0: Add 5 new commands (find, diff, log, docker/kubectl, summary)
...
New commands:
- rtk find <pattern> - Compact find/glob results grouped by directory
- rtk diff <f1> <f2> - Ultra-condensed diff (only changed lines)
- rtk log [file] - Deduplicated log filter (errors ×N)
- rtk docker ps/images/logs - Compact Docker output
- rtk kubectl pods/services/logs - Compact Kubernetes output
- rtk summary <cmd> - Heuristic summary of command output
Total: 15 commands for token optimization
2026-01-22 21:01:43 +01:00
Patrick szymkowiak
a0128e38cd
v0.3.0: Add 6 new token-saving commands
...
New commands:
- rtk git (diff/log/status) - Compact git output
- rtk test <cmd> - Run tests, show only failures
- rtk err <cmd> - Run command, filter errors/warnings
- rtk json <file> - Show JSON structure without values
- rtk deps - Summarize project dependencies
- rtk env - Filtered environment variables (masks secrets)
2026-01-22 20:19:54 +01:00
Patrick szymkowiak
2f2e2bfaeb
v0.2.0: Replace LLM with fast heuristic analyzer
...
- Remove candle, tokenizers, hf-hub dependencies (50MB -> 1.8MB binary)
- rtk smart now uses regex-based code analysis (instant, no token needed)
- Detects: imports, functions, structs, traits, design patterns
- Compile time: 1m30s -> 16s
2026-01-22 18:15:34 +01:00
Patrick szymkowiak
daab79cca4
Initial commit: rtk (Rust Token Killer) v0.1.0
...
High-performance CLI proxy to minimize LLM token consumption:
- rtk ls: Token-optimized directory tree (filters .git, node_modules, etc.)
- rtk read: Intelligent code filtering (minimal/aggressive modes)
- rtk smart: Local LLM summaries via candle-core (Llama-3.2-1B)
Includes CI/CD (GitHub Actions), Homebrew formula, and install script.
2026-01-22 18:10:30 +01:00