From 8575d7631fde65a048a0c09d331049acd11d3862 Mon Sep 17 00:00:00 2001 From: Timmy Date: Tue, 7 Apr 2026 12:27:23 +0800 Subject: [PATCH] Add admin reset-password command Features: - Add admin reset-password command to reset user passwords - Support SQLite, PostgreSQL, and MySQL databases - Use scrypt hashing compatible with CodiMD - Update README with reset-password usage examples --- README.md | 21 +++- cli_anything/codimd/codimd_cli.py | 70 ++++++++++++ cli_anything/codimd/core/db.py | 183 ++++++++++++++++++++++++++++++ setup.py | 3 + 4 files changed, 273 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f5e620d..d79d2cf 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ CodiMD 的命令列工具 - 讓你可以透過終端機管理 CodiMD 協作筆 ## 安裝 ```bash -# 從 Git 仓库安裝 -pip install git+http://192.168.42.124:31337/timmy/cli-anything-codimd.git +# 從 Git 仓库安裝(含管理員功能) +pip install -e ".[admin]" git+http://192.168.42.124:31337/timmy/cli-anything-codimd.git # 或是複製後手動安裝 git clone http://192.168.42.124:31337/timmy/cli-anything-codimd.git cd cli-anything-codimd/agent-harness -pip install -e . +pip install -e ".[admin]" ``` ## 使用方法 @@ -75,12 +75,13 @@ cli-anything-codimd repl | `revision get