Claktor
A refactoring CLI that shows coding agents where logic repeats and measures how much smaller each refactor makes production code.
At a Glance
Claktor CLI binary, installed with one command, licensed under PolyForm Shield 1.0.0 (source-available, not OSI-approved). No explicit no-cost statement found in the evidence.
Engagement
Available On
Alternatives
Listed Nov 2026
About Claktor
Claktor is a refactoring CLI for coding agents. It finds repeated logic, even when names and syntax differ, ranks the opportunities by estimated code savings, and measures how much each change shrinks the program. It installs with a one-line script on Linux and macOS, and the binary is distributed as signed releases through the claktor/cli GitHub repository.
What It Is
Claktor works alongside a coding agent you already use. The agent installs the binary, runs claktor guide, and follows the printed instructions. Claktor does not write the refactor itself: the agent makes the change, the repository's existing checks run, and Claktor reports how many tokens the change removed. The team decides what to merge.
The tool is built for TypeScript, JavaScript, Python and Rust.
How the Workflow Runs
- Map:
claktor maprecords tracked files, manifests and source-header evidence in a.claktor/directory. Tests and generated files are kept out of the measured program, and each production target gets a recorded check command. - Select:
claktor map targetnames the largest production target by normalized token count and where to search. - Search:
claktor similarreturns ranked leads using parsers and fuzzy AST matching. Each lead estimates net savings after extraction costs. - Measure:
claktor length diff --compare <commit>counts the change. The guide asks the agent to keep a change only when the checks pass and the delta is -50 tokens or lower.
The count is based on the token count of a normalized form of the program, so renaming and formatting do not change it; only removing logic does.
Example Result
Claktor's site cites a merged pull request in steipete/Markdansi in which three streaming flush helpers became one shared function. The site states it cut 50 production lines and added regression tests.
Telemetry, Updates and Licensing
Installed copies record one anonymous event per command (command name, exit code, duration, version, platform and similar), and the README says arguments, paths, repository names and code stay on the machine. Telemetry can be turned off with claktor telemetry off or DO_NOT_TRACK=1. Installed copies check for updates at most hourly and install only releases whose manifest carries a valid minisign signature. The binary is licensed under the PolyForm Shield License 1.0.0, which restricts use for competing products. The guide also mentions a paid version in development that adds a sub-agent and a dead-code finder.
Community Discussions
Be the first to start a conversation about Claktor
Share your experience with Claktor, ask questions, or help others learn from your insights.
Pricing
Free
Claktor CLI binary, installed with one command, licensed under PolyForm Shield 1.0.0 (source-available, not OSI-approved). No explicit no-cost statement found in the evidence.
- Supports TypeScript, JavaScript, Python, Rust
- Linux and macOS (x86_64, arm64)
- Binary licensed under PolyForm Shield License 1.0.0 (noncompete; not OSI open source)
Capabilities
Key Features
- Finds repeated logic even when names and syntax differ
- Fuzzy AST matching ranks refactoring leads by estimated savings
- Repository mapping that separates tests and generated files from production code
- Token-based measurement of each change via length diff
- Agent-oriented guide printed by claktor guide
- JSON output on every command
- Signed self-updating releases with SHA-256 checked install
- Optional anonymous telemetry with opt-out
