feat(desktop): add Electron desktop pet for Claude CLI
- Electron + React + TypeScript 桌面宠物外壳 - xterm.js + node-pty 直接对接 Claude CLI 进程 - 宠物 orb(80x80)可拖拽,点击展开终端面板 - CRT 复古终端主题(扫描线、文字发光) - 全局快捷键 Cmd+Shift+C 显隐 - 窗口位置自动保存 - 中华田园犬吉祥物 icon(AI 生成) - Makefile 新增 `make app` 打包命令
This commit is contained in:
@@ -3,13 +3,14 @@ VENV_MYCLAUDE := $(ROOT_DIR)/.venv/bin/myclaude
|
||||
USER_LOCAL_MYCLAUDE := $(HOME)/.local/bin/myclaude
|
||||
COMP_DIR := $(HOME)/.local/bin/completions
|
||||
|
||||
.PHONY: help install uninstall _symlink-myclaude _install-completions _uninstall-completions
|
||||
.PHONY: help install uninstall app _symlink-myclaude _install-completions _uninstall-completions
|
||||
|
||||
help:
|
||||
@echo "Usage: make [target]"
|
||||
@echo ""
|
||||
@echo " install Sync venv, symlink bin, install completions"
|
||||
@echo " uninstall Remove bin and completions"
|
||||
@echo " app Build desktop pet as macOS .app"
|
||||
|
||||
install:
|
||||
@cd "$(ROOT_DIR)" && \
|
||||
@@ -37,3 +38,19 @@ uninstall: _uninstall-completions
|
||||
_uninstall-completions:
|
||||
@rm -f "$(COMP_DIR)/_myclaude" "$(COMP_DIR)/myclaude.bash"
|
||||
@echo "Removed completions"
|
||||
|
||||
app:
|
||||
@cd "$(ROOT_DIR)/desktop" && \
|
||||
if [ ! -d "node_modules" ]; then \
|
||||
echo "Installing desktop dependencies..."; \
|
||||
npm install; \
|
||||
fi && \
|
||||
echo "Rebuilding native modules for Electron..." && \
|
||||
npx electron-rebuild && \
|
||||
echo "Building and packaging..." && \
|
||||
npm run pack && \
|
||||
echo "" && \
|
||||
echo "Done. .app bundle:" && \
|
||||
ls -d "$(ROOT_DIR)/desktop/release"/*/*.app 2>/dev/null || \
|
||||
ls -d "$(ROOT_DIR)/desktop/release"/*.app 2>/dev/null || \
|
||||
echo "$(ROOT_DIR)/desktop/release/mac*/MyClaude.app"
|
||||
|
||||
Reference in New Issue
Block a user