2061 Commits

Author SHA1 Message Date
Qingyu Li 02502d1366 fix: handle tail rewrites with read tail-lines 2026-03-08 09:14:04 +08:00
aesoft 122146d5c0 Merge branch 'develop' into fix/address-issue-384 2026-03-07 13:17:25 +01:00
aesoft 8fc0e4dd64 fix(uninstall): uninstall removes --claude-md artifacts on Windows
Core fix (src/init.rs — uninstall()):
  - Added step 3b after existing @RTK.md removal: checks for <!-- rtk-instructions marker in CLAUDE.md and removes the block
  using the existing remove_rtk_block() helper
  - Handles both artifacts in a single pass (covers edge case where both @RTK.md and the instructions block exist, e.g. after
  running both rtk init -g and rtk init -g --claude-md)
  - If CLAUDE.md becomes empty after cleanup, deletes the file

  Hardening:
  - Extracted RTK_BLOCK_START and RTK_BLOCK_END constants — all marker matching across uninstall(), upsert_rtk_block(),
  remove_rtk_block(), patch_claude_md(), and show_config() now uses these instead of duplicated string literals
  - When uninstall finds nothing to remove, prints which paths were checked to help users diagnose path issues
  - resolve_claude_dir() error message now shows %USERPROFILE% on Windows instead of $HOME

