Перейти к основному содержимому
M

dsh-ops

moldkey/dsh-ops

DSH 网站运维工作台:一句话建站(自动配 nginx + 申请证书),查 SEO/GEO/安全与真实流量,部署前看影响分析、出问题一键回滚;新增流量分析、HTTP 探测、读文件、服务管理、只读诊断命令。

Установка

dsh plugin --profile web add github:moldkey/dsh-ops

README

@liangjiehappy/dsh-ops — DSH Ops Workbench

中文说明

A dev/ops workbench for DSH-managed sites. It checks health, SEO, GEO, code and security, and does snapshot / deploy / rollback with automatic recovery.

14 tools + 1 skill.

Install

dsh plugin --profile web add @liangjiehappy/dsh-ops

Then set your API key (get one at https://dshio.org/me/):

dsh plugin config dsh-ops --set api_key=<your-key>

Or set the environment variable DSH_OPS_KEY.

Tools

ToolWhat it doesMutates
ops_statusSummary of all sites: score, per-category score, last deploy, open issuesno
ops_checkRun 15 checkers on one site, return detailed pass/warn/failno
ops_issuesOpen issues, sorted by severity, with first-seen and countno
ops_snapshotIncremental snapshot (sha256 diff + hard links)yes (add only)
ops_deployDeploy with impact analysis, auto-snapshot, auto-rollbackyes
ops_rollbackRestore to a snapshotyes
ops_restartRestart a systemd serviceyes
ops_trafficReal traffic: today vs yesterday, humans vs bots vs service worker, top pages and landing pagesno
ops_httpProbe page status, size, title and latency from the serverno
ops_readRead a server text file (code/config/log) with line numbers and secret redactionno
ops_serviceService status / restart / reload / nginx -t (authorised units only)yes (restart/reload)
ops_execRead-only diagnostics: df du ps uptime wc grep nginx_testno
ops_diskDisk status / cleanup (journal, nginx cache, old snapshots, old rotated logs); dry-run by defaultyes (on clean)

Checkers (15)

CategoryCheckers
deploydeploy_smoke deploy_assets deploy_sitemap
seoseo_title seo_desc seo_canonical seo_hreflang seo_structured
geogeo_ai_crawler geo_citable
codecode_language_mix code_package_clean code_secret
securitysec_fail2ban sec_backup

Skill

ops-guide — loaded when the user asks about site status, deployment or rollback. It explains which tool to use, what to check before a risky operation, and how to read the deploy impact analysis.

Deploy safety — three layers

The ops_deploy tool was built in response to a real incident: an rsync --delete removed 3 static JS files and broke mobile layout, the feedback button and the PWA prompt for 4 days.

  1. Source completeness — if the build directory is missing expected subdirectories, deploy aborts (source is older than target).
  2. Impact analysis — the tool lists every file that would be deleted. Files not in the source and not on the delete whitelist abort the deploy.
  3. Verify + rollback — a snapshot is taken before deploy; smoke checks run after; any failure triggers automatic rollback.

Always run ops_deploy with dry_run: true first.

Data source

API: https://deepseekbase.com/work/api/

Third-party project. Not affiliated with DeepSeek.

Похожие плагины