cli-tools

Search files and content using fd and rg with .gitignore support.

5|Updated Mar 18, 2024
One-click install
npx skills add https://github.com/Multipixelone/infra --skill cli-tools-multipixelone
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-tools
Source: https://github.com/Multipixelone/infra/tree/main/docs/skills/cli-tools
Command: npx skills add https://github.com/Multipixelone/infra --skill cli-tools-multipixelone

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill replaces slow, legacy command-line tools like find and grep with modern, significantly faster alternatives (fd and rg), preventing timeouts and improving efficiency, especially when searching vast file systems like the Nix store.

Core Features & Use Cases

  • Fast File Searching: Quickly locate files by name, pattern, type, or modification time using fd.
  • Content Searching: Rapidly search for text within files, respecting .gitignore, using rg.
  • Nix Store Optimization: Essential for efficient searching within /nix/store's millions of files.
  • Use Case: Find all .nix files modified in the last day within your project's modules directory and search for the string "enable = true" within them.

Quick Start

Use the cli-tools skill to find all files containing the word 'error' in the current directory and its subdirectories.

Frequently Asked Questions about cli-tools

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search for files and text content faster in large codebases?

To search files and text content faster in large codebases, replace legacy `find` and `grep` with modern alternatives `fd` and `rg` to prevent timeouts and improve efficiency. These tools offer superior speed and automatic `.gitignore` integration.

What is the best way to search the Nix store without timing out?

The best way to search the Nix store without timing out is using `fd` and `rg` for rapid file and content searching. They address performance bottlenecks in vast file systems like `/nix/store`'s millions of files.

How do I find recently modified files and search for a specific string inside them?

To find modified files and search specific strings, use `fd` to locate files by modification time, then pipe results to `rg` for rapid content searching. This supports complex filtering and pattern matching.

Does `rg` respect `.gitignore` rules when searching for text within files?

Yes, `rg` respects `.gitignore` rules when searching for text within files. This content searching tool naturally integrates with your repository configuration to skip ignored files, ensuring rapid and relevant results.

Why should I use `fd` instead of the standard `find` command for file searching?

You should use `fd` instead of the standard `find` command for file searching because it provides superior speed and `.gitignore` integration. It quickly locates files by name, pattern, type, or modification time without legacy bottlenecks.

Can I execute commands on the search results found by `fd`?

Yes, you can execute commands on the search results found by `fd`. The tool supports command execution on search results, allowing complex filtering and pattern matching actions directly on your located files.