ohmyzsh/plugins/deepseek
2026-05-11 13:35:49 +08:00
..
deepseek.plugin.zsh code style 2026-05-11 13:35:49 +08:00
README.md deepseek plugin to help user write shell command 2026-05-11 12:18:38 +08:00

deepseek

This plugin adds the ds command, which turns natural language queries into shell commands using the DeepSeek API. The generated command is echoed to the terminal, pushed onto the next prompt line (ready to execute or edit), and copied to the system clipboard.

To use it, add deepseek to the plugins array in your .zshrc file:

plugins=(... deepseek)

Requirements

Configuration

Set your API key as an environment variable (e.g. in .zshrc or .zprofile):

export DEEPSEEK_API_KEY="sk-..."

Usage

# Ask for a command in plain English (or any language)
ds find the 10 largest files in the current directory

# The output looks like:
#   find . -type f -exec du -h {} + | sort -rh | head -10
#   $ █
#
# The command is:
#   1. Printed to the terminal for review
#   2. Copied to the system clipboard
#   3. Pre-filled on the next prompt line — press Enter to run it,
#      or edit it first

The system prompt instructs the model to respond with only the shell command or code — no explanations, no markdown formatting.

Commands

Command Description
ds Query DeepSeek for a shell command

Cross-platform clipboard

Platform Clipboard tool
macOS pbcopy
Linux (X11) xclip
Linux (Wayland) wl-copy