playbook/outfitter-agents/plugins/outfitter/skills/which-tool/scripts
ci[bot] 06e0d13d57 📦 deps(thirdparty): update snapshots 2026-05-29 08:33:53 +00:00
..
checkers 📦 deps(thirdparty): update snapshots 2026-05-29 08:33:53 +00:00
README.md 📦 deps(thirdparty): update snapshots 2026-05-29 08:33:53 +00:00
index.ts 📦 deps(thirdparty): update snapshots 2026-05-29 08:33:53 +00:00
types.ts 📦 deps(thirdparty): update snapshots 2026-05-29 08:33:53 +00:00
utils.ts 📦 deps(thirdparty): update snapshots 2026-05-29 08:33:53 +00:00

README.md

Tool Checker Scripts

Checks for modern CLI tools and provides installation guidance.

Usage

# Check all tools (text output)
bun scripts/index.ts

# Check specific category
bun scripts/index.ts --category search
bun scripts/index.ts -c viewers

# JSON output
bun scripts/index.ts --format json
bun scripts/index.ts -f json

# Combine options
bun scripts/index.ts -c navigation -f json

Categories

  • search - fd, ripgrep, ast-grep
  • json - jq
  • viewers - bat, eza, delta
  • navigation - zoxide, fzf
  • http - httpie

Output Formats

Text (default)

◆ Available Tools

  search
    ✓ fd 10.2.0 — Fast file finder (replaces find)
    ✓ rg 14.1.0 — Fast code search (replaces grep)
    ✗ sg — AST-aware code search and refactoring
      → brew install ast-grep

◇ Summary: 2/3 tools available

JSON

{
  "search": [
    {
      "name": "fd",
      "command": "fd",
      "category": "search",
      "available": true,
      "version": "fd 10.2.0",
      "replaces": "find",
      "description": "Fast file finder",
      "install": {
        "brew": "brew install fd",
        "cargo": "cargo install fd-find",
        "apt": "apt install fd-find",
        "url": "https://github.com/sharkdp/fd"
      }
    }
  ]
}

Architecture

scripts/
├── index.ts              # Entry point - CLI arg parsing and orchestration
├── types.ts              # Shared TypeScript types
├── utils.ts              # Tool detection utilities
└── checkers/
    ├── search.ts         # fd, rg, sg
    ├── json.ts           # jq
    ├── viewers.ts        # bat, eza, delta
    ├── navigation.ts     # z, fzf
    └── http.ts           # http (httpie)

Each checker module exports a function that returns Promise<ToolCheckResult[]>.

Adding New Tools

  1. Add tool definition to appropriate checker module:
{
  name: "tool-name",
  command: "actual-command",
  category: "category",
  replaces: "legacy-tool", // optional
  description: "One-line description",
  install: {
    brew: "brew install tool-name",
    cargo: "cargo install tool-name", // optional
    apt: "apt install tool-name", // optional
    url: "https://github.com/org/repo",
  },
}
  1. Tool is automatically checked and included in results.

Adding New Categories

  1. Add category to types.ts:
export type Category = "search" | "json" | "viewers" | "navigation" | "http" | "new-category";
  1. Create checker module checkers/new-category.ts:
import type { ToolCheckResult } from "../types.ts";
import { checkTool } from "../utils.ts";

export async function checkNewCategoryTools(): Promise<ToolCheckResult[]> {
  // ... implementation
}
  1. Import and register in index.ts:
import { checkNewCategoryTools } from "./checkers/new-category.ts";

const CHECKERS: Record<Category, CheckerFunction> = {
  // ...
  "new-category": checkNewCategoryTools,
};