dsh-everything-find: Integrating the Everything Index into DSH

Developing agents on Windows often presents a common pain point: file retrieval. Models typically rely on shell commands (such as find or grep) for searching, which is limited in efficiency and difficult to utilize indexes. The dsh-everything-find plugin integrates the Everything filename search engine on Windows, exposing the everything_find tool to the DSH model. This enables the model to query files across the entire disk directly using Everything’s search syntax.

What is it

Maintained by oldHan2423, this plugin falls under the category of web/network tools and is licensed under MIT. Its core implementation does not rely on HTTP services; instead, it utilizes Everything’s official ES command-line interface (es.exe) to communicate with the resident Everything process via IPC. The plugin bundles es.exe, allowing it to be used immediately after installation without additional configuration.

Installation & Enablement

Use the dsh plugin command to install the plugin to the current profile:

dsh plugin --profile web add dsh-everything-find

After installation, reload the DSH process to activate the plugin.

Core Functionality

The plugin provides a tool named everything_find for the model to invoke. Its core parameters are as follows:

Parameter Required Description
query Conditional Everything search syntax: space = AND, \| = OR, ! = NOT. Supports syntax like ext:ts, dm:today, size:>1mb, path:foo. If not provided, it is equivalent to query: "*".
path Conditional Limits the directory and all its subdirectories. If query is not provided, providing only path is equivalent to listing all files under that directory.
directOnly Only list root items of path, non-recursive (corresponds to the -parent argument of es.exe).
max Maximum number of return entries. Defaults to maxResults in config (default 50). Maximum 1000 entries returned per page.
type any, files, or folders.
sort Sorting field. Supports name, path, size, extension, date-modified, etc.
descending Whether to sort in descending order.

The return structure is JSON, containing count (number of entries on this page), total (total number of matches), and results (array of file lists).

Configuration

In DSH version 0.1.7 and above, you can find the configuration card for dsh-everything-find in the “Plugins” section of the Settings Page.

Config Item Default Value Description
esExe Empty Specify the absolute path of es.exe. If left blank, it will be auto-detected in order (Config > PATH > Bundled Copy > Common Install Locations).
esInstance Empty The name of the Everything instance to query. If left blank, the default unnamed instance is used.
timeoutMs 10000 Milliseconds for es.exe to wait for the Everything database to load. Can be increased if the index is large.
maxResults 50 Default limit when everything_find does not explicitly specify max.

Configuration changes are of type volatile, taking effect in place after saving without needing to restart DSH. After manually specifying esExe, a “Overridden” status will be displayed. You can revert to auto-detection via “Restore Defaults”.

Typical Usage

The model calls the everything_find tool to perform queries:

// Find all .ts files in the current directory
everything_find({ query: "ext:ts" })

// Limit search path and limit the number of returns
everything_find({ 
  path: "D:\\repo", 
  max: 100 
})

// List only the direct children of the specified directory
everything_find({ 
  path: "C:\\Projects", 
  directOnly: true 
})

Applicable Scenarios & Notes

  • Platform Limitations: Windows only. Everything is only available on Windows.
  • Prerequisites: Requires Everything to be running persistently, and requires ES version 1.1.0.3x or above (the bundled version is 1.1.0.38).
  • Functional Scope: Only matches filenames and paths; content retrieval is not supported. If Everything has not established an index, search results will be limited.
  • Result Limit: Maximum 1000 results returned per page. If more results are needed, narrow down the query conditions (query or path) rather than simply increasing max.
  • Degradation Strategy: If es.exe cannot be detected or Everything is not running, the plugin will not register the tool, and file retrieval will automatically fall back to DSH’s built-in glob/grep tools.
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye