Introduction

The DSH philosophy is “Everything is a Plugin.” Developers can extend functionality through plugins. When interacting with dsh-TUI in daily use, there are moments when you need to trigger specific prompts or perform actions on fixed time intervals. The dsh-tui-cron plugin addresses this need. It manages tasks based on cron expressions and injects saved prompts into the current session as follow-up user messages at specified times.

What Is It

dsh-tui-cron is a community plugin for dsh-TUI, maintained by FUSU123fusu. It allows users to save prompts using standard cron syntax and send them to the current session queue as follow-up user messages when a task is triggered. An ongoing turn is not interrupted.

Core Features

  • Scheduling: Supports Vixie cron standard syntax (minute, hour, day, month, weekday).
  • Message injection: Injects saved prompts into the session as follow-up user messages.
  • TUI panel management: Provides a visual panel to select tasks, enable/disable tasks, and delete tasks.
  • Data persistence: Stores configuration in JSON format at ~/.dsh-tui/cron.json.

Installation and Enablement

This plugin has not yet been published to npm. It must be packaged and installed from source. Follow these steps:

git clone https://github.com/FUSU123fusu/dsh-tui-cron.git
cd dsh-tui-cron
npm pack
dsh plugin --profile <你的profile> add file:dsh-tui-cron-0.1.0.tgz

Typical Usage

After installing and enabling the plugin, use the following commands in the dsh-TUI interface:

/cron                                        # 打开任务面板
/cron add 0 9 * * 1-5 提醒我整理今天的站会要点
/cron rm <id>                                # 删除任务(支持精确 id 或唯一前缀)
/cron on <id>                                # 启用任务
/cron off <id>                               # 停用任务

In the TUI panel, use the ↑ / ↓ keys to select a task, the space key to toggle enable/disable state, the d key to delete (press twice within 3 seconds to confirm), and the Esc key to exit.

Use Cases and Cautions

  • Process lifetime limitation: The scheduler lives only within the current dsh profile process. It calculates the next trigger time at startup; missed trigger points while the TUI is offline will not be backfilled. To ensure tasks trigger, keep the dsh-TUI process running continuously.
  • Session check: If no top-level session (agent) has been created by the scheduled time, this trigger is skipped and a warning log is written.
  • Environment dependencies: Requires Node.js version ^22.19 || >=24 and depends on @deepseek-ai/dsh-llm 0.1.0-rc.6.
  • Storage location: The configuration file is stored at ~/.dsh-tui/cron.json.

Summary

dsh-tui-cron provides DSH users with a lightweight scheduled-task solution. Through cron syntax and the TUI panel, developers can easily implement automated prompt triggering, making it suitable for scenarios that require scheduled reminders or periodic checks.