When developing agents or using DeepSeek Harness, you often encounter scenarios that require batch processing of file names. DSH’s philosophy is “everything is a plugin,” and extending the toolbox via plugins can solve such specific problems. Below is an introduction to a plugin that can batch-rename files according to rules.

Plugin Positioning

dsh-file-rename is a pure Node.js plugin maintained by uckkk. It provides batch file renaming capabilities, supporting find/replace, prefix/suffix, and case conversion rules. It enables dry-run preview mode by default, so the operation is executed only after confirmation.

Core Features

  • Batch renaming
  • Find/replace
  • Prefix/suffix
  • Case conversion rules
  • Dry-run preview

Installation and Enablement

  1. Use the official command to install the plugin:
dsh plugin add dsh-file-rename
  1. After installation, the plugin is automatically added to the dsh.profile.bundles field in the profile’s package.json.

Typical Usage

After installation, simply call the registered tool rename_files in a session.

Example: Change all files starting with IMG under the directory /workspace/images so that they start with photo:

rename_files({
  root: "/workspace/images",
  find: "IMG",
  replace: "photo"
})

Applicable Scenarios and Notes

  • Applicable Scenarios: When you need to organize file names, standardize naming formats, or batch modify file extensions.
  • Note: Installing this plugin means running third-party code on your local machine. Please review the source code and license before use.

Conclusion

The above covers the core usage of dsh-file-rename. For more details, see GitHub or the community directory.