Quickstart

tokf - LLM Context Compressor

javimosch Updated

File contents

tokf - LLM Context Compressor

Overview

tokf is a config-driven CLI tool that compresses command output before it reaches an LLM context. Reduces token usage for AI tools.

Quick Start

Run command with filtering

sc tokf run command <command>

Passthrough to tokf CLI

sc tokf _ <tokf-args>

Key Features

  • Context Compression: Reduce LLM token usage
  • Config-Driven: TOML configuration
  • Filter Library: Built-in filter library
  • Task Runner Integration: Works with make, just
  • Error Extraction: Extract errors from output
  • Test Failure Extraction: Extract test failures

Installation

cargo install tokf

Also available via:

  • Homebrew
  • Build from source

Usage Examples

Run command with filtering

tokf make test

Apply filter to fixture

tokf --filter error-filter fixture.txt

Verify filter test suites

tokf test

Explore available filters

tokf discover

Notes

  • Run tokf --help to see all available options

javimosch/supercli/tree/main/plugins/tokf/skills/quickstart commit ef21440c62

Frequently asked questions

npx skillmds@latest add javimosch/quickstart-323