Scripts2026年7月23日·1 分钟阅读

skim — Fast Fuzzy Finder for the Terminal Written in Rust

A Rust implementation of a command-line fuzzy finder with an interactive interface, designed as a fast alternative to fzf with extended matching options.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
skim Overview
直接安装命令
npx -y tokrepo@latest install 71b9e52e-86b7-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

skim (command name: sk) is a general-purpose fuzzy finder for the command line, written in Rust. It provides an interactive selection interface similar to fzf, with the added benefit of Rust's memory safety and performance characteristics. skim aims for broad compatibility with fzf's interface while offering its own extensions.

What skim Does

  • Provides interactive fuzzy search over stdin, files, or command output
  • Supports preview windows for displaying file contents or command results alongside matches
  • Handles multi-selection and custom key bindings for workflow automation
  • Includes an interactive grep mode (sk --interactive) that re-executes searches as you type
  • Offers a Rust library crate (skim) for embedding fuzzy-finder functionality in other applications

Architecture Overview

skim is built as a multi-threaded Rust application. The input reader, matcher, and renderer run on separate threads connected via channels. The matching engine uses a scoring algorithm similar to fzf's, with support for exact, prefix, suffix, and inverse matching. The terminal UI is rendered directly using ANSI escape sequences without depending on ncurses.

Self-Hosting & Configuration

  • Install via Homebrew, Cargo, or download pre-built binaries from GitHub releases
  • Shell integration scripts available for bash, zsh, and fish (key bindings and completion)
  • Environment variable SK_DEFAULT_OPTIONS sets default flags globally
  • Configure keybindings with --bind flag or in shell rc files
  • No configuration file required; all options work via command-line flags and environment variables

Key Features

  • Written in Rust for fast startup and low memory footprint
  • Compatible with most fzf command-line flags, making migration straightforward
  • Interactive grep mode re-runs the search command on every keystroke
  • Library crate allows embedding skim's fuzzy matcher in Rust applications
  • Regex matching mode in addition to standard fuzzy matching

Comparison with Similar Tools

  • fzf — the original Go fuzzy finder; more mature ecosystem and shell integrations, but skim matches most features
  • peco — Go-based interactive filter; simpler but lacks preview windows and shell integration
  • fzy — minimal fuzzy finder focused on matching quality; fewer features than skim
  • rofi/dmenu — graphical selection tools for X11/Wayland; skim stays in the terminal
  • telescope.nvim — Neovim fuzzy finder plugin; editor-specific while skim is a general tool

FAQ

Q: Is skim a drop-in replacement for fzf? A: Nearly. Most fzf flags work with sk, and the output format is compatible. Some advanced fzf features (like tmux integration) differ.

Q: Can I use skim as a Rust library? A: Yes. The skim crate on crates.io exposes the fuzzy matching engine and UI components for embedding in Rust programs.

Q: How does performance compare to fzf? A: They are comparable for most workloads. skim tends to use less memory, while fzf may be marginally faster on very large inputs due to Go's garbage collector differences.

Q: Does skim support Windows? A: skim primarily targets Linux and macOS. Windows support is partial and may require WSL for full functionality.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产