upfynai-code 3.0.4 → 3.2.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.
- package/README.md +69 -92
- package/bin/cli.js +191 -0
- package/dist/client/assets/AppContent-M14Au3SB.js +542 -0
- package/{client/dist/assets/BrowserPanel-0TLEl-IC.js → dist/client/assets/BrowserPanel-TFKm2NDJ.js} +2 -2
- package/dist/client/assets/DashboardPanel-C88HjsCh.js +1 -0
- package/dist/client/assets/FileTree-DvO1xnDE.js +1 -0
- package/{client/dist/assets/GitPanel-C_xFM-N2.js → dist/client/assets/GitPanel-D-slVlyy.js} +2 -2
- package/dist/client/assets/LoginModal-Chi4SYcr.js +21 -0
- package/{client/dist/assets/MarkdownPreview-CESjI261.js → dist/client/assets/MarkdownPreview-CuIix2u9.js} +1 -1
- package/dist/client/assets/MermaidBlock-Dq9uFv82.js +2 -0
- package/dist/client/assets/Onboarding-QYXx24dX.js +1 -0
- package/{client/dist/assets/PreviewPanel-CqCa92Tf.js → dist/client/assets/PreviewPanel-Dd8q-jo0.js} +1 -1
- package/dist/client/assets/SetupForm-CrspaUva.js +1 -0
- package/dist/client/assets/WorkflowsPanel-DIlYAdhB.js +1 -0
- package/dist/client/assets/index-CnNNzw9A.css +1 -0
- package/{client/dist/assets/index-HaY-3pK1.js → dist/client/assets/index-rUkK9FDP.js} +26 -26
- package/{client/dist/assets/vendor-codemirror-D2ALgpaX.js → dist/client/assets/vendor-codemirror-jc6nyJQg.js} +1 -1
- package/{client/dist/assets/vendor-diff-DNQpbhrT.js → dist/client/assets/vendor-diff-THJmAcEI.js} +1 -1
- package/{client/dist/assets/vendor-icons-GyYE35HP.js → dist/client/assets/vendor-icons-CfjIpdrD.js} +145 -155
- package/{client/dist/assets/vendor-markdown-CimbIo6Y.js → dist/client/assets/vendor-markdown-Cdm6NEGf.js} +1 -1
- package/dist/client/assets/vendor-mermaid-DTPaBx-U.js +2559 -0
- package/{client/dist/assets/vendor-react-96lCPsRK.js → dist/client/assets/vendor-react-wFkb6mSf.js} +1 -1
- package/{client/dist/assets/vendor-syntax-LS_Nt30I.js → dist/client/assets/vendor-syntax-C_UZR7tc.js} +1 -1
- package/dist/client/favicon.png +0 -0
- package/dist/client/icons/icon-128x128.png +0 -0
- package/dist/client/icons/icon-144x144.png +0 -0
- package/dist/client/icons/icon-152x152.png +0 -0
- package/dist/client/icons/icon-192x192.png +0 -0
- package/dist/client/icons/icon-384x384.png +0 -0
- package/dist/client/icons/icon-512x512.png +0 -0
- package/dist/client/icons/icon-72x72.png +0 -0
- package/dist/client/icons/icon-96x96.png +0 -0
- package/{client/dist → dist/client}/index.html +37 -36
- package/dist/client/logo-128.png +0 -0
- package/dist/client/logo-256.png +0 -0
- package/dist/client/logo-32.png +0 -0
- package/dist/client/logo-512.png +0 -0
- package/dist/client/logo-64.png +0 -0
- package/dist/client/logo.png +0 -0
- package/{client/dist → dist/client}/manifest.json +12 -12
- package/{client/dist → dist/client}/mcp-docs.html +1 -1
- package/{client/dist → dist/client}/sw.js +2 -2
- package/package.json +56 -105
- package/scripts/postinstall.js +9 -0
- package/scripts/prepublish.js +77 -0
- package/src/animation.js +228 -0
- package/src/auth.js +142 -0
- package/src/config.js +40 -0
- package/src/connect.js +416 -0
- package/src/launch.js +81 -0
- package/src/mcp.js +57 -0
- package/src/permissions.js +140 -0
- package/src/persistent-shell.js +261 -0
- package/src/server.js +54 -0
- package/client/dist/assets/AppContent-CwrTP6TW.js +0 -545
- package/client/dist/assets/CanvasFullScreen-D1GWQsGL.js +0 -1
- package/client/dist/assets/CanvasWorkspace-D7ORj358.js +0 -163
- package/client/dist/assets/DashboardPanel-BV7ybUDe.js +0 -1
- package/client/dist/assets/FileTree-5qfhBqdE.js +0 -1
- package/client/dist/assets/LoginModal-CImJHRjX.js +0 -13
- package/client/dist/assets/MermaidBlock-BFM21cwe.js +0 -2
- package/client/dist/assets/Onboarding-B3cteLu2.js +0 -1
- package/client/dist/assets/SetupForm-P6dsYgHO.js +0 -1
- package/client/dist/assets/WorkflowsPanel-CBoN80kc.js +0 -1
- package/client/dist/assets/index-46kkVu2i.css +0 -1
- package/client/dist/assets/pdf-CE_K4jFx.js +0 -12
- package/client/dist/assets/vendor-canvas-BZV40eAE.css +0 -1
- package/client/dist/assets/vendor-canvas-DvHJ_Pn2.js +0 -49
- package/client/dist/assets/vendor-mermaid-DucWyDEe.js +0 -2556
- package/client/dist/favicon.png +0 -0
- package/client/dist/icons/icon-128x128.png +0 -0
- package/client/dist/icons/icon-144x144.png +0 -0
- package/client/dist/icons/icon-152x152.png +0 -0
- package/client/dist/icons/icon-192x192.png +0 -0
- package/client/dist/icons/icon-384x384.png +0 -0
- package/client/dist/icons/icon-512x512.png +0 -0
- package/client/dist/icons/icon-72x72.png +0 -0
- package/client/dist/icons/icon-96x96.png +0 -0
- package/client/dist/logo-128.png +0 -0
- package/client/dist/logo-256.png +0 -0
- package/client/dist/logo-32.png +0 -0
- package/client/dist/logo-512.png +0 -0
- package/client/dist/logo-64.png +0 -0
- package/commands/upfynai-connect.md +0 -59
- package/commands/upfynai-disconnect.md +0 -31
- package/commands/upfynai-doctor.md +0 -99
- package/commands/upfynai-export.md +0 -49
- package/commands/upfynai-local.md +0 -82
- package/commands/upfynai-status.md +0 -75
- package/commands/upfynai-stop.md +0 -49
- package/commands/upfynai-uninstall.md +0 -58
- package/commands/upfynai.md +0 -69
- package/scripts/build-client.js +0 -17
- package/scripts/fix-node-pty.js +0 -67
- package/scripts/install-commands.js +0 -78
- package/server/agent-loop.js +0 -242
- package/server/auto-compact.js +0 -99
- package/server/browser.js +0 -131
- package/server/claude-sdk.js +0 -797
- package/server/cli-ui.js +0 -798
- package/server/cli.js +0 -751
- package/server/constants/config.js +0 -31
- package/server/cursor-cli.js +0 -270
- package/server/database/auth.db +0 -0
- package/server/database/db.js +0 -1547
- package/server/database/init.sql +0 -70
- package/server/index.js +0 -3813
- package/server/load-env.js +0 -26
- package/server/mcp-server.js +0 -621
- package/server/middleware/auth.js +0 -184
- package/server/middleware/relayHelpers.js +0 -44
- package/server/middleware/sandboxRouter.js +0 -174
- package/server/openai-codex.js +0 -403
- package/server/openrouter.js +0 -137
- package/server/projects.js +0 -1807
- package/server/provider-factory.js +0 -174
- package/server/relay-client.js +0 -390
- package/server/routes/agent.js +0 -1234
- package/server/routes/auth.js +0 -559
- package/server/routes/browser.js +0 -419
- package/server/routes/canvas.js +0 -53
- package/server/routes/cli-auth.js +0 -263
- package/server/routes/codex.js +0 -396
- package/server/routes/commands.js +0 -707
- package/server/routes/composio.js +0 -176
- package/server/routes/cursor.js +0 -770
- package/server/routes/dashboard.js +0 -295
- package/server/routes/git.js +0 -1208
- package/server/routes/keys.js +0 -34
- package/server/routes/mcp-utils.js +0 -48
- package/server/routes/mcp.js +0 -661
- package/server/routes/payments.js +0 -227
- package/server/routes/projects.js +0 -754
- package/server/routes/sessions.js +0 -146
- package/server/routes/settings.js +0 -261
- package/server/routes/taskmaster.js +0 -1928
- package/server/routes/user.js +0 -106
- package/server/routes/vapi-chat.js +0 -624
- package/server/routes/voice.js +0 -235
- package/server/routes/webhooks.js +0 -166
- package/server/routes/workflows.js +0 -312
- package/server/sandbox.js +0 -120
- package/server/services/browser-ai.js +0 -154
- package/server/services/composio.js +0 -204
- package/server/services/sessionRegistry.js +0 -139
- package/server/services/whisperService.js +0 -84
- package/server/services/workflowScheduler.js +0 -211
- package/server/tests/relay-flow.test.js +0 -570
- package/server/tests/sessions.test.js +0 -259
- package/server/utils/commandParser.js +0 -303
- package/server/utils/email.js +0 -66
- package/server/utils/gitConfig.js +0 -24
- package/server/utils/mcp-detector.js +0 -198
- package/server/utils/taskmaster-websocket.js +0 -129
- package/shared/integrationCatalog.d.ts +0 -12
- package/shared/integrationCatalog.js +0 -172
- package/shared/modelConstants.js +0 -96
- /package/{shared → dist}/agents/claude.js +0 -0
- /package/{shared → dist}/agents/codex.js +0 -0
- /package/{shared → dist}/agents/cursor.js +0 -0
- /package/{shared → dist}/agents/detect.js +0 -0
- /package/{shared → dist}/agents/exec.js +0 -0
- /package/{shared → dist}/agents/files.js +0 -0
- /package/{shared → dist}/agents/git.js +0 -0
- /package/{shared → dist}/agents/gitagent.js +0 -0
- /package/{shared → dist}/agents/index.js +0 -0
- /package/{shared → dist}/agents/shell.js +0 -0
- /package/{shared → dist}/agents/utils.js +0 -0
- /package/{client/dist → dist/client}/api-docs.html +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- /package/{client/dist → dist/client}/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- /package/{client/dist → dist/client}/assets/vendor-i18n-DCFGyhQR.js +0 -0
- /package/{client/dist → dist/client}/assets/vendor-xterm-CZq1hqo1.js +0 -0
- /package/{client/dist → dist/client}/assets/vendor-xterm-qxJ8_QYu.css +0 -0
- /package/{client/dist → dist/client}/clear-cache.html +0 -0
- /package/{client/dist → dist/client}/convert-icons.md +0 -0
- /package/{client/dist → dist/client}/favicon.svg +0 -0
- /package/{client/dist → dist/client}/generate-icons.js +0 -0
- /package/{client/dist → dist/client}/icons/claude-ai-icon.svg +0 -0
- /package/{client/dist → dist/client}/icons/codex-white.svg +0 -0
- /package/{client/dist → dist/client}/icons/codex.svg +0 -0
- /package/{client/dist → dist/client}/icons/cursor-white.svg +0 -0
- /package/{client/dist → dist/client}/icons/cursor.svg +0 -0
- /package/{client/dist → dist/client}/icons/icon-128x128.svg +0 -0
- /package/{client/dist → dist/client}/icons/icon-144x144.svg +0 -0
- /package/{client/dist → dist/client}/icons/icon-152x152.svg +0 -0
- /package/{client/dist → dist/client}/icons/icon-192x192.svg +0 -0
- /package/{client/dist → dist/client}/icons/icon-384x384.svg +0 -0
- /package/{client/dist → dist/client}/icons/icon-512x512.svg +0 -0
- /package/{client/dist → dist/client}/icons/icon-72x72.svg +0 -0
- /package/{client/dist → dist/client}/icons/icon-96x96.svg +0 -0
- /package/{client/dist → dist/client}/icons/icon-template.svg +0 -0
- /package/{client/dist → dist/client}/logo.svg +0 -0
- /package/{client/dist → dist/client}/offline.html +0 -0
- /package/{client/dist → dist/client}/screenshots/cli-selection.png +0 -0
- /package/{client/dist → dist/client}/screenshots/desktop-main.png +0 -0
- /package/{client/dist → dist/client}/screenshots/mobile-chat.png +0 -0
- /package/{client/dist → dist/client}/screenshots/tools-modal.png +0 -0
- /package/{shared → dist}/gitagent/index.js +0 -0
- /package/{shared → dist}/gitagent/parser.js +0 -0
- /package/{shared → dist}/gitagent/prompt-builder.js +0 -0
package/README.md
CHANGED
|
@@ -1,131 +1,108 @@
|
|
|
1
|
-
#
|
|
1
|
+
# upfynai-code
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> CLI bridge for the Upfyn ecosystem — connect your machine to code.upfyn.com and control it from any browser, phone, or tablet.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Upfyn-Code CLI** connects your local development machine to the Upfyn web IDE through a secure WebSocket relay. Write code with AI assistance (Plan/Code/Analyse modes), run shell commands, manage files, and handle git — all from any device.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Your source code **never leaves your machine**. All file operations, terminal commands, and git actions execute locally.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
> **Prefer a GUI?** Download [Upfyn Code Desktop](https://code.upfyn.com/desktop) — same functionality with a native app that auto-connects on login.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Install
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- **Visual Canvas** — Infinite whiteboard with AI-powered blocks (Chat, Research, Code, Notes, PDF, Dashboard)
|
|
17
|
-
- **Integrated Terminal** — Multi-tab shell with full ANSI color support
|
|
18
|
-
- **File Explorer** — Browse, edit, and manage project files
|
|
19
|
-
- **Git Panel** — Stage, commit, push, view diffs, switch branches
|
|
20
|
-
- **Voice Assistant** — Talk to Upfyn hands-free
|
|
21
|
-
- **Task Tracker** — AI-powered task breakdown from PRDs
|
|
22
|
-
- **MCP Protocol** — Connect to Claude Code, Cursor, or any MCP-compatible tool
|
|
23
|
-
- **Dashboard** — Session analytics, usage stats, and getting-started guide
|
|
24
|
-
- **BYOK** — Bring Your Own API Key (Anthropic, OpenAI, Google, OpenRouter)
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Two ways to use it
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g upfynai-code
|
|
15
|
+
```
|
|
29
16
|
|
|
30
|
-
|
|
17
|
+
**Requirements:** Node.js 18 or later. Works on Windows, macOS, and Linux.
|
|
31
18
|
|
|
32
|
-
|
|
19
|
+
## Quick Start
|
|
33
20
|
|
|
34
21
|
```bash
|
|
35
|
-
|
|
22
|
+
# 1. Authenticate with your Upfyn account
|
|
23
|
+
uc login
|
|
36
24
|
|
|
37
|
-
#
|
|
38
|
-
uc
|
|
25
|
+
# 2. Connect your machine to the web interface
|
|
26
|
+
uc connect
|
|
39
27
|
|
|
40
|
-
# Or start the
|
|
28
|
+
# 3. Or start the local UI server
|
|
41
29
|
uc start
|
|
42
30
|
```
|
|
43
31
|
|
|
44
|
-
|
|
32
|
+
Once connected, open [code.upfyn.com](https://code.upfyn.com) on any device to access your full development environment.
|
|
45
33
|
|
|
46
|
-
|
|
47
|
-
- Full web UI with all features (chat, canvas, terminal, git, files, tasks)
|
|
48
|
-
- Direct SDK calls to your local Claude Code / Codex / Cursor
|
|
49
|
-
- No network round-trip — everything runs on your machine
|
|
50
|
-
- Works offline (except AI queries which need API access)
|
|
34
|
+
## Commands
|
|
51
35
|
|
|
52
|
-
|
|
36
|
+
| Command | Description |
|
|
37
|
+
|---------|-------------|
|
|
38
|
+
| `uc` | Start local server with web UI |
|
|
39
|
+
| `uc start` | Start the web UI server (same as `uc`) |
|
|
40
|
+
| `uc connect` | Connect your machine to code.upfyn.com |
|
|
41
|
+
| `uc login` | Authenticate with your Upfyn account |
|
|
42
|
+
| `uc logout` | Clear saved credentials |
|
|
43
|
+
| `uc mcp` | Show MCP integration config for Claude/Cursor |
|
|
44
|
+
| `uc config` | View or set configuration |
|
|
53
45
|
|
|
54
|
-
|
|
46
|
+
## The Ecosystem
|
|
55
47
|
|
|
56
|
-
|
|
57
|
-
# 1. Sign up at cli.upfyn.com and get your relay token
|
|
58
|
-
# 2. Connect your machine
|
|
59
|
-
uc connect --server https://cli.upfyn.com --key upfyn_your_token
|
|
60
|
-
```
|
|
48
|
+
Upfyn-Code is part of a three-part ecosystem:
|
|
61
49
|
|
|
62
|
-
|
|
50
|
+
1. **Desktop App** (Tauri + Rust) — Native app with full local access, auto-connects to cloud
|
|
51
|
+
2. **Web App** (code.upfyn.com) — Browser IDE with AI chat, terminal, files, git
|
|
52
|
+
3. **CLI** (this package) — Lightweight bridge for users who prefer the terminal
|
|
63
53
|
|
|
64
|
-
|
|
65
|
-
- An active subscription at [cli.upfyn.com/pricing](https://cli.upfyn.com/pricing)
|
|
66
|
-
- Your relay token (provided after signup)
|
|
67
|
-
- The CLI installed on your machine
|
|
54
|
+
All three connect to the same cloud relay. Use whichever fits your workflow — they're interchangeable.
|
|
68
55
|
|
|
69
|
-
|
|
70
|
-
- Access your dev environment from any device (phone, tablet, another PC)
|
|
71
|
-
- MCP API access — connect Claude Code or Cursor to Upfyn-Code remotely
|
|
72
|
-
- Voice assistant with daily call allowance
|
|
73
|
-
- Priority support
|
|
56
|
+
## AI Modes
|
|
74
57
|
|
|
75
|
-
|
|
58
|
+
The web app supports three AI modes that change how the agent works:
|
|
76
59
|
|
|
77
|
-
|
|
60
|
+
- **Plan** — Explores codebase and designs an approach before writing code
|
|
61
|
+
- **Code** — Default. Reads, writes, and refactors code directly
|
|
62
|
+
- **Analyse** — Read-only. Explains and reviews code without changes
|
|
78
63
|
|
|
79
|
-
|
|
80
|
-
|---------|-------------|
|
|
81
|
-
| `uc` | Launch Claude Code with Upfyn web UI |
|
|
82
|
-
| `uc start` | Start the local web server only |
|
|
83
|
-
| `uc connect --key <token>` | Connect to cli.upfyn.com (subscription required) |
|
|
84
|
-
| `uc config --api-key <key>` | Save your Anthropic API key |
|
|
85
|
-
| `uc status` | Show configuration and data locations |
|
|
86
|
-
| `uc install-commands` | Install `/upfynai-*` slash commands for Claude Code |
|
|
87
|
-
| `uc update` | Update to latest version |
|
|
88
|
-
| `uc help` | Show all commands |
|
|
64
|
+
## Features
|
|
89
65
|
|
|
90
|
-
|
|
66
|
+
### AI Chat
|
|
67
|
+
Multi-model AI chat with Plan/Code/Analyse modes. Supports Claude, Codex, and BYOK providers.
|
|
91
68
|
|
|
92
|
-
|
|
69
|
+
### Integrated Terminal
|
|
70
|
+
Full PTY terminal emulation from the browser. Run any command on your connected machine.
|
|
93
71
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
| `/upfynai-connect` | Connect CLI session to web UI |
|
|
97
|
-
| `/upfynai-disconnect` | Disconnect from web UI |
|
|
98
|
-
| `/upfynai-status` | Show connection status |
|
|
99
|
-
| `/upfynai-doctor` | Run diagnostics |
|
|
72
|
+
### File Explorer
|
|
73
|
+
Browse, edit, and manage project files remotely with syntax highlighting.
|
|
100
74
|
|
|
101
|
-
|
|
75
|
+
### Git Management
|
|
76
|
+
Visual git interface — commits, branches, diffs, merges, and conflict resolution.
|
|
102
77
|
|
|
103
|
-
|
|
78
|
+
### MCP Protocol
|
|
79
|
+
Use Upfyn-Code as an MCP server with Claude Desktop, Cursor, and other compatible tools.
|
|
104
80
|
|
|
105
|
-
|
|
106
|
-
- **OpenAI** — GPT models
|
|
107
|
-
- **OpenRouter** — 200+ models from all providers
|
|
108
|
-
- **Google AI** — Gemini models
|
|
81
|
+
## How It Works
|
|
109
82
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
uc
|
|
113
|
-
|
|
83
|
+
1. **Install** the CLI on your development machine
|
|
84
|
+
2. **Login** with `uc login` — authenticates once, saves credentials
|
|
85
|
+
3. **Connect** with `uc connect` — creates a secure WebSocket relay
|
|
86
|
+
4. **Open** [code.upfyn.com](https://code.upfyn.com) on any browser (desktop, tablet, or mobile)
|
|
114
87
|
|
|
115
|
-
|
|
88
|
+
No ports are exposed and no firewall configuration is needed.
|
|
116
89
|
|
|
117
|
-
|
|
118
|
-
- At least one AI agent installed:
|
|
119
|
-
```bash
|
|
120
|
-
npm install -g @anthropic-ai/claude-code # Claude Code
|
|
121
|
-
npm install -g @openai/codex # OpenAI Codex
|
|
122
|
-
# Cursor — install from cursor.com
|
|
123
|
-
```
|
|
90
|
+
## Security
|
|
124
91
|
|
|
125
|
-
|
|
92
|
+
- All communication encrypted via WSS (TLS)
|
|
93
|
+
- Source code **never stored** on servers — relay only
|
|
94
|
+
- Secure JWT authentication with automatic session management
|
|
95
|
+
- IP pinning prevents session hijacking
|
|
126
96
|
|
|
127
|
-
|
|
97
|
+
## Links
|
|
98
|
+
|
|
99
|
+
- **Website:** [code.upfyn.com](https://code.upfyn.com)
|
|
100
|
+
- **Desktop App:** [code.upfyn.com/desktop](https://code.upfyn.com/desktop)
|
|
101
|
+
- **Documentation:** [code.upfyn.com/docs](https://code.upfyn.com/docs)
|
|
102
|
+
- **GitHub:** [github.com/AnitChaudhry/UpfynAI-Code](https://github.com/AnitChaudhry/UpfynAI-Code)
|
|
128
103
|
|
|
129
104
|
## License
|
|
130
105
|
|
|
131
|
-
GPL-3.0 —
|
|
106
|
+
GPL-3.0 — see [LICENSE](https://github.com/AnitChaudhry/UpfynAI-Code/blob/main/LICENSE) for details.
|
|
107
|
+
|
|
108
|
+
Built by [Thinqmesh Technologies](https://code.upfyn.com).
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { Command } from 'commander';
|
|
4
|
+
import { readFileSync } from 'fs';
|
|
5
|
+
import { dirname, join } from 'path';
|
|
6
|
+
import { fileURLToPath } from 'url';
|
|
7
|
+
import { login, logout, status, getToken, validateToken } from '../src/auth.js';
|
|
8
|
+
import { openHosted, startLocal } from '../src/launch.js';
|
|
9
|
+
import { connect } from '../src/connect.js';
|
|
10
|
+
import { mcp } from '../src/mcp.js';
|
|
11
|
+
import { readConfig, writeConfig, clearConfig, DEFAULTS, displayUrl } from '../src/config.js';
|
|
12
|
+
import chalk from 'chalk';
|
|
13
|
+
|
|
14
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8'));
|
|
16
|
+
|
|
17
|
+
const program = new Command();
|
|
18
|
+
|
|
19
|
+
program
|
|
20
|
+
.name('uc')
|
|
21
|
+
.description('Upfyn-Code — AI coding environment for your terminal')
|
|
22
|
+
.version(pkg.version)
|
|
23
|
+
.action(async () => {
|
|
24
|
+
// Default: start local server (no login needed)
|
|
25
|
+
await startLocal();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// ── Web subcommand group ──────────────────────────────────────────
|
|
29
|
+
const web = program
|
|
30
|
+
.command('web')
|
|
31
|
+
.description('Web UI commands — connect local machine to code.upfyn.com');
|
|
32
|
+
|
|
33
|
+
web
|
|
34
|
+
.command('connect [token]')
|
|
35
|
+
.description('Connect this machine to the web UI (uses saved token from login, or provide one)')
|
|
36
|
+
.option('--server <url>', 'Server URL (default: Upfyn Cloud)')
|
|
37
|
+
.action(async (token, options) => {
|
|
38
|
+
await connect({ key: token || undefined, server: options.server });
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
web
|
|
42
|
+
.command('open')
|
|
43
|
+
.description('Open the hosted web UI in your browser')
|
|
44
|
+
.action(async () => {
|
|
45
|
+
await openHosted();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
web
|
|
49
|
+
.command('status')
|
|
50
|
+
.description('Show web connection status')
|
|
51
|
+
.action(async () => {
|
|
52
|
+
await status();
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
web
|
|
56
|
+
.command('token')
|
|
57
|
+
.description('Show the saved relay token')
|
|
58
|
+
.action(() => {
|
|
59
|
+
const config = readConfig();
|
|
60
|
+
if (!config.relayKey) {
|
|
61
|
+
console.log(chalk.yellow('\n No relay token saved. Run `uc login` first.\n'));
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const masked = `${config.relayKey.slice(0, 10)}...${config.relayKey.slice(-6)}`;
|
|
65
|
+
console.log(chalk.bold('\n Relay Token\n'));
|
|
66
|
+
console.log(` Token: ${chalk.cyan(masked)}`);
|
|
67
|
+
console.log(chalk.dim(` Full: ${config.relayKey}`));
|
|
68
|
+
console.log(chalk.dim(` Server: ${displayUrl(config.serverUrl)}\n`));
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
web
|
|
72
|
+
.command('regenerate-token')
|
|
73
|
+
.description('Generate a new relay token (invalidates old one)')
|
|
74
|
+
.action(async () => {
|
|
75
|
+
const token = getToken();
|
|
76
|
+
if (!token) {
|
|
77
|
+
console.log(chalk.yellow('\n Not logged in. Run `uc login` first.\n'));
|
|
78
|
+
process.exit(1);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
console.log(chalk.dim('\n Validating session...'));
|
|
82
|
+
const user = await validateToken();
|
|
83
|
+
if (!user) {
|
|
84
|
+
console.log(chalk.yellow(' Session expired. Run `uc login` to re-authenticate.\n'));
|
|
85
|
+
process.exit(1);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
console.log(chalk.dim(' Regenerating relay token...'));
|
|
89
|
+
try {
|
|
90
|
+
const config = readConfig();
|
|
91
|
+
const res = await fetch(`${config.serverUrl}/api/auth/regenerate-token`, {
|
|
92
|
+
method: 'POST',
|
|
93
|
+
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },
|
|
94
|
+
});
|
|
95
|
+
if (!res.ok) {
|
|
96
|
+
const data = await res.json().catch(() => ({}));
|
|
97
|
+
console.log(chalk.red(`\n Failed: ${data.error || 'Unknown error'}\n`));
|
|
98
|
+
process.exit(1);
|
|
99
|
+
}
|
|
100
|
+
const data = await res.json();
|
|
101
|
+
writeConfig({ relayKey: data.token });
|
|
102
|
+
console.log(chalk.green(`\n New relay token saved.`));
|
|
103
|
+
console.log(chalk.dim(` Old token is now invalid.`));
|
|
104
|
+
console.log(chalk.cyan(`\n Run ${chalk.bold('uc web connect')} to reconnect.\n`));
|
|
105
|
+
} catch (err) {
|
|
106
|
+
console.log(chalk.red(`\n Connection error. Could not reach server.\n`));
|
|
107
|
+
process.exit(1);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// ── Auth commands ─────────────────────────────────────────────────
|
|
112
|
+
program
|
|
113
|
+
.command('login')
|
|
114
|
+
.description('Authenticate with your Upfyn account (for web UI)')
|
|
115
|
+
.option('--server <url>', 'Server URL to authenticate against')
|
|
116
|
+
.action(async (options) => {
|
|
117
|
+
await login(options);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
program
|
|
121
|
+
.command('logout')
|
|
122
|
+
.description('Clear saved credentials')
|
|
123
|
+
.action(async () => {
|
|
124
|
+
await logout();
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
// ── Connect (alias for web connect, backward compat) ─────────────
|
|
128
|
+
program
|
|
129
|
+
.command('connect')
|
|
130
|
+
.description('Connect local machine to the web UI (alias for: uc web connect)')
|
|
131
|
+
.option('--server <url>', 'Server URL to connect to')
|
|
132
|
+
.option('--key <token>', 'Connection token (optional — uses saved token from login)')
|
|
133
|
+
.action(async (options) => {
|
|
134
|
+
await connect(options);
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// ── Local server ─────────────────────────────────────────────────
|
|
138
|
+
program
|
|
139
|
+
.command('start')
|
|
140
|
+
.description('Start the local UI server (same as running `uc` with no args)')
|
|
141
|
+
.option('--port <port>', 'Port to listen on', '3001')
|
|
142
|
+
.action(async (options) => {
|
|
143
|
+
if (options.port) {
|
|
144
|
+
writeConfig({ localPort: parseInt(options.port) });
|
|
145
|
+
}
|
|
146
|
+
await startLocal();
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
// ── MCP config ───────────────────────────────────────────────────
|
|
150
|
+
program
|
|
151
|
+
.command('mcp')
|
|
152
|
+
.description('Show MCP integration config for Claude / Cursor')
|
|
153
|
+
.option('--server <url>', 'Server URL')
|
|
154
|
+
.option('--key <token>', 'Relay token')
|
|
155
|
+
.action(async (options) => {
|
|
156
|
+
await mcp(options);
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
// ── Config ───────────────────────────────────────────────────────
|
|
160
|
+
program
|
|
161
|
+
.command('config')
|
|
162
|
+
.description('View or update CLI configuration')
|
|
163
|
+
.option('--server <url>', 'Set the server URL')
|
|
164
|
+
.option('--port <port>', 'Set the local server port')
|
|
165
|
+
.option('--reset', 'Reset config to defaults')
|
|
166
|
+
.action((options) => {
|
|
167
|
+
if (options.reset) {
|
|
168
|
+
clearConfig();
|
|
169
|
+
console.log(chalk.green('\n Config reset to defaults.\n'));
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (options.server) {
|
|
173
|
+
const cleaned = options.server.replace(/\/+$/, '');
|
|
174
|
+
writeConfig({ serverUrl: cleaned });
|
|
175
|
+
console.log(chalk.green(`\n Server set to: ${displayUrl(cleaned)}\n`));
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (options.port) {
|
|
179
|
+
writeConfig({ localPort: parseInt(options.port) });
|
|
180
|
+
console.log(chalk.green(`\n Local port set to: ${options.port}\n`));
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
// Show current config
|
|
184
|
+
const config = readConfig();
|
|
185
|
+
console.log(chalk.bold('\n Upfyn-Code — Config\n'));
|
|
186
|
+
console.log(` Server: ${chalk.cyan(displayUrl(config.serverUrl))}`);
|
|
187
|
+
console.log(` Local port: ${chalk.cyan(config.localPort)}`);
|
|
188
|
+
console.log(` Logged in: ${config.token ? chalk.green('Yes') : chalk.yellow('No')}\n`);
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
program.parse();
|