{
  "id": "rtk",
  "name": "RTK",
  "homepage": "https://github.com/rtk-ai/rtk",
  "description": "CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies.",
  "executables": [
    "rtk"
  ],
  "platforms": [
    "macos",
    "linux"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/rtk/config.toml",
      "[appData]/rtk/config.toml",
      "~/.config/rtk/filters.toml"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "RTK",
    "description": "Show token-savings reports and find missed savings. Setup (init) and the proxy are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "gain"
        ],
        "label": "Savings report",
        "source": [
          {
            "id": "readme",
            "kind": "manual",
            "url": "https://raw.githubusercontent.com/rtk-ai/rtk/HEAD/README.md",
            "revision": "2026-10-27",
            "evidence": "rtk gain                        # Summary stats\nrtk gain --graph                # ASCII graph (last 30 days)\nrtk gain --history              # Recent command history\nrtk gain --daily                # Day-by-day breakdown\nrtk gain --all --format json    # JSON export for dashboards\n"
          }
        ],
        "field": [
          {
            "id": "graph",
            "label": "ASCII graph (last 30 days)",
            "type": "boolean",
            "option": [
              "--graph"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "history",
            "label": "Recent command history",
            "type": "boolean",
            "option": [
              "--history"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "daily",
            "label": "Day-by-day breakdown",
            "type": "boolean",
            "option": [
              "--daily"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "all",
            "label": "All data",
            "type": "boolean",
            "option": [
              "--all"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "format",
            "label": "Export format",
            "type": "string",
            "option": [
              "--format"
            ],
            "suggestions": [
              {
                "value": "json",
                "label": "JSON"
              }
            ],
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "summary",
            "label": "Summary",
            "fields": [],
            "required": []
          },
          {
            "id": "export",
            "label": "JSON export",
            "set": {
              "all": [
                true
              ],
              "format": [
                "json"
              ]
            },
            "fields": [
              "all",
              "format"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "graph",
              "history",
              "daily"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "all",
              "format"
            ]
          }
        ]
      },
      {
        "path": [
          "discover"
        ],
        "label": "Find missed savings",
        "source": [
          {
            "id": "readme",
            "kind": "manual",
            "url": "https://raw.githubusercontent.com/rtk-ai/rtk/HEAD/README.md",
            "revision": "2026-10-27",
            "evidence": "rtk discover                    # Find missed savings opportunities\nrtk discover --all --since 7    # All projects, last 7 days\n"
          }
        ],
        "field": [
          {
            "id": "all",
            "label": "All projects",
            "type": "boolean",
            "option": [
              "--all"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "since",
            "label": "Since (days)",
            "type": "integer",
            "option": [
              "--since"
            ],
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "week",
            "label": "All projects, last 7 days",
            "set": {
              "all": [
                true
              ],
              "since": [
                7
              ]
            },
            "fields": [
              "all",
              "since"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "all",
              "since"
            ]
          }
        ]
      }
    ]
  }
}
