@epiphytic/claudecodeui 1.0.0

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.
Files changed (142) hide show
  1. package/LICENSE +675 -0
  2. package/README.md +414 -0
  3. package/dist/api-docs.html +879 -0
  4. package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  5. package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  6. package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  7. package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  8. package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  9. package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  10. package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  11. package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  12. package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  13. package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  14. package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  15. package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  16. package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  17. package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  18. package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  19. package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  20. package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  21. package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  22. package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  23. package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  24. package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  25. package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  26. package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  27. package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  28. package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  29. package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  30. package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  31. package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  32. package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  33. package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  34. package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  35. package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  36. package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  37. package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  38. package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  39. package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  40. package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  41. package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  42. package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  43. package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  44. package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  45. package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  46. package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  47. package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  48. package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  49. package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  50. package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  51. package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  52. package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  53. package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  54. package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  55. package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  56. package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  57. package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  58. package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  59. package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  60. package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  61. package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  62. package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  63. package/dist/assets/index-DfR9xEkp.css +32 -0
  64. package/dist/assets/index-DvlVn6Eb.js +1231 -0
  65. package/dist/assets/vendor-codemirror-CJLzwpLB.js +39 -0
  66. package/dist/assets/vendor-react-DcyRfQm3.js +59 -0
  67. package/dist/assets/vendor-xterm-DfaPXD3y.js +66 -0
  68. package/dist/clear-cache.html +85 -0
  69. package/dist/convert-icons.md +53 -0
  70. package/dist/favicon.png +0 -0
  71. package/dist/favicon.svg +9 -0
  72. package/dist/generate-icons.js +49 -0
  73. package/dist/icons/claude-ai-icon.svg +1 -0
  74. package/dist/icons/codex-white.svg +3 -0
  75. package/dist/icons/codex.svg +3 -0
  76. package/dist/icons/cursor-white.svg +12 -0
  77. package/dist/icons/cursor.svg +1 -0
  78. package/dist/icons/generate-icons.md +19 -0
  79. package/dist/icons/icon-128x128.png +0 -0
  80. package/dist/icons/icon-128x128.svg +12 -0
  81. package/dist/icons/icon-144x144.png +0 -0
  82. package/dist/icons/icon-144x144.svg +12 -0
  83. package/dist/icons/icon-152x152.png +0 -0
  84. package/dist/icons/icon-152x152.svg +12 -0
  85. package/dist/icons/icon-192x192.png +0 -0
  86. package/dist/icons/icon-192x192.svg +12 -0
  87. package/dist/icons/icon-384x384.png +0 -0
  88. package/dist/icons/icon-384x384.svg +12 -0
  89. package/dist/icons/icon-512x512.png +0 -0
  90. package/dist/icons/icon-512x512.svg +12 -0
  91. package/dist/icons/icon-72x72.png +0 -0
  92. package/dist/icons/icon-72x72.svg +12 -0
  93. package/dist/icons/icon-96x96.png +0 -0
  94. package/dist/icons/icon-96x96.svg +12 -0
  95. package/dist/icons/icon-template.svg +12 -0
  96. package/dist/index.html +52 -0
  97. package/dist/logo-128.png +0 -0
  98. package/dist/logo-256.png +0 -0
  99. package/dist/logo-32.png +0 -0
  100. package/dist/logo-512.png +0 -0
  101. package/dist/logo-64.png +0 -0
  102. package/dist/logo.svg +17 -0
  103. package/dist/manifest.json +61 -0
  104. package/dist/screenshots/cli-selection.png +0 -0
  105. package/dist/screenshots/desktop-main.png +0 -0
  106. package/dist/screenshots/mobile-chat.png +0 -0
  107. package/dist/screenshots/tools-modal.png +0 -0
  108. package/dist/sw.js +107 -0
  109. package/package.json +120 -0
  110. package/server/claude-sdk.js +721 -0
  111. package/server/cli.js +469 -0
  112. package/server/cursor-cli.js +267 -0
  113. package/server/database/db.js +554 -0
  114. package/server/database/init.sql +54 -0
  115. package/server/index.js +2120 -0
  116. package/server/middleware/auth.js +161 -0
  117. package/server/openai-codex.js +389 -0
  118. package/server/orchestrator/client.js +989 -0
  119. package/server/orchestrator/github-auth.js +308 -0
  120. package/server/orchestrator/index.js +216 -0
  121. package/server/orchestrator/protocol.js +299 -0
  122. package/server/orchestrator/proxy.js +364 -0
  123. package/server/orchestrator/status-tracker.js +226 -0
  124. package/server/projects.js +1604 -0
  125. package/server/routes/agent.js +1230 -0
  126. package/server/routes/auth.js +135 -0
  127. package/server/routes/cli-auth.js +341 -0
  128. package/server/routes/codex.js +345 -0
  129. package/server/routes/commands.js +521 -0
  130. package/server/routes/cursor.js +795 -0
  131. package/server/routes/git.js +1128 -0
  132. package/server/routes/mcp-utils.js +48 -0
  133. package/server/routes/mcp.js +650 -0
  134. package/server/routes/projects.js +378 -0
  135. package/server/routes/settings.js +178 -0
  136. package/server/routes/taskmaster.js +1963 -0
  137. package/server/routes/user.js +106 -0
  138. package/server/utils/commandParser.js +303 -0
  139. package/server/utils/gitConfig.js +24 -0
  140. package/server/utils/mcp-detector.js +198 -0
  141. package/server/utils/taskmaster-websocket.js +129 -0
  142. package/shared/modelConstants.js +65 -0
