@surething/cockpit 1.0.194 → 1.0.196
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next-prod/BUILD_ID +1 -1
- package/.next-prod/app-path-routes-manifest.json +6 -5
- package/.next-prod/build-manifest.json +3 -3
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/react-loadable-manifest.json +1 -1
- package/.next-prod/routes-manifest.json +6 -0
- package/.next-prod/server/app/_global-error/page.js +3 -3
- package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_global-error.html +1 -1
- package/.next-prod/server/app/_global-error.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found/page.js +2 -2
- package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_not-found.html +2 -2
- package/.next-prod/server/app/_not-found.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next-prod/server/app/api/bash/route.js +1 -1
- package/.next-prod/server/app/api/chat/codex/route.js +2 -2
- package/.next-prod/server/app/api/chat/deepseek/route.js +16 -0
- package/.next-prod/server/app/api/chat/deepseek/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/chat/deepseek/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/chat/kimi/route.js +13 -13
- package/.next-prod/server/app/api/chat/ollama/route.js +2 -2
- package/.next-prod/server/app/api/chat/route.js +1 -1
- package/.next-prod/server/app/api/claude-stats/route.js +1 -1
- package/.next-prod/server/app/api/commands/route.js +1 -1
- package/.next-prod/server/app/api/comments/route.js +1 -1
- package/.next-prod/server/app/api/db/columns/route.js +2 -2
- package/.next-prod/server/app/api/db/connect/route.js +1 -1
- package/.next-prod/server/app/api/db/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/db/export/route.js +1 -1
- package/.next-prod/server/app/api/db/query/route.js +1 -1
- package/.next-prod/server/app/api/db/schemas/route.js +1 -1
- package/.next-prod/server/app/api/extension/version/route.js +1 -1
- package/.next-prod/server/app/api/file/route.js +1 -1
- package/.next-prod/server/app/api/files/blame/route.js +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
- package/.next-prod/server/app/api/files/copy/route.js +1 -1
- package/.next-prod/server/app/api/files/delete/route.js +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js +1 -1
- package/.next-prod/server/app/api/files/index/route.js +1 -1
- package/.next-prod/server/app/api/files/init/route.js +1 -1
- package/.next-prod/server/app/api/files/paste/route.js +1 -1
- package/.next-prod/server/app/api/files/read/route.js +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js +1 -1
- package/.next-prod/server/app/api/files/recent/route.js +1 -1
- package/.next-prod/server/app/api/files/save/route.js +1 -1
- package/.next-prod/server/app/api/files/search/route.js +1 -1
- package/.next-prod/server/app/api/files/stat/route.js +1 -1
- package/.next-prod/server/app/api/files/text/route.js +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/branches/route.js +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/commits/route.js +1 -1
- package/.next-prod/server/app/api/git/diff/route.js +1 -1
- package/.next-prod/server/app/api/git/discard/route.js +1 -1
- package/.next-prod/server/app/api/git/stage/route.js +1 -1
- package/.next-prod/server/app/api/git/status/route.js +1 -1
- package/.next-prod/server/app/api/git/unstage/route.js +1 -1
- package/.next-prod/server/app/api/git/worktree/route.js +1 -1
- package/.next-prod/server/app/api/global-state/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/load/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/save/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/shutdown/route.js +1 -1
- package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
- package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
- package/.next-prod/server/app/api/lsp/references/route.js +1 -1
- package/.next-prod/server/app/api/lsp/status/route.js +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
- package/.next-prod/server/app/api/mysql/columns/route.js +2 -2
- package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route.js +2 -2
- package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
- package/.next-prod/server/app/api/note/route.js +1 -1
- package/.next-prod/server/app/api/ollama/models/route.js +1 -1
- package/.next-prod/server/app/api/ollama/start/route.js +1 -1
- package/.next-prod/server/app/api/open-cursor/route.js +1 -1
- package/.next-prod/server/app/api/open-vscode/route.js +1 -1
- package/.next-prod/server/app/api/pick-folder/route.js +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
- package/.next-prod/server/app/api/project-settings/route.js +1 -1
- package/.next-prod/server/app/api/project-state/route.js +1 -1
- package/.next-prod/server/app/api/projects/route.js +1 -1
- package/.next-prod/server/app/api/redis/command/route.js +1 -1
- package/.next-prod/server/app/api/redis/connect/route.js +1 -1
- package/.next-prod/server/app/api/redis/delete/route.js +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/redis/get/route.js +1 -1
- package/.next-prod/server/app/api/redis/keys/route.js +1 -1
- package/.next-prod/server/app/api/redis/set/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/route.js +1 -1
- package/.next-prod/server/app/api/review/identify/route.js +1 -1
- package/.next-prod/server/app/api/review/order/route.js +1 -1
- package/.next-prod/server/app/api/review/route.js +1 -1
- package/.next-prod/server/app/api/review/share-info/route.js +1 -1
- package/.next-prod/server/app/api/review/users/route.js +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route.js +1 -1
- package/.next-prod/server/app/api/services/config/route.js +1 -1
- package/.next-prod/server/app/api/services/scripts/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
- package/.next-prod/server/app/api/sessions/route.js +1 -1
- package/.next-prod/server/app/api/settings/route.js +1 -1
- package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
- package/.next-prod/server/app/api/skills/content/route.js +1 -1
- package/.next-prod/server/app/api/skills/route.js +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
- package/.next-prod/server/app/api/terminal/env/route.js +1 -1
- package/.next-prod/server/app/api/terminal/history/route.js +1 -1
- package/.next-prod/server/app/api/version/route.js +1 -1
- package/.next-prod/server/app/favicon.ico/route.js +1 -1
- package/.next-prod/server/app/manifest.webmanifest/route.js +2 -2
- package/.next-prod/server/app/page.js +3 -3
- package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/project/page.js +5 -5
- package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/review/[id]/page.js +2 -2
- package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +6 -5
- package/.next-prod/server/chunks/4098.js +1 -1
- package/.next-prod/server/chunks/4490.js +1 -1
- package/.next-prod/server/chunks/5394.js +1 -1
- package/.next-prod/server/middleware-build-manifest.js +1 -1
- package/.next-prod/server/middleware-react-loadable-manifest.js +1 -1
- package/.next-prod/server/pages/404.html +2 -2
- package/.next-prod/server/pages/500.html +1 -1
- package/.next-prod/server/server-reference-manifest.json +1 -1
- package/.next-prod/static/5dqS4JCjRSMJN3cvcnCBI/_buildManifest.js +1 -0
- package/.next-prod/static/chunks/{700.0aaec5a3a570d182.js → 700.642136ad4fbe16ca.js} +4 -4
- package/.next-prod/static/chunks/app/{api/bash/route-94e40d01eb0846a0.js → _global-error/page-aa58df485295770f.js} +1 -1
- package/.next-prod/static/chunks/app/api/{chat/codex/route-94e40d01eb0846a0.js → bash/route-aa58df485295770f.js} +1 -1
- package/.next-prod/static/chunks/app/api/chat/{kimi/route-94e40d01eb0846a0.js → codex/route-aa58df485295770f.js} +1 -1
- package/.next-prod/static/chunks/app/{_global-error/page-94e40d01eb0846a0.js → api/chat/deepseek/route-aa58df485295770f.js} +1 -1
- package/.next-prod/static/chunks/app/api/chat/kimi/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/ollama/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/claude-stats/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/commands/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/comments/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/columns/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/connect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/disconnect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/export/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/query/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/schemas/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/extension/version/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/file/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/blame/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/clipboard/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/copy/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/delete/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/expanded/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/index/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/init/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/paste/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/read/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/readdir/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/recent/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/save/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/search/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/stat/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/text/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branches/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commits/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/diff/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/discard/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/stage/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/status/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/unstage/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/worktree/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/global-state/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/load/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/save/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/definition/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/hover/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/references/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/status/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/columns/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/connect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/export/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/query/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/query/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/note/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/models/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/start/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/open-cursor/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/open-vscode/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/pick-folder/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/project-settings/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/project-state/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/projects/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/command/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/connect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/delete/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/get/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/keys/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/set/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/identify/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/order/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/share-info/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/users/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/services/config/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/services/scripts/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/session-by-path/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/settings/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/[id]/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/content/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/env/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/history/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/version/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/project/page-3a148e22b1d92a17.js +29 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/{webpack-9a8ea3995034c536.js → webpack-c669c0003eb75661.js} +1 -1
- package/.next-prod/static/css/18aae55f9fdae00a.css +1 -0
- package/.next-prod/trace +12 -12
- package/.next-prod/trace-build +1 -1
- package/.next-prod/types/app/api/chat/deepseek/route.ts +351 -0
- package/.next-prod/types/routes.d.ts +2 -1
- package/.next-prod/types/validator.ts +9 -0
- package/README.md +154 -61
- package/README.zh.md +141 -54
- package/bin/cock-browser.mjs +19 -19
- package/bin/cock-terminal.mjs +8 -8
- package/bin/cock.mjs +7 -5
- package/bin/cockpit.mjs +14 -0
- package/dist/{chunk-ZDTXJE6Z.mjs → chunk-J6PMXUI4.mjs} +2 -0
- package/dist/scheduledTasks.mjs +1 -1
- package/dist/wsServer.mjs +1 -1
- package/package.json +27 -5
- package/.next-prod/static/GrlHt_NxoSxuOTl-aMQdx/_buildManifest.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/ollama/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/claude-stats/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/commands/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/comments/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/db/columns/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/db/connect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/db/disconnect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/db/export/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/db/query/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/db/schemas/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/extension/version/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/file/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/blame/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/clipboard/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/copy/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/delete/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/expanded/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/index/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/init/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/paste/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/read/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/readdir/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/recent/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/save/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/search/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/stat/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/text/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branches/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commits/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/diff/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/discard/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/stage/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/status/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/unstage/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/worktree/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/global-state/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/load/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/save/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/definition/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/hover/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/references/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/status/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/columns/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/connect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/export/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/query/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/query/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/note/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/models/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/start/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/open-cursor/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/open-vscode/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/pick-folder/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/project-settings/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/project-state/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/projects/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/command/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/connect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/delete/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/get/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/keys/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/set/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/identify/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/order/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/share-info/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/users/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/services/config/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/services/scripts/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/session-by-path/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/settings/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/[id]/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/content/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/env/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/history/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/version/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/project/page-66c22be12277e5c1.js +0 -29
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/css/2a6d4c877711db09.css +0 -1
- /package/.next-prod/static/{GrlHt_NxoSxuOTl-aMQdx → 5dqS4JCjRSMJN3cvcnCBI}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -1,110 +1,203 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<
|
|
2
|
+
<a href="https://cocking.cc">
|
|
3
|
+
<img src="public/icons/icon-128x128.png" width="80" alt="Cockpit logo" />
|
|
4
|
+
</a>
|
|
3
5
|
</p>
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
<h1 align="center">Cockpit — A Claude Code GUI for parallel AI coding</h1>
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
<p align="center">
|
|
10
|
+
<strong>One seat. One AI. Everything under control.</strong><br/>
|
|
11
|
+
<sub><code>/ˈkɒkpɪt/</code> — like an aircraft cockpit</sub>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="https://www.npmjs.com/package/@surething/cockpit"><img src="https://img.shields.io/npm/v/@surething/cockpit?color=12a594&label=npm&style=flat-square" alt="npm version"/></a>
|
|
16
|
+
<a href="https://www.npmjs.com/package/@surething/cockpit"><img src="https://img.shields.io/npm/dm/@surething/cockpit?color=12a594&label=downloads&style=flat-square" alt="npm downloads"/></a>
|
|
17
|
+
<a href="https://github.com/Surething-io/cockpit/stargazers"><img src="https://img.shields.io/github/stars/Surething-io/cockpit?color=12a594&style=flat-square" alt="GitHub stars"/></a>
|
|
18
|
+
<a href="https://github.com/Surething-io/cockpit/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-12a594?style=flat-square" alt="MIT license"/></a>
|
|
19
|
+
<a href="https://cocking.cc"><img src="https://img.shields.io/badge/website-cocking.cc-12a594?style=flat-square" alt="website"/></a>
|
|
20
|
+
<a href="https://github.com/anthropics/anthropic-sdk-typescript"><img src="https://img.shields.io/badge/built_on-Claude%20Agent%20SDK-12a594?style=flat-square" alt="Built on Claude Agent SDK"/></a>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<a href="README.md">English</a> · <a href="README.zh.md">中文</a> · <a href="https://cocking.cc">Website</a> · <a href="https://cocking.cc/en/blog/">Blog</a>
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
> **Cockpit is an open-source Claude Code GUI.** Run multiple Claude Code Agent SDK sessions in parallel across projects, with a built-in terminal, Chrome control, PostgreSQL / MySQL / Redis bubbles, code review, and slash modes — all local, zero config.
|
|
8
30
|
|
|
9
31
|
https://github.com/user-attachments/assets/18f1a5dc-64f3-4ff6-b9fc-9cd08181fbb8
|
|
10
32
|
|
|
11
|
-
|
|
33
|
+
```bash
|
|
34
|
+
npm i -g @surething/cockpit && cockpit
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Why Cockpit?
|
|
38
|
+
|
|
39
|
+
Anthropic ships **Claude Code as a CLI**. That's the right call for power users — but the moment you have more than one project in flight, your terminal turns into mission control with no instruments.
|
|
40
|
+
|
|
41
|
+
Cockpit is the instrument panel. It does **not** replace Claude Code; it stands on top of the official Agent SDK and gives you the things a CLI can't:
|
|
12
42
|
|
|
13
|
-
|
|
43
|
+
| Pain with raw Claude Code | What Cockpit adds |
|
|
44
|
+
|---|---|
|
|
45
|
+
| One session at a time, terminal chaos at 3+ projects | **Multi-project tabs**, parallel agent sessions, red-dot inbox, desktop notifications |
|
|
46
|
+
| Image attachments are awkward | Drop / paste images straight into chat |
|
|
47
|
+
| "What was I debugging yesterday?" | Cmd+K cross-project session browser, pinning, forking |
|
|
48
|
+
| Agent can't reach your browser / DB | **Smart Bubbles**: Chrome, PostgreSQL, MySQL, Redis — drivable by the agent |
|
|
49
|
+
| Reviewing AI output is friction | **LAN-shared review pages**, line-level comments, send any comment back as AI context |
|
|
50
|
+
| Same "do X but don't change code" prompt every day | **Slash modes** `/qa /fx /review /commit` + custom `~/.claude/commands/*.md` |
|
|
51
|
+
| No automation hooks | One-time / interval / cron-based **scheduled tasks** |
|
|
52
|
+
| "Cloud relay" trust concerns | **Fully local**. No telemetry. No API key beyond what `claude` already has. |
|
|
14
53
|
|
|
15
54
|
## Features
|
|
16
55
|
|
|
17
|
-
### Agent — AI
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
56
|
+
### Agent — AI chat that scales
|
|
57
|
+
|
|
58
|
+
- Powered by the **official Claude Agent SDK** — zero extra API key setup
|
|
59
|
+
- **Multi-project concurrent sessions** with desktop notifications and red-dot badges
|
|
60
|
+
- Session **pinning, forking**, cross-project session browser (Cmd+K)
|
|
61
|
+
- `!command` prefix to run shell from chat — output piped back as context
|
|
62
|
+
- Image attachments, code references, token usage tracking
|
|
63
|
+
|
|
64
|
+
### Explorer — Code & files
|
|
65
|
+
|
|
66
|
+
- **4-tab file browser**: Directory · Recent · Git Changes · Git History
|
|
67
|
+
- Syntax highlighting (Shiki) with **Vi mode** editing
|
|
68
|
+
- Git **blame**, diff view, branch switching, **worktree** management
|
|
69
|
+
- **LSP integration** — go to definition, find references, hover info
|
|
29
70
|
- Fuzzy file search (Cmd+F), JSON viewer, Markdown preview
|
|
30
71
|
|
|
31
|
-
### Console — Terminal & Bubbles
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
- **
|
|
35
|
-
- **
|
|
36
|
-
- **
|
|
37
|
-
-
|
|
38
|
-
-
|
|
72
|
+
### Console — Terminal & smart Bubbles
|
|
73
|
+
|
|
74
|
+
- Full **xterm.js** terminal with shell integration
|
|
75
|
+
- 🌐 **Browser Bubble** — control Chrome via accessibility tree (click, type, navigate, screenshot, network)
|
|
76
|
+
- 🐘 **PostgreSQL Bubble** — browse schema, run queries, export
|
|
77
|
+
- 🐬 **MySQL Bubble** — browse databases & tables, run queries
|
|
78
|
+
- 🔴 **Redis Bubble** — browse keys, inspect values, execute commands
|
|
79
|
+
- Drag-to-reorder, grid / maximized layout, per-tab env vars & shell aliases
|
|
39
80
|
|
|
40
|
-
### Code Review —
|
|
41
|
-
- LAN-shareable review pages — team members review without installing anything
|
|
42
|
-
- Line-level commenting with reply threads
|
|
43
|
-
- Send comments as AI context for automated fixes
|
|
44
|
-
- Red-dot badges for unread comments
|
|
81
|
+
### Code Review — LAN-shared, no SaaS
|
|
45
82
|
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
83
|
+
- LAN-shareable review pages — **teammates need zero install**
|
|
84
|
+
- Line-level comments with reply threads
|
|
85
|
+
- **Send any comment back to AI** as context for an automated fix
|
|
86
|
+
- Red-dot badges keep unread feedback visible across projects
|
|
49
87
|
|
|
50
|
-
###
|
|
51
|
-
- Three-panel swipe UI — Agent / Explorer / Console always rendered, instant switch
|
|
52
|
-
- Red-dot badges & toast notifications — never miss a completed AI task
|
|
53
|
-
- Multi-project workspace — each project isolated, switch without losing state
|
|
54
|
-
- Dark / Light theme, English / Chinese i18n
|
|
55
|
-
- Chrome extension (Manifest V3) for browser automation bridge
|
|
56
|
-
- CLI tools: `cock browser` / `cock terminal` for headless automation
|
|
88
|
+
### Slash modes — change the agent's posture
|
|
57
89
|
|
|
58
|
-
|
|
90
|
+
- `/qa` — **Clarify-only**: restate, ask back, never code
|
|
91
|
+
- `/fx` — **Diagnose-only**: bug evidence chain, never edit
|
|
92
|
+
- `/review` — read the diff, write notes, no rewrites
|
|
93
|
+
- `/commit` — stage + draft a message in your repo's style + commit
|
|
94
|
+
- **Custom**: drop any `*.md` into `~/.claude/commands/` or `./.claude/commands/` → instant slash command
|
|
59
95
|
|
|
60
|
-
|
|
96
|
+
### Scheduled tasks — Cron for AI
|
|
61
97
|
|
|
62
|
-
|
|
98
|
+
- One-time, interval, or **cron** scheduling
|
|
99
|
+
- Pause / resume, reorder, track results across projects
|
|
100
|
+
|
|
101
|
+
### Skills — extensibility
|
|
102
|
+
|
|
103
|
+
- Drop in any `SKILL.md` to teach the agent a new trick
|
|
104
|
+
- Invoke with `/skill-name` from chat
|
|
105
|
+
- All managed from a single Skills sidebar
|
|
106
|
+
|
|
107
|
+
## Use cases
|
|
108
|
+
|
|
109
|
+
- **Solo dev, multi-repo:** "I have a refactor running in API, tests writing in Web, and a bug investigation in Pipeline — all at once, all visible."
|
|
110
|
+
- **Two-person team:** Senior reviews via LAN-shared review page, no GitHub PR round-trip needed for in-progress work.
|
|
111
|
+
- **Full-stack chore mode:** `/fx` in one tab on a backend bug, `/review` in another on the frontend diff, `/commit` to wrap up — three slash modes, three different agent postures.
|
|
112
|
+
- **AI-driven QA:** Browser Bubble + scheduled task = "every night at 2 AM, run this UI smoke flow and post a summary".
|
|
113
|
+
- **Privacy-sensitive code:** runs on your laptop, talks only to the Claude API your `claude` CLI is already configured with. No telemetry, no relay.
|
|
114
|
+
|
|
115
|
+
## Try online
|
|
116
|
+
|
|
117
|
+
No install, no AI chat (read-only sandbox, 5 min):
|
|
118
|
+
|
|
119
|
+
[](https://cocking.cc/try)
|
|
63
120
|
|
|
64
121
|
## Prerequisites
|
|
65
122
|
|
|
66
123
|
- **Node.js ≥ 20** — [nodejs.org](https://nodejs.org/)
|
|
67
|
-
- **Claude Code** — [docs.anthropic.com](https://docs.anthropic.com/en/docs/claude-code)
|
|
68
|
-
- **Git** — for git features (blame, diff,
|
|
69
|
-
- **Chrome**
|
|
124
|
+
- **Claude Code** — [docs.anthropic.com/en/docs/claude-code](https://docs.anthropic.com/en/docs/claude-code)
|
|
125
|
+
- **Git** — for git features (blame, diff, worktree, etc.)
|
|
126
|
+
- **Chrome** *(optional)* — for Browser Bubble; install the bundled extension from `~/.cockpit/chrome-extension`
|
|
70
127
|
|
|
71
128
|
## Install
|
|
72
129
|
|
|
73
130
|
```bash
|
|
74
131
|
npm install -g @surething/cockpit
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
132
|
+
cockpit # start cockpit → http://localhost:3457
|
|
133
|
+
cockpit . # open current dir as a project
|
|
134
|
+
cockpit ~/my-project # open specified dir
|
|
135
|
+
cockpit -h # help
|
|
79
136
|
```
|
|
80
137
|
|
|
81
|
-
|
|
138
|
+
> Both `cockpit` (full name) and `cock` (short alias) ship with the package — use whichever you prefer. Docs and examples use `cockpit`; existing muscle memory keeps working.
|
|
139
|
+
|
|
140
|
+
### From source
|
|
82
141
|
|
|
83
142
|
```bash
|
|
84
143
|
git clone https://github.com/Surething-io/cockpit.git
|
|
85
144
|
cd cockpit
|
|
86
145
|
npm install
|
|
87
|
-
npm run setup #
|
|
146
|
+
npm run setup # build + npm link (registers `cockpit` and `cock`)
|
|
88
147
|
```
|
|
89
148
|
|
|
90
149
|
## CLI
|
|
91
150
|
|
|
92
151
|
```bash
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
152
|
+
cockpit browser <id> snapshot # capture accessibility tree
|
|
153
|
+
cockpit browser <id> click <uid> # click element
|
|
154
|
+
cockpit terminal <id> exec "ls" # execute command
|
|
155
|
+
cockpit terminal <id> output # get terminal output
|
|
97
156
|
```
|
|
98
157
|
|
|
158
|
+
## Comparison
|
|
159
|
+
|
|
160
|
+
| | Raw Claude Code CLI | IDE plugin (Cursor, Continue) | Aider TUI | **Cockpit** |
|
|
161
|
+
|---|---|---|---|---|
|
|
162
|
+
| Multi-project parallel | tmux required | multi-window | one at a time | **first-class** |
|
|
163
|
+
| Cross-project search | grep | per-window | local | **Cmd+K** |
|
|
164
|
+
| Browser / DB control | ❌ | usually ❌ | ❌ | **✅ Bubbles** |
|
|
165
|
+
| Code review surface | git tools | PR provider | git | **LAN-shared** |
|
|
166
|
+
| Slash modes | manual | per-plugin | yes | **`/qa /fx /review /commit` + custom** |
|
|
167
|
+
| Local-only / no cloud relay | ✅ | varies | ✅ | **✅** |
|
|
168
|
+
| Day-1 SDK features | ✅ | wait | varies | **✅ official SDK** |
|
|
169
|
+
| Open source | ✅ | mostly ❌ | ✅ | **✅ MIT** |
|
|
170
|
+
|
|
171
|
+
Read the long version: [Claude Code GUI: CLI vs Cockpit vs IDE plugins](https://cocking.cc/en/blog/claude-code-gui-comparison/)
|
|
172
|
+
|
|
173
|
+
## Read more
|
|
174
|
+
|
|
175
|
+
- 📖 [How to run 5 Claude Code sessions in parallel](https://cocking.cc/en/blog/parallel-claude-code-sessions/)
|
|
176
|
+
- 📖 [Slash modes in Claude Code: /qa /fx /review /commit](https://cocking.cc/en/blog/slash-modes-claude-code/)
|
|
177
|
+
- 📖 [Full blog](https://cocking.cc/en/blog/)
|
|
178
|
+
- 📋 [Changelog](https://cocking.cc/en/changelog/)
|
|
179
|
+
|
|
99
180
|
## Development
|
|
100
181
|
|
|
101
182
|
```bash
|
|
102
|
-
npm run dev #
|
|
103
|
-
npm run build #
|
|
104
|
-
npm run setup #
|
|
183
|
+
npm run dev # dev server → http://localhost:3456
|
|
184
|
+
npm run build # production build
|
|
185
|
+
npm run setup # build + npm link
|
|
105
186
|
npm run lint # ESLint
|
|
106
187
|
```
|
|
107
188
|
|
|
108
|
-
## Tech
|
|
189
|
+
## Tech stack
|
|
190
|
+
|
|
191
|
+
Next.js 16 · React 19 · TypeScript · TailwindCSS · xterm.js · Shiki · i18next · Claude Agent SDK
|
|
192
|
+
|
|
193
|
+
## Contributing
|
|
194
|
+
|
|
195
|
+
Issues and PRs welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) and [GUIDE.md](GUIDE.md).
|
|
196
|
+
|
|
197
|
+
## License
|
|
198
|
+
|
|
199
|
+
[MIT](LICENSE) © Surething
|
|
200
|
+
|
|
201
|
+
---
|
|
109
202
|
|
|
110
|
-
|
|
203
|
+
<sub>If Cockpit saved you 10 minutes today, a ⭐️ on GitHub is the cheapest thank-you we know.</sub>
|
package/README.zh.md
CHANGED
|
@@ -1,107 +1,182 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<
|
|
2
|
+
<a href="https://cocking.cc">
|
|
3
|
+
<img src="public/icons/icon-128x128.png" width="80" alt="Cockpit logo" />
|
|
4
|
+
</a>
|
|
3
5
|
</p>
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
<h1 align="center">Cockpit —— 为并行 AI 编程而生的 Claude Code GUI</h1>
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
<p align="center">
|
|
10
|
+
<strong>One seat. One AI. Everything under control.</strong><br/>
|
|
11
|
+
<sub><code>/ˈkɒkpɪt/</code> —— 像飞机驾驶舱</sub>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="https://www.npmjs.com/package/@surething/cockpit"><img src="https://img.shields.io/npm/v/@surething/cockpit?color=12a594&label=npm&style=flat-square" alt="npm version"/></a>
|
|
16
|
+
<a href="https://www.npmjs.com/package/@surething/cockpit"><img src="https://img.shields.io/npm/dm/@surething/cockpit?color=12a594&label=downloads&style=flat-square" alt="npm downloads"/></a>
|
|
17
|
+
<a href="https://github.com/Surething-io/cockpit/stargazers"><img src="https://img.shields.io/github/stars/Surething-io/cockpit?color=12a594&style=flat-square" alt="GitHub stars"/></a>
|
|
18
|
+
<a href="https://github.com/Surething-io/cockpit/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-12a594?style=flat-square" alt="MIT license"/></a>
|
|
19
|
+
<a href="https://cocking.cc"><img src="https://img.shields.io/badge/website-cocking.cc-12a594?style=flat-square" alt="website"/></a>
|
|
20
|
+
<a href="https://github.com/anthropics/anthropic-sdk-typescript"><img src="https://img.shields.io/badge/built_on-Claude%20Agent%20SDK-12a594?style=flat-square" alt="Built on Claude Agent SDK"/></a>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<a href="README.md">English</a> · <a href="README.zh.md">中文</a> · <a href="https://cocking.cc">官网</a> · <a href="https://cocking.cc/zh/blog/">博客</a>
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
> **Cockpit 是开源的 Claude Code GUI。** 基于官方 Claude Agent SDK,支持多项目并发会话、内置终端、Chrome 自动化、PostgreSQL / MySQL / Redis 数据库气泡、代码评审与斜杠模式 —— 全部本地化,零配置。
|
|
8
30
|
|
|
9
31
|
https://github.com/user-attachments/assets/18f1a5dc-64f3-4ff6-b9fc-9cd08181fbb8
|
|
10
32
|
|
|
11
|
-
|
|
33
|
+
```bash
|
|
34
|
+
npm i -g @surething/cockpit && cockpit
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 为什么选 Cockpit?
|
|
38
|
+
|
|
39
|
+
Anthropic 把 **Claude Code 默认做成 CLI**。这对硬核玩家是对的 —— 但只要你同时跟进 2+ 个项目,终端就成了"没有仪表盘的塔台"。
|
|
12
40
|
|
|
13
|
-
|
|
41
|
+
Cockpit 就是那个仪表盘。它**不替代** Claude Code,而是站在官方 Agent SDK 之上,补齐 CLI 给不了的能力:
|
|
42
|
+
|
|
43
|
+
| 裸用 Claude Code 的痛 | Cockpit 的解法 |
|
|
44
|
+
|---|---|
|
|
45
|
+
| 一次只能开一个会话,3+ 项目就乱 | **多项目标签页**、并发 Agent 会话、红点收件箱、桌面通知 |
|
|
46
|
+
| 图片附件麻烦 | 拖拽 / 粘贴图片直接进对话 |
|
|
47
|
+
| "我昨天调的那个 bug 在哪?" | Cmd+K 跨项目会话浏览,会话固定 / 分叉 |
|
|
48
|
+
| Agent 够不到浏览器 / 数据库 | **智能气泡**:Chrome、PostgreSQL、MySQL、Redis —— Agent 可驱动 |
|
|
49
|
+
| AI 输出审阅低效 | **局域网共享评审页**、行级评论、任意评论可回喂给 AI |
|
|
50
|
+
| 每天写一遍"做 X 但不要动代码" | **斜杠模式** `/qa /fx /review /commit` + 自定义 `~/.claude/commands/*.md` |
|
|
51
|
+
| 没有自动化触发器 | 一次性 / 间隔 / **Cron** **定时任务** |
|
|
52
|
+
| 担心"云端中转" | **完全本地**。无遥测、无中转,复用你 `claude` CLI 已有的 API Key |
|
|
14
53
|
|
|
15
54
|
## 功能特性
|
|
16
55
|
|
|
17
|
-
### Agent
|
|
56
|
+
### Agent —— 可扩展的 AI 对话
|
|
18
57
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
- `!command`
|
|
58
|
+
- 基于**官方 Claude Agent SDK** —— 零额外 API Key 配置
|
|
59
|
+
- **多项目并发会话**,桌面通知 + 红点徽标
|
|
60
|
+
- 会话**固定 / 分叉**,跨项目会话浏览(Cmd+K)
|
|
61
|
+
- `!command` 前缀直接执行 shell —— 输出回流为对话上下文
|
|
23
62
|
- 图片附件、代码引用、Token 用量统计
|
|
24
63
|
|
|
25
|
-
### Explorer
|
|
64
|
+
### Explorer —— 代码与文件
|
|
26
65
|
|
|
27
|
-
-
|
|
28
|
-
- 语法高亮 (Shiki) + Vi
|
|
29
|
-
- Git blame
|
|
30
|
-
- LSP
|
|
31
|
-
- 模糊搜索 (Cmd+F)、JSON
|
|
66
|
+
- **4 标签页文件浏览器**:目录树 · 最近 · Git 变更 · Git 历史
|
|
67
|
+
- 语法高亮 (Shiki) + **Vi 模式**编辑
|
|
68
|
+
- Git **blame**、Diff 视图、分支切换、**Worktree** 管理
|
|
69
|
+
- **LSP 集成** —— 跳转定义、查找引用、悬浮类型信息
|
|
70
|
+
- 模糊搜索 (Cmd+F)、JSON 查看器、Markdown 预览
|
|
32
71
|
|
|
33
|
-
### Console
|
|
72
|
+
### Console —— 终端与智能气泡
|
|
34
73
|
|
|
35
|
-
-
|
|
36
|
-
- **浏览器气泡**
|
|
37
|
-
-
|
|
38
|
-
- **MySQL 气泡**
|
|
39
|
-
- **Redis 气泡**
|
|
40
|
-
-
|
|
41
|
-
- 每个标签页独立的环境变量和 Shell 别名
|
|
74
|
+
- 完整 **xterm.js** 终端,Shell 集成
|
|
75
|
+
- 🌐 **浏览器气泡** —— 通过无障碍树控制 Chrome(点击、输入、导航、截图、网络)
|
|
76
|
+
- 🐘 **PostgreSQL 气泡** —— 浏览 Schema、执行查询、导出
|
|
77
|
+
- 🐬 **MySQL 气泡** —— 浏览数据库与表、执行查询
|
|
78
|
+
- 🔴 **Redis 气泡** —— 浏览键值、查看数据、执行命令
|
|
79
|
+
- 拖拽排序、网格 / 放大布局,每个标签独立的环境变量与 Shell 别名
|
|
42
80
|
|
|
43
|
-
### 代码评审
|
|
81
|
+
### 代码评审 —— 局域网共享,无需 SaaS
|
|
44
82
|
|
|
45
|
-
- 局域网分享评审页面
|
|
83
|
+
- 局域网分享评审页面 —— **队友零安装**即可参与
|
|
46
84
|
- 行级评论与回复线程
|
|
47
|
-
-
|
|
48
|
-
-
|
|
85
|
+
- **任意评论可发给 AI** 作为上下文,自动修复
|
|
86
|
+
- 未读评论红点提醒,跨项目可见
|
|
87
|
+
|
|
88
|
+
### 斜杠模式 —— 切换 Agent 姿态
|
|
49
89
|
|
|
50
|
-
|
|
90
|
+
- `/qa` —— **只澄清**:复述、反问、绝不写代码
|
|
91
|
+
- `/fx` —— **只诊断**:Bug 证据链分析,绝不改文件
|
|
92
|
+
- `/review` —— 读 diff、写评审,不动手重写
|
|
93
|
+
- `/commit` —— 暂存改动、按你仓库的风格起草 message、提交
|
|
94
|
+
- **自定义**:`~/.claude/commands/` 或 `./.claude/commands/` 下任意 `*.md` 即斜杠指令
|
|
51
95
|
|
|
52
|
-
|
|
53
|
-
- 暂停/恢复、拖拽排序、结果追踪
|
|
96
|
+
### 定时任务 —— 给 AI 的 Cron
|
|
54
97
|
|
|
55
|
-
|
|
98
|
+
- 一次性、间隔、**Cron** 三种调度
|
|
99
|
+
- 暂停 / 恢复、拖拽排序,跨项目追踪结果
|
|
56
100
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
|
|
101
|
+
### Skills —— 可扩展性
|
|
102
|
+
|
|
103
|
+
- 任意 `SKILL.md` 都能教 Agent 新技能
|
|
104
|
+
- 在对话中用 `/skill-name` 直接调用
|
|
105
|
+
- 所有技能在统一 Skills 侧边栏管理
|
|
106
|
+
|
|
107
|
+
## 使用场景
|
|
108
|
+
|
|
109
|
+
- **独立开发者多仓并行:** "API 在重构、Web 在写测试、Pipeline 在排 bug —— 同时跑、同时可见。"
|
|
110
|
+
- **二人小团队:** Senior 用局域网共享评审页 review,半成品代码不用绕 GitHub PR。
|
|
111
|
+
- **全栈杂活模式:** 后端 bug 一个 tab 跑 `/fx`,前端 diff 另一个 tab 跑 `/review`,最后 `/commit` 收尾 —— 三种姿态、三种 Agent 模式。
|
|
112
|
+
- **AI 自动化 QA:** 浏览器气泡 + 定时任务 = "每晚 2 点跑一遍 UI 冒烟流程并发摘要"。
|
|
113
|
+
- **隐私敏感代码:** 在你的笔记本上跑,仅与你 `claude` CLI 已配置的 Claude API 通信。无遥测、无中转。
|
|
63
114
|
|
|
64
115
|
## 在线体验
|
|
65
116
|
|
|
66
|
-
|
|
117
|
+
无需安装,只读沙盒(5 分钟):
|
|
67
118
|
|
|
68
|
-
[](https://cocking.cc/try)
|
|
69
120
|
|
|
70
121
|
## 前置依赖
|
|
71
122
|
|
|
72
|
-
- **Node.js ≥ 20**
|
|
73
|
-
- **Claude Code**
|
|
74
|
-
- **Git**
|
|
75
|
-
- **Chrome**
|
|
123
|
+
- **Node.js ≥ 20** —— [nodejs.org](https://nodejs.org/)
|
|
124
|
+
- **Claude Code** —— [docs.anthropic.com/en/docs/claude-code](https://docs.anthropic.com/en/docs/claude-code)
|
|
125
|
+
- **Git** —— 用于 Git 相关功能(blame、diff、worktree 等)
|
|
126
|
+
- **Chrome** *(可选)* —— 浏览器气泡需安装 `~/.cockpit/chrome-extension` 中的扩展
|
|
76
127
|
|
|
77
128
|
## 安装
|
|
78
129
|
|
|
79
130
|
```bash
|
|
80
131
|
npm install -g @surething/cockpit
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
132
|
+
cockpit # 启动驾驶舱 → http://localhost:3457
|
|
133
|
+
cockpit . # 打开当前目录为项目
|
|
134
|
+
cockpit ~/my-project # 打开指定目录
|
|
135
|
+
cockpit -h # 帮助
|
|
85
136
|
```
|
|
86
137
|
|
|
138
|
+
> `cockpit`(完整名)和 `cock`(短别名)都随包安装 —— 任选其一。文档与示例统一使用 `cockpit`,老用户的肌肉记忆 `cock` 仍然好使。
|
|
139
|
+
|
|
87
140
|
### 从源码安装
|
|
88
141
|
|
|
89
142
|
```bash
|
|
90
143
|
git clone https://github.com/Surething-io/cockpit.git
|
|
91
144
|
cd cockpit
|
|
92
145
|
npm install
|
|
93
|
-
npm run setup # 构建 + npm link(注册 cock 命令)
|
|
146
|
+
npm run setup # 构建 + npm link(注册 `cockpit` 与 `cock` 命令)
|
|
94
147
|
```
|
|
95
148
|
|
|
96
149
|
## CLI
|
|
97
150
|
|
|
98
151
|
```bash
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
152
|
+
cockpit browser <id> snapshot # 获取页面元素树
|
|
153
|
+
cockpit browser <id> click <uid> # 点击元素
|
|
154
|
+
cockpit terminal <id> exec "ls" # 执行命令
|
|
155
|
+
cockpit terminal <id> output # 获取终端输出
|
|
103
156
|
```
|
|
104
157
|
|
|
158
|
+
## 与同类产品对比
|
|
159
|
+
|
|
160
|
+
| | 裸 Claude Code CLI | IDE 插件(Cursor、Continue)| Aider TUI | **Cockpit** |
|
|
161
|
+
|---|---|---|---|---|
|
|
162
|
+
| 多项目并行 | 需 tmux | 多窗口 | 一次一个 | **一等公民** |
|
|
163
|
+
| 跨项目搜索 | grep | 各窗口独立 | 本地 | **Cmd+K** |
|
|
164
|
+
| 浏览器 / DB 控制 | ❌ | 通常 ❌ | ❌ | **✅ Bubbles** |
|
|
165
|
+
| 代码评审面 | git 工具 | PR 平台 | git | **局域网共享** |
|
|
166
|
+
| 斜杠模式 | 手动 | 各插件 | 有 | **`/qa /fx /review /commit` + 自定义** |
|
|
167
|
+
| 纯本地 / 不上云 | ✅ | 不一定 | ✅ | **✅** |
|
|
168
|
+
| 新 SDK 能力第一天可用 | ✅ | 等 | 不一定 | **✅ 官方 SDK** |
|
|
169
|
+
| 开源 | ✅ | 多数 ❌ | ✅ | **✅ MIT** |
|
|
170
|
+
|
|
171
|
+
详细对比:[Claude Code GUI 全景对比:CLI、Cursor、Aider 还是 Cockpit?](https://cocking.cc/zh/blog/claude-code-gui-comparison/)
|
|
172
|
+
|
|
173
|
+
## 阅读更多
|
|
174
|
+
|
|
175
|
+
- 📖 [如何同时跑 5 个 Claude Code 会话不疯掉](https://cocking.cc/zh/blog/parallel-claude-code-sessions/)
|
|
176
|
+
- 📖 [Claude Code 斜杠模式实战:/qa、/fx、/review、/commit](https://cocking.cc/zh/blog/slash-modes-claude-code/)
|
|
177
|
+
- 📖 [完整博客](https://cocking.cc/zh/blog/)
|
|
178
|
+
- 📋 [更新日志](https://cocking.cc/zh/changelog/)
|
|
179
|
+
|
|
105
180
|
## 开发
|
|
106
181
|
|
|
107
182
|
```bash
|
|
@@ -113,4 +188,16 @@ npm run lint # ESLint
|
|
|
113
188
|
|
|
114
189
|
## 技术栈
|
|
115
190
|
|
|
116
|
-
Next.js 16 · React 19 · TypeScript · TailwindCSS · xterm.js · Shiki · i18next
|
|
191
|
+
Next.js 16 · React 19 · TypeScript · TailwindCSS · xterm.js · Shiki · i18next · Claude Agent SDK
|
|
192
|
+
|
|
193
|
+
## 贡献
|
|
194
|
+
|
|
195
|
+
欢迎 Issue 和 PR。详见 [CONTRIBUTING.md](CONTRIBUTING.md) 与 [GUIDE.md](GUIDE.md)。
|
|
196
|
+
|
|
197
|
+
## 许可证
|
|
198
|
+
|
|
199
|
+
[MIT](LICENSE) © Surething
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
<sub>如果 Cockpit 今天给你省了 10 分钟,给一颗 ⭐️ 是我们最实惠的"谢谢"。</sub>
|
package/bin/cock-browser.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* cockpit browser <id> <action> [args...]
|
|
5
5
|
*
|
|
6
6
|
* CLI entry point: parse arguments, send commands to browser bubble via HTTP API, print results.
|
|
7
7
|
*
|
|
8
8
|
* Usage examples:
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
9
|
+
* cockpit browser abcd snapshot
|
|
10
|
+
* cockpit browser abcd navigate --url https://example.com
|
|
11
|
+
* cockpit browser abcd click --ref e5
|
|
12
|
+
* cockpit browser abcd type --ref e3 --text "hello"
|
|
13
|
+
* cockpit browser abcd evaluate --js "return document.title"
|
|
14
|
+
* cockpit browser abcd evaluate --all-frames --js "return document.title"
|
|
15
|
+
* cockpit browser abcd console --level error
|
|
16
|
+
* cockpit browser abcd network --status 4xx,5xx
|
|
17
|
+
* cockpit browser abcd assert --ref e5 --visible true
|
|
18
|
+
* cockpit browser abcd perf --metric timing
|
|
19
|
+
* cockpit browser abcd list (list all connected browsers)
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
const args = process.argv.slice(2);
|
|
@@ -26,7 +26,7 @@ const args = process.argv.slice(2);
|
|
|
26
26
|
function printHelp(prefix = '<id>', status = null) {
|
|
27
27
|
console.log(`Control a Chrome tab — inspect elements, navigate, interact, and debug.
|
|
28
28
|
|
|
29
|
-
Usage:
|
|
29
|
+
Usage: cockpit browser ${prefix} <action>`);
|
|
30
30
|
|
|
31
31
|
if (status) {
|
|
32
32
|
if (status.connected) {
|
|
@@ -86,16 +86,16 @@ Console & Debug:
|
|
|
86
86
|
storage [--type T] Get storage (local|session)
|
|
87
87
|
|
|
88
88
|
── Next step ──────────────────────────────────────────
|
|
89
|
-
Run \`
|
|
89
|
+
Run \`cockpit browser ${prefix} snapshot\` to inspect the page.
|
|
90
90
|
It returns an element tree with refs like [e5]. Use those
|
|
91
91
|
refs to interact: click, type, fill, hover, etc.
|
|
92
92
|
|
|
93
93
|
Example session:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
cockpit browser ${prefix} snapshot # 1. see the page
|
|
95
|
+
cockpit browser ${prefix} click e5 # 2. click a button
|
|
96
|
+
cockpit browser ${prefix} type e3 "hello" # 3. type into input
|
|
97
|
+
cockpit browser ${prefix} evaluate "document.title" # run JS
|
|
98
|
+
cockpit browser ${prefix} evaluate "await fetch('/api/data').then(r=>r.json())"
|
|
99
99
|
# fetch() inherits the browser's auth session — use it to
|
|
100
100
|
# call APIs, inspect responses, or pull data for analysis.`);
|
|
101
101
|
}
|
package/bin/cock-terminal.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* cockpit terminal <id> <action> [args...]
|
|
5
5
|
*
|
|
6
6
|
* CLI entry point: access a running terminal bubble, read output, stream in real time, send input.
|
|
7
7
|
*/
|
|
@@ -22,7 +22,7 @@ function readServerPort() {
|
|
|
22
22
|
function printHelp(prefix = '<id>', status = null) {
|
|
23
23
|
console.log(`Interact with a running terminal process — read output, stream logs, and send input.
|
|
24
24
|
|
|
25
|
-
Usage:
|
|
25
|
+
Usage: cockpit terminal ${prefix} <action>`);
|
|
26
26
|
|
|
27
27
|
if (status) {
|
|
28
28
|
if (status.running) {
|
|
@@ -41,14 +41,14 @@ Actions:
|
|
|
41
41
|
stdin <data> Send input to process
|
|
42
42
|
|
|
43
43
|
── Next step ──────────────────────────────────────────
|
|
44
|
-
Run \`
|
|
44
|
+
Run \`cockpit terminal ${prefix} output\` to read the terminal output.
|
|
45
45
|
Use \`stdin\` to send commands or input to the process.
|
|
46
46
|
|
|
47
47
|
Example session:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
cockpit terminal ${prefix} output # 1. read current output
|
|
49
|
+
cockpit terminal ${prefix} stdin "ls -la" # 2. send a command
|
|
50
|
+
cockpit terminal ${prefix} output # 3. read new output
|
|
51
|
+
cockpit terminal ${prefix} follow # stream output in real-time`);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
if (args.length === 0 || args[0] === '--help' || args[0] === '-h') {
|
|
@@ -150,7 +150,7 @@ async function run() {
|
|
|
150
150
|
if (action === 'stdin') {
|
|
151
151
|
const inputData = extraArgs.join(' ');
|
|
152
152
|
if (!inputData) {
|
|
153
|
-
console.error('Usage:
|
|
153
|
+
console.error('Usage: cockpit terminal <id> stdin <data>');
|
|
154
154
|
process.exit(1);
|
|
155
155
|
}
|
|
156
156
|
try {
|