Skip to content

feat: add Tabnine CLI support#1201

Open
balcsida wants to merge 5 commits intortk-ai:developfrom
balcsida:feat/tabnine-cli-support
Open

feat: add Tabnine CLI support#1201
balcsida wants to merge 5 commits intortk-ai:developfrom
balcsida:feat/tabnine-cli-support

Conversation

@balcsida
Copy link
Copy Markdown

Summary

  • Add first-class Tabnine CLI integration (rtk init -g --tabnine and rtk hook tabnine)
  • Tabnine CLI is a fork of Gemini CLI with identical BeforeTool hook wire format — reuses the existing Gemini hook processor via a shared run_gemini_format_hook() helper
  • Installs hook script, AGENTS.md (Tabnine's default context file), and patches ~/.tabnine/agent/settings.json with the BeforeTool entry
  • Full uninstall support via rtk init -g --tabnine --uninstall

Details

  • Config dir: ~/.tabnine/agent/ (verified from installed Tabnine CLI binary and bundled source)
  • Context file: AGENTS.md — confirmed as Tabnine's default contextFileName from tabnine.mjs source
  • Hook format: identical to Gemini (tool_name + tool_input.command stdin, decision/hookSpecificOutput stdout)
  • Dedicated HookCommands::Tabnine variant for clean logs and future divergence seam
  • Added Tabnine detection to other_integration_installed in hook_check.rs

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test --all — 1353 passed, 0 failed, zero new warnings
  • 3 Tabnine-specific unit tests: rewriter parity, format handler signature, integration detection
  • Live smoke test: echo '{"tool_name":"run_shell_command","tool_input":{"command":"git status"}}' | rtk hook tabnine → correct rewrite JSON
  • Manual end-to-end: rtk init -g --tabnine --auto-patch → launched Tabnine CLI → shell commands rewritten through RTK
  • CLI help shows --tabnine flag and rtk hook tabnine subcommand

@pszymkowiak pszymkowiak added effort-medium 1-2 jours, quelques fichiers enhancement New feature or request labels Apr 10, 2026
@pszymkowiak
Copy link
Copy Markdown
Collaborator

[w] wshm · Automated triage by AI

📊 Automated PR Analysis

Type feature
🟡 Risk medium

Summary

Adds first-class Tabnine CLI integration to RTK, including install/uninstall commands (rtk init -g --tabnine, rtk hook tabnine), hook script generation, AGENTS.md context file writing, and settings.json patching. Since Tabnine CLI is a Gemini CLI fork with an identical BeforeTool hook wire format, the implementation reuses the existing Gemini hook processor via a shared run_gemini_format_hook() helper.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Analyzed automatically by wshm · This is an automated analysis, not a human review.

@balcsida balcsida changed the base branch from master to develop April 10, 2026 17:58
@balcsida balcsida force-pushed the feat/tabnine-cli-support branch from abf4d6e to bda43fc Compare April 10, 2026 18:01
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 10, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort-medium 1-2 jours, quelques fichiers enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants