rtk-ai/rtk

Add python3 / python rewrite support

Open

#928 opened on Mar 30, 2026

View on GitHub
 (5 comments) (3 reactions) (0 assignees)Rust (48,085 stars) (2,914 forks)batch import
effort-mediumenhancementgood first issue

Description

Problem

rtk discover shows ~691 python3 heredoc commands and ~289 python3 script invocations not being rewritten. rtk rewrite has no rule for python3 or python.

Patterns to support

Pattern Example Count (30d)
python3 << 'PYEOF' Inline heredoc scripts ~691
python3 script.py Script execution ~289
python -m <module> Module execution (unittest, py_compile) ~83

Reproduction

$ rtk rewrite "python3 << 'PYEOF'"
# exit 1, no output — no rewrite rule

$ rtk rewrite "python3 scripts/my_script.py"
# exit 1, no output

$ rtk rewrite "python -m unittest discover -s ."
# exit 1, no output

Environment

  • rtk 0.30.1
  • macOS (Darwin 23.5.0)

Impact

Python heredoc scripts often produce large DataFrames/dicts as output — high token savings potential. Combined ~1,063 commands over 30 days.

Contributor guide

Add python3 / python rewrite support · rtk-ai/rtk#928 | Good First Issue