Signed-off-by: Adrien Eppling <adrien.eppling@supinfo.com>
2026-03-07 13:10:44 +01:00
aesoft de552c0458 Merge pull request #397 from rtk-ai/master
sync dev
2026-03-07 11:23:36 +01:00
patrick szymkowiak b11fb00cde docs: add comprehensive functional and user guide documentation (#389)
- Create docs/FEATURES.md with all 45+ commands documented (syntax, options, examples, token savings)
- Create docs/GUIDE.md with getting started, workflows per language, Claude Code integration, FAQ, troubleshooting
2026-03-06 19:00:50 +01:00
aesoft 15f3befccf Merge pull request #382 from rtk-ai/hotfix-readme-discord-link
Update README.md
2026-03-06 15:22:19 +01:00
aesoft e194c7cd4b Update README_zh.md 2026-03-06 15:20:18 +01:00
aesoft e0f503a556 Update README_ko.md 2026-03-06 15:20:06 +01:00
aesoft 9deaf00f86 Update README_ja.md 2026-03-06 15:19:52 +01:00
aesoft 4f8b9f02fa Update README_fr.md 2026-03-06 15:19:40 +01:00
aesoft 55ac640b8e Update README_es.md 2026-03-06 15:19:27 +01:00
aesoft 949104d502 Update README.md 2026-03-06 15:18:59 +01:00
aesoft ae03bb4565 Update README.md 2026-03-06 15:16:21 +01:00
aesoft 30ac4bb4ae Update README_zh.md 2026-03-06 15:14:57 +01:00
aesoft dc8d325e51 Update README_ko.md 2026-03-06 15:14:21 +01:00
aesoft 530b42fa02 Update README_ja.md 2026-03-06 15:14:10 +01:00
aesoft fa05110145 Update README_fr.md 2026-03-06 15:13:59 +01:00
aesoft a69e8c4a66 Update README_es.md 2026-03-06 15:13:49 +01:00
aesoft a097d36f51 Update README.md 2026-03-06 15:13:26 +01:00
aesoft 5816e95d21 Update README.md 2026-03-06 15:12:00 +01:00
aesoft 560ad44b04 Merge pull request #335 from rtk-ai/doc/add-contributing
docs: add contributing.md guide
2026-03-06 14:39:47 +01:00
aesoft f50ff31cb7 Update CONTRIBUTING.md 2026-03-06 14:33:18 +01:00
aesoft e6ce6e6a14 Merge branch 'master' into doc/add-contributing 2026-03-06 14:31:21 +01:00
Charles Vien 7fbc4ef4b5 feat(gt): add Graphite CLI support (#290) 2026-03-06 13:59:39 +01:00
patrick szymkowiak 6099bb8d25 ci: add Discord notification on release (#375)
Sends an embed with version, release notes, and link to the GitHub
release page via the RTK_DISCORD_RELEASE webhook secret.
2026-03-06 13:05:46 +01:00
github-actions[bot] 34b2474d4c chore(master): release 0.27.2 (#365)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.27.2
2026-03-06 12:54:04 +01:00
Florian BRUNIAUX e356c1280d fix: reduce gh diff / git diff / gh api truncation (#354) (#370)
* fix: reduce gh diff / git diff / gh api truncation (#354)

- compact_diff: increase max_hunk_lines 10→30, max_lines default 100→500
- gh api: passthrough instead of JSON→schema destruction
- gh pr diff: add --no-compact flag + increase limit to 500
- gh pr view: passthrough when --json/--jq/--web provided by user

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: update version reference 0.26.0→0.27.1 in README

* docs: update version reference 0.26.0→0.27.1 in CLAUDE.md

* docs: update version reference 0.26.0→0.27.1 in ARCHITECTURE.md

* fix: resolve compile errors in gh_cmd.rs (type mismatches)

* fix: use explicit .iter() in pr_diff loop (avoids &&[String] ambiguity)

* docs: fix version reference 0.27.x→0.27.1 in README

* fix: remove shadowed extra_args in view_pr (was &&[String] not iterator)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 12:36:42 +01:00
patrick szymkowiak a22fe7b31f docs: revamp README with logo, badges, and structure cleanup (#371)
* docs: revamp README with logo, badges, and cleaner structure

- Add centered logo (og-image) and tagline
- Add badges: CI, release version, license, Discord, Homebrew
- Add language links placeholder (fr, zh, ja, ko, es)
- Fix Linux binary filename (gnu -> musl) — fixes #323
- Put Homebrew as recommended install method
- Simplify and reorganize all sections (871 -> ~360 lines)
- Add Discord invite link
- Remove verbose troubleshooting (link to TROUBLESHOOTING.md instead)
- Remove detailed security review section (link to SECURITY.md)

* docs: add translated READMEs (fr, zh, ja, ko, es)

Add localized README files linked from the main README language selector:
- README_fr.md (French)
- README_zh.md (Chinese)
- README_ja.md (Japanese)
- README_ko.md (Korean)
- README_es.md (Spanish)

Each translation includes: installation, quick start, commands overview,
how it works diagram, and links to documentation.

* docs: use rtk-ai org avatar as logo in all READMEs
2026-03-06 12:01:06 +01:00
Alex Tsanis 884e37edbf stream proxy output while command is running (#268) 2026-03-06 11:02:59 +01:00
patrick szymkowiak 27b35d84a3 fix: strip npx/bunx/pnpm prefixes in lint linter detection (#186) (#366)
When running `rtk lint npx eslint ...`, args[0] was "npx" instead of
"eslint", causing no JSON format flag injection and duplicated output.

Extract strip_pm_prefix() and detect_linter() helpers, skip package
manager prefixes before identifying the actual linter name.
2026-03-06 10:51:11 +01:00
Radu Ursache 0a1bcb05e5 fix: pass through -R/--repo flag in gh view commands (#328)
gh view/checks commands (pr view, issue view, pr checks, run view)
were ignoring extra flags like -R/--repo, causing failures outside
git repositories where gh needs -R to know which repo to query.

The root cause: these functions took args[0] as the identifier and
discarded everything else, while constructing hardcoded gh commands.

Changes:
- Add extract_identifier_and_extra_args() to separate the positional
  identifier from flags, handling both `view 123 -R owner/repo` and
  `view -R owner/repo 123` argument orders
- Pass extra args through to gh in view_pr, view_issue, pr_checks,
  and view_run
- Add has_json_flag() check at top of run() to passthrough when user
  explicitly requests --json output (related fix from #313)

Fixes #223
2026-03-06 10:31:10 +01:00
Sam Kvale 799f0856e4 fix: gh pr edit/comment pass correct subcommand to gh (#332)
* fix: gh pr edit/comment pass correct subcommand to gh

pr_action was receiving the past-tense display label ("edited",
"commented") and using it as both the gh subcommand and the
ok_confirmation message. This caused `gh pr edited` to be invoked
instead of `gh pr edit`, which fails with "unknown flag" errors.

Split the parameter into subcmd (for the gh invocation) and
display_label (for ok_confirmation output).

* smaller diff
2026-03-06 09:59:00 +01:00
github-actions[bot] 093e431193 chore(master): release 0.27.1 (#362)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.27.1
2026-03-06 09:46:33 +01:00
patrick szymkowiak 409aed6dbc fix: support git commit -am, --amend and other flags (#327) (#360)
Clap was rejecting -a, --amend, --allow-empty etc. because Commit only
declared -m/--message. Switch to trailing_var_arg like other git
subcommands so all flags pass through to git directly.

Fixes #327
2026-03-06 09:41:23 +01:00
patrick szymkowiak 85b0b3eb0b fix: prettier false positive when not installed (#221) (#359)
* fix: prettier reports "All OK" when not installed (#221)

Empty or failed prettier output was incorrectly treated as "all files
formatted". Now detects empty output and non-zero exit code, shows the
actual error message instead of a false positive.

* test: add smoke tests for rewrite, verify, proxy, discover, diff, wc, smart, docker, json edge cases

Covers bug fixes #196, #344, #345, #346, #347 and previously untested
commands. Adds assert_fails helper. 118 assertions total (was 69).

* chore: update benchmark.sh with missing commands and fix paths

- Add cargo (build/test/clippy/check), diff, smart, wc, curl, wget sections
- Fix Python commands: use dedicated rtk ruff/pytest instead of rtk test
- Fix Go commands: use dedicated rtk go/golangci-lint, add go build/vet
- Make BENCH_DIR absolute so debug files work from temp fixture dirs
- Fallback to installed rtk if target/release/rtk not found
2026-03-06 09:40:24 +01:00
patrick szymkowiak dbc950395e fix: only rewrite docker compose ps/logs/build, skip unsupported subcommands (#336) (#363)
The rewrite pattern matched all `docker` commands but the regex didn't
cover `docker compose`, so compose subcommands were never rewritten.
Meanwhile unsupported compose commands (up, down, config) would fail
if manually prefixed with rtk.

- Extend regex to match `docker compose (ps|logs|build)`
- Unsupported compose subcommands (up, down, config, exec, etc.) are
  correctly skipped by the regex and not rewritten
- 6 new tests covering supported and unsupported compose subcommands

Fixes #336
2026-03-06 09:24:28 +01:00
Radu Ursache 45f9344f03 fix: preserve -- separator for cargo commands and silence fallback (#326)
Two fixes for command passthrough issues:

1. Restore `--` separator stripped by clap (#287): When running
   `rtk cargo test -- --nocapture`, clap consumes `--` and passes only
   `["--nocapture"]` to cargo, which rejects it. Now detect `--` from
   the original command line and re-insert it in the correct position.

2. Remove noisy `[rtk: parse failed, running raw]` stderr message (#286):
   Unrecognized commands like `rtk make` or `rtk ruby` pass through
   silently via the fallback, matching the documented behavior.

Fixes #286
Fixes #287
2026-03-06 09:00:13 +01:00
github-actions[bot] f693e060c6 chore(master): release 0.27.0 (#353)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.27.0
2026-03-05 23:17:41 +01:00
Patrick szymkowiak 8953af0fc0 fix: bugs #196 #344 #345 #346 #347 — gh --json, hook check, RTK_DISABLED, 2>&1, json TOML 2026-03-05 23:08:41 +01:00
Patrick szymkowiak 079ee9a4ea fix: skip rewrite for gh --json/--jq/--template (#196)
gh commands with --json, --jq, or --template produce structured output
that rtk gh filtering would corrupt. Skip rewrite so callers get raw JSON.
2026-03-05 23:08:08 +01:00
Florian BRUNIAUX 7ad291bab5 docs: bump version refs to 0.26.0, fix module count to 57
Version mentions (README.md, CLAUDE.md, ARCHITECTURE.md) were still
on 0.25.0. Module count was 56 (missed hook_check module added in #350).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 22:52:15 +01:00
Florian BRUNIAUX 6c13d23436 fix: RTK_DISABLED ignored, 2>&1 broken, json TOML error (#345, #346, #347)
- #345: rewrite_segment() now returns None when env_prefix contains
  RTK_DISABLED= — prevents rewriting commands the user explicitly
  opted out of
- #346: rewrite_compound() detects redirect operators (2>&1, >&2,
  &>/dev/null, &>>) before treating bare & as background operator —
  fixes corrupted compound commands containing stderr redirects
- #347: validate_json_extension() helper added to json_cmd.rs — early
  rejection with clear error message for TOML/YAML/XML/CSV/etc. files,
  with a dedicated tip for Cargo.toml (suggests rtk deps)

Tests: 16 new unit tests (4 + 6 + 6), 7 new hook integration tests.
All 672 tests pass. Quality gate clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 22:50:17 +01:00
patrick szymkowiak 3141fecf95 feat: warn when installed hook is outdated (#344) (#350)
- Add `# rtk-hook-version: 2` header to hook file
- New `hook_check` module: detect outdated hook on startup, warn 1/day
- Homebrew caveats: remind users to run `rtk init -g` after upgrade
2026-03-05 22:33:17 +01:00
github-actions[bot] 32ade38e0a chore(master): release 0.26.0 (#337)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.26.0
2026-03-05 21:02:37 +01:00
Florian BRUNIAUX 6ad6ffecce feat: add Claude Code skills for PR and issue triage (#343)
* feat: add Claude Code skills for PR and issue triage

Two skills that power structured audits directly in Claude Code sessions.
They replace ad-hoc manual reviews with a repeatable, documented workflow.

**`/pr-triage`** — Pull request audit
Scans open PRs, runs deep review on selected ones, and posts formatted
review comments to GitHub. Covers code quality, test coverage, security
surface, and alignment with CLAUDE.md conventions. Useful before every
merge and for contributor onboarding.

**`/issue-triage`** — Issue audit
Audits open issues, auto-categorizes (bug/feature/doc/question), detects
duplicates, cross-references related PRs, and estimates risk/priority.
Posts structured comments so maintainers have a clear action queue.

Both skills integrate with the `gh` CLI and can be invoked with args:
  /pr-triage 42 57        — deep review of specific PRs
  /pr-triage all          — full audit of all open PRs
  /issue-triage           — audit-only mode (no comments posted)
  /issue-triage all en    — deep analysis, English output

These reduce the overhead of code review and issue management to a single
slash command, keeping context inside the Claude Code session.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: fix version references 0.24.0 → 0.25.0 and module count (pre-existing)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 20:51:15 +01:00
Florian BRUNIAUX a8d6106f73 fix: curl JSON size guard (#297) + exclude_commands config (#243) (#342)
* fix: curl size guard (#297) + exclude_commands config (#243)

**#297 — curl JSON inflation guard**
- `rtk curl` no longer replaces small JSON responses with a type schema
  that is larger than the original payload
- Size guard in `filter_curl_output()`: only return schema when
  `schema.len() <= original.len()`
- Inspired by PR #324 (@rursache)

**#243 — exclude_commands config**
- Add `[hooks] exclude_commands = ["curl"]` in config.toml to prevent
  the auto-rewrite hook from rewriting specific commands
- Survives `rtk init -g` re-runs (config.toml is user-owned)
- Implemented in `rewrite_cmd::run()` via `HooksConfig` struct
- Threaded through `rewrite_command()` → `rewrite_compound()` → `rewrite_segment()`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: add #297 and #243 to CHANGELOG + exclude_commands in README

* docs: fix version references 0.24.0 → 0.25.0 across all docs

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 20:46:40 +01:00
aesoft 33cc14e780 Create dco-check.yaml 2026-03-05 17:41:11 +01:00
aesoft 171e63002f Update CONTRIBUTING.md 2026-03-05 17:31:09 +01:00
aesoft 1dff09df62 Update CONTRIBUTING.md 2026-03-05 17:15:30 +01:00
aesoft 9c3162a968 Update CONTRIBUTING.md 2026-03-05 17:15:11 +01:00