package/dist/sw.js ADDED
@@ -0,0 +1,107 @@
1
+ // Service Worker for Claude Code UI PWA
2
+ // Supports both direct access and orchestrator proxy access via proxyBase parameter
3
+
4
+ const CACHE_NAME = "claude-ui-v1";
5
+
6
+ // Extract proxyBase from the service worker URL query string
7
+ // e.g., sw.js?proxyBase=/clients/badal-laptop/proxy
8
+ const swUrl = new URL(self.location.href);
9
+ const proxyBase = swUrl.searchParams.get("proxyBase") || "";
10
+
11
+ // URLs to cache (root-relative, without proxyBase)
12
+ const urlsToCache = ["/", "/index.html", "/manifest.json"];
13
+
14
+ // Normalize a URL by removing the proxyBase prefix if present
15
+ // This allows us to use consistent cache keys regardless of access path
16
+ function normalizeUrl(url) {
17
+ if (!proxyBase) return url;
18
+
19
+ try {
20
+ const urlObj = new URL(url);
21
+ let pathname = urlObj.pathname;
22
+
23
+ // Remove proxyBase prefix if present
24
+ if (pathname.startsWith(proxyBase)) {
25
+ pathname = pathname.slice(proxyBase.length) || "/";
26
+ }
27
+
28
+ return pathname + urlObj.search;
29
+ } catch {
30
+ // If URL parsing fails, try string manipulation
31
+ if (url.startsWith(proxyBase)) {
32
+ return url.slice(proxyBase.length) || "/";
33
+ }
34
+ return url;
35
+ }
36
+ }
37
+
38
+ // Add proxyBase prefix to a root-relative URL
39
+ function denormalizeUrl(url) {
40
+ if (!proxyBase) return url;
41
+ if (url.startsWith("/")) {
42
+ return proxyBase + url;
43
+ }
44
+ return url;
45
+ }
46
+
47
+ // Install event
48
+ self.addEventListener("install", (event) => {
49
+ event.waitUntil(
50
+ caches.open(CACHE_NAME).then((cache) => {
51
+ // Cache URLs with proxyBase prefix if needed
52
+ const urlsWithBase = urlsToCache.map((url) => denormalizeUrl(url));
53
+ return cache.addAll(urlsWithBase);
54
+ }),
55
+ );
56
+ self.skipWaiting();
57
+ });
58
+
59
+ // Fetch event
60
+ self.addEventListener("fetch", (event) => {
61
+ event.respondWith(
62
+ (async () => {
63
+ const request = event.request;
64
+ const normalizedUrl = normalizeUrl(request.url);
65
+
66
+ // Try to find a cached response using the normalized URL
67
+ const cache = await caches.open(CACHE_NAME);
68
+
69
+ // First try exact match
70
+ let response = await cache.match(request);
71
+
72
+ // If no exact match and we have a proxyBase, try matching with/without it
73
+ if (!response && proxyBase) {
74
+ // Try the denormalized version (with proxyBase)
75
+ const denormalizedUrl = denormalizeUrl(normalizedUrl);
76
+ response = await cache.match(new Request(denormalizedUrl));
77
+
78
+ // Also try the normalized version (without proxyBase)
79
+ if (!response) {
80
+ response = await cache.match(new Request(normalizedUrl));
81
+ }
82
+ }
83
+
84
+ if (response) {
85
+ return response;
86
+ }
87
+
88
+ // Otherwise fetch from network
89
+ return fetch(request);
90
+ })(),
91
+ );
92
+ });
93
+
94
+ // Activate event
95
+ self.addEventListener("activate", (event) => {
96
+ event.waitUntil(
97
+ caches.keys().then((cacheNames) => {
98
+ return Promise.all(
99
+ cacheNames.map((cacheName) => {
100
+ if (cacheName !== CACHE_NAME) {
101
+ return caches.delete(cacheName);
102
+ }
103
+ }),
104
+ );
105
+ }),
106
+ );
107
+ });
package/package.json ADDED
@@ -0,0 +1,120 @@
1
+ {
2
+ "name": "@epiphytic/claudecodeui",
3
+ "version": "1.0.0",
4
+ "description": "A web-based UI for Claude Code CLI",
5
+ "type": "module",
6
+ "main": "server/index.js",
7
+ "bin": {
8
+ "claude-code-ui": "server/cli.js",
9
+ "cloudcli": "server/cli.js"
10
+ },
11
+ "files": [
12
+ "server/",
13
+ "shared/",
14
+ "dist/",
15
+ "README.md"
16
+ ],
17
+ "homepage": "https://claudecodeui.siteboon.ai",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/Epiphytic/claudecodeui.git"
21
+ },
22
+ "bugs": {
23
+ "url": "https://github.com/Epiphytic/claudecodeui/issues"
24
+ },
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "scripts": {
29
+ "dev": "concurrently --kill-others \"npm run server\" \"npm run client\"",
30
+ "server": "node server/index.js",
31
+ "client": "vite --host",
32
+ "build": "vite build",
33
+ "preview": "vite preview",
34
+ "start": "npm run build && npm run server",
35
+ "release": "./release.sh"
36
+ },
37
+ "keywords": [
38
+ "claude coode",
39
+ "ai",
40
+ "anthropic",
41
+ "ui",
42
+ "mobile"
43
+ ],
44
+ "author": "Claude Code UI Contributors",
45
+ "license": "MIT",
46
+ "engines": {
47
+ "node": ">=18.0.0"
48
+ },
49
+ "dependencies": {
50
+ "@anthropic-ai/claude-agent-sdk": "^0.1.29",
51
+ "@codemirror/lang-css": "^6.3.1",
52
+ "@codemirror/lang-html": "^6.4.9",
53
+ "@codemirror/lang-javascript": "^6.2.4",
54
+ "@codemirror/lang-json": "^6.0.1",
55
+ "@codemirror/lang-markdown": "^6.3.3",
56
+ "@codemirror/lang-python": "^6.2.1",
57
+ "@codemirror/merge": "^6.11.1",
58
+ "@codemirror/theme-one-dark": "^6.1.2",
59
+ "@iarna/toml": "^2.2.5",
60
+ "@octokit/rest": "^22.0.0",
61
+ "@openai/codex-sdk": "^0.75.0",
62
+ "@replit/codemirror-minimap": "^0.5.2",
63
+ "@tailwindcss/typography": "^0.5.16",
64
+ "@uiw/react-codemirror": "^4.23.13",
65
+ "@xterm/addon-clipboard": "^0.1.0",
66
+ "@xterm/addon-fit": "^0.10.0",
67
+ "@xterm/addon-web-links": "^0.11.0",
68
+ "@xterm/addon-webgl": "^0.18.0",
69
+ "@xterm/xterm": "^5.5.0",
70
+ "bcrypt": "^6.0.0",
71
+ "better-sqlite3": "^12.2.0",
72
+ "chokidar": "^4.0.3",
73
+ "class-variance-authority": "^0.7.1",
74
+ "clsx": "^2.1.1",
75
+ "cors": "^2.8.5",
76
+ "cross-spawn": "^7.0.3",
77
+ "express": "^4.18.2",
78
+ "fuse.js": "^7.0.0",
79
+ "gray-matter": "^4.0.3",
80
+ "jsonwebtoken": "^9.0.2",
81
+ "katex": "^0.16.25",
82
+ "lucide-react": "^0.515.0",
83
+ "mime-types": "^3.0.1",
84
+ "multer": "^2.0.1",
85
+ "node-fetch": "^2.7.0",
86
+ "node-pty": "^1.1.0-beta34",
87
+ "react": "^18.2.0",
88
+ "react-dom": "^18.2.0",
89
+ "react-dropzone": "^14.2.3",
90
+ "react-markdown": "^10.1.0",
91
+ "react-router-dom": "^6.8.1",
92
+ "react-syntax-highlighter": "^15.6.1",
93
+ "rehype-katex": "^7.0.1",
94
+ "remark-gfm": "^4.0.0",
95
+ "remark-math": "^6.0.0",
96
+ "sqlite": "^5.1.1",
97
+ "sqlite3": "^5.1.7",
98
+ "tailwind-merge": "^3.3.1",
99
+ "ws": "^8.14.2"
100
+ },
101
+ "devDependencies": {
102
+ "@semantic-release/changelog": "^6.0.3",
103
+ "@semantic-release/git": "^10.0.1",
104
+ "@semantic-release/github": "^12.0.2",
105
+ "@semantic-release/npm": "^13.1.3",
106
+ "@types/react": "^18.2.43",
107
+ "@types/react-dom": "^18.2.17",
108
+ "@vitejs/plugin-react": "^4.6.0",
109
+ "auto-changelog": "^2.5.0",
110
+ "autoprefixer": "^10.4.16",
111
+ "concurrently": "^8.2.2",
112
+ "node-gyp": "^10.0.0",
113
+ "postcss": "^8.4.32",
114
+ "release-it": "^19.0.5",
115
+ "semantic-release": "^25.0.2",
116
+ "sharp": "^0.34.2",
117
+ "tailwindcss": "^3.4.0",
118
+ "vite": "^7.0.4"
119
+ }
120
+ }