|
|
||
|---|---|---|
| .. | ||
| checkers | ||
| README.md | ||
| index.ts | ||
| types.ts | ||
| utils.ts | ||
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-grepjson- jqviewers- bat, eza, deltanavigation- zoxide, fzfhttp- 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
- 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",
},
}
- Tool is automatically checked and included in results.
Adding New Categories
- Add category to
types.ts:
export type Category = "search" | "json" | "viewers" | "navigation" | "http" | "new-category";
- 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
}
- Import and register in
index.ts:
import { checkNewCategoryTools } from "./checkers/new-category.ts";
const CHECKERS: Record<Category, CheckerFunction> = {
// ...
"new-category": checkNewCategoryTools,
};