Add exec_time_ms column to SQLite schema and track execution time
for all rtk commands. Display time metrics in gain summary, daily/
weekly/monthly breakdowns, and JSON/CSV exports.
Changes:
- tracking.rs: Add exec_time_ms column, TimedExecution struct
- display_helpers.rs: Add format_duration() helper, update tables
- gain.rs: Display total/avg exec time in summary and by-command
- All command modules: Apply TimedExecution timer wrapper
- Exports: Include total_time_ms and avg_time_ms in JSON/CSV
Example output:
Total exec time: 24.6s (avg 34ms)
rtk cargo test 7 -86.1% 349ms avg
rtk git status 111 -84.1% 1ms avg
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The previous PR #38 contained BREAKING CHANGE in the commit message,
which triggered an unintended major version bump to 1.0.0.
This commit:
- Updates manifest to 0.7.1
- Updates Cargo.toml to 0.7.1
After merging, close PR #39 without merging to skip the 1.0.0 release.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes#27
Tags created by GITHUB_TOKEN don't trigger other workflows. This change
makes release-please call release.yml directly via workflow_call after
creating a release.
Changes:
- release.yml: Add workflow_call trigger with tag input
- release.yml: Handle workflow_call in version detection
- release.yml: Upload assets for workflow_call events
- release-please.yml: Add build-release job that calls release.yml
- release-please.yml: update-latest-tag now waits for build to complete
This approach:
- Requires no PAT/secrets
- Keeps workflows separate and maintainable
- Uses workflow_call (cleaner than workflow_dispatch)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
BREAKING CHANGE: Removes --depth, --format (tree/flat/json) flags
Before: `rtk ls` was a reimplementation using WalkBuilder that didn't
support native ls flags like -l, -a, -h, -R.
After: `rtk ls` proxies to native ls, supporting all flags:
- `rtk ls -la` works
- `rtk ls -alh` works
- `rtk ls -R src/` works
- Default: `-la` when no args
Token optimization: filters "total X" line from output.
This aligns with rtk philosophy: proxy and filter, don't reimplement.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
rtk git push and rtk git pull now accept trailing arguments and forward
them to git. Fixes the auto-rewrite hook failing on commands like
`git push -u origin feat/branch`.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- New `rtk discover` command scans Claude Code JSONL session history to
identify missed RTK savings and suggest unhandled commands for issues.
Modular architecture: registry (RegexSet classification), provider
(SessionProvider trait + ClaudeProvider), report (text/json formatting).
- New PreToolUse auto-rewrite hook transparently intercepts Bash commands
and rewrites them to rtk equivalents before execution, ensuring 100%
adoption across all conversations including subagents.
- New `rtk git show` command with compact output: one-line commit summary
+ stat + compacted diff (reuses compact_diff from git diff).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix test_analyze_logs: use normalizable paths instead of distinct IPs
- Fix test_filter_outdated: match real pnpm outdated output format
- Fix test_filter_ansi_colors: add missing Tests line for stats parsing
- Add .claude/skills/rtk-tdd/ with Red-Green-Refactor workflow
- Add testing-patterns.md reference with untested modules backlog
- Update CLAUDE.md Testing Strategy with TDD mandate and pre-commit gate
- Add 17 tests to diff_cmd.rs (similarity, truncate, compute_diff, condense)
- Test suite: 102/105 → 122/122
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Execute curl -s, auto-detect JSON responses
- JSON output piped through filter_json_string() for schema view
- Non-JSON output truncated to 30 lines with byte count
New module: src/curl_cmd.rs with 4 unit tests
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- git branch: compact listing (current/local/remote-only)
- git fetch: "ok fetched (N new refs)" confirmation
- git stash: list/show/pop/apply/drop with compact output
- git worktree: compact listing with home dir abbreviation
4 new tests in git.rs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- cargo build: strip Compiling/Downloading lines, show errors + summary
- cargo test: show failures only + summary line
- cargo clippy: group warnings by lint rule with locations
New module: src/cargo_cmd.rs with 6 unit tests
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Make compact_diff pub(crate) in git.rs for cross-module use
- Extract filter_json_string() from json_cmd.rs for reuse
- Add ok_confirmation() to utils.rs for write operation confirmations
- Add detect_package_manager() and package_manager_exec() to utils.rs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1. CRITICAL: Fix 'latest' tag creation after releases
- Move update-latest-tag job from release.yml to release-please.yml
- release-please creates tags via API (no push event) → must run in same workflow
- Job now conditional on release_created output
2. IMPORTANT: Add npx fallback for ccusage + improve message
- Check binary in PATH first, fallback to 'npx ccusage'
- Updated message: "npm i -g ccusage (or use npx ccusage)"
- Consistent with other JS tooling (next_cmd, tsc_cmd, prettier_cmd)
3. PROCESS: Slow down version bumps with release-please config
- Add release-please-config.json with bump-patch-for-minor-pre-major
- In 0.x versions: feat: → patch bump instead of minor
- Prevents rapid version inflation (0.3.1 → 0.5.0 in 21h)
Fixes issues raised by Patrick after PR #21 merge.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add automated workflow step to update the 'latest' tag after each
successful release. This ensures 'latest' always points to the most
recent stable version without manual intervention.
The new job:
- Runs after successful release completion
- Updates 'latest' tag to point to the new semver tag
- Uses force push to move the tag reference
- Includes version info in tag annotation message
Benefits:
- Install scripts can reliably use /releases/latest/download/
- No manual tag management needed
- Consistent reference for "current stable" across platforms
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>