coderemote 0.0.0-stage → 0.1.1
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/LICENSE +661 -0
- package/README.md +125 -2
- package/dist/coderemote.js +1162 -0
- package/package.json +65 -4
- package/scripts/fix-node-pty.js +19 -0
package/README.md
CHANGED
|
@@ -1,3 +1,126 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/Tranthanh98/coderemote/main/apps/ios/Design/AppIcon/Icon-Default-1024x1024@1x.png" width="96" height="96" alt="Code Remote icon">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">coderemote</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<b>Use your computer from your iPhone.</b><br>
|
|
9
|
+
Browse files, review and commit with git, and run a real terminal on your dev machine,
|
|
10
|
+
over a secure Microsoft Dev Tunnel. No SSH keys, no port forwarding, no VPN.
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://www.npmjs.com/package/coderemote"><img src="https://img.shields.io/npm/v/coderemote" alt="npm version"></a>
|
|
15
|
+
<a href="https://github.com/Tranthanh98/coderemote/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/coderemote" alt="license: AGPL-3.0-or-later"></a>
|
|
16
|
+
<img src="https://img.shields.io/node/v/coderemote" alt="node version">
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
`coderemote` is the computer side of **Code Remote**, an iOS app for remote development.
|
|
22
|
+
Run one command in a project folder, scan the QR code with your iPhone, and that folder is
|
|
23
|
+
in your pocket:
|
|
24
|
+
|
|
25
|
+
- **Files:** browse, open, edit, create, rename and delete files in the shared folder
|
|
26
|
+
- **Git:** see changes and diffs, stage, discard, commit, pull, push and read history,
|
|
27
|
+
across every repository in the folder
|
|
28
|
+
- **Terminal:** a real shell (PTY) with a key bar for Ctrl, Tab, Esc and arrows; sessions
|
|
29
|
+
keep running when your phone sleeps and pick up where you left off, so `claude`, `vim`,
|
|
30
|
+
`htop` or a long build survive switching apps
|
|
31
|
+
|
|
32
|
+
## Quick start
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npm install -g coderemote
|
|
36
|
+
brew install --cask devtunnel # Microsoft Dev Tunnels CLI (Linux: see below)
|
|
37
|
+
devtunnel user login -g # once, sign in with GitHub (-d for a Microsoft account)
|
|
38
|
+
|
|
39
|
+
cd ~/projects/my-app
|
|
40
|
+
coderemote up
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`coderemote up` prints a QR code. Scan it with the iPhone Camera (or the **+** button in the
|
|
44
|
+
app) to pair. Done.
|
|
45
|
+
|
|
46
|
+
## How it works
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
iPhone app ──HTTPS / WSS──► Microsoft Dev Tunnels relay ◄── coderemote (your computer)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`coderemote` starts a small agent that listens on `127.0.0.1` only, and publishes it through
|
|
53
|
+
a [Microsoft Dev Tunnel](https://learn.microsoft.com/azure/developer/dev-tunnels/overview).
|
|
54
|
+
The tunnel connects outward, so nothing on your network has to be opened, and it works from
|
|
55
|
+
anywhere: cellular, hotel Wi-Fi, behind NAT or a firewall.
|
|
56
|
+
|
|
57
|
+
## Security
|
|
58
|
+
|
|
59
|
+
Remote shell access is serious, so access is locked down by default:
|
|
60
|
+
|
|
61
|
+
- **Your account only.** The tunnel is private: the relay lets through only the GitHub or
|
|
62
|
+
Microsoft account that runs `coderemote up`. The phone signs in once through the system
|
|
63
|
+
browser (passkeys and "Sign in with Google" work).
|
|
64
|
+
- **Plus a pairing token.** Every request also needs the random token from the QR code,
|
|
65
|
+
stored in the iPhone Keychain. `coderemote rotate-token` revokes every paired device.
|
|
66
|
+
- **One folder.** Files and git are confined to the folder you started in (symlink and `..`
|
|
67
|
+
escapes are blocked); terminals start there. A terminal is still a real shell with your
|
|
68
|
+
user's permissions.
|
|
69
|
+
- **Encrypted.** All traffic is HTTPS / WSS (TLS 1.2+) to the relay.
|
|
70
|
+
|
|
71
|
+
`coderemote up --allow-anonymous` skips the account sign-in when you want the pairing token
|
|
72
|
+
alone. Found a vulnerability? See the
|
|
73
|
+
[security policy](https://github.com/Tranthanh98/coderemote/blob/main/SECURITY.md).
|
|
74
|
+
|
|
75
|
+
## Commands
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
coderemote up # share this folder through a dev tunnel, print the pairing QR
|
|
79
|
+
coderemote up --allow-anonymous # same, without the account sign-in (alias --no-auth)
|
|
80
|
+
coderemote status # running agents and their terminal sessions
|
|
81
|
+
coderemote kill <id>... # end terminal sessions (an id prefix from `status` is enough)
|
|
82
|
+
coderemote kill --all # end every session
|
|
83
|
+
coderemote stop # stop the agent for this folder (--all: every agent)
|
|
84
|
+
coderemote serve # share on 127.0.0.1 only, no tunnel (local testing)
|
|
85
|
+
coderemote rotate-token # revoke every paired device
|
|
86
|
+
coderemote help # all options
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Options: `--root DIR` shares another folder; `--port N` picks the local port (default
|
|
90
|
+
`31580`). The tunnel URL stays the same between runs, so paired phones reconnect on their own.
|
|
91
|
+
|
|
92
|
+
## Requirements
|
|
93
|
+
|
|
94
|
+
- **Node.js 20** or newer on **macOS** (Linux is expected to work but not yet tested)
|
|
95
|
+
- The **devtunnel CLI**:
|
|
96
|
+
- macOS: `brew install --cask devtunnel`
|
|
97
|
+
- Linux: `curl -sL https://aka.ms/DevTunnelCliInstall | bash`
|
|
98
|
+
- more options in [Microsoft's guide](https://learn.microsoft.com/azure/developer/dev-tunnels/get-started)
|
|
99
|
+
- A GitHub or Microsoft account for `devtunnel user login`
|
|
100
|
+
- On Linux, `node-pty` compiles on install: have `python3`, `make` and a C++ compiler
|
|
101
|
+
(`build-essential` on Debian/Ubuntu)
|
|
102
|
+
- The **Code Remote** iOS app on your iPhone (App Store release coming; meanwhile build it
|
|
103
|
+
from [source](https://github.com/Tranthanh98/coderemote#build-the-ios-app))
|
|
104
|
+
|
|
105
|
+
## FAQ
|
|
106
|
+
|
|
107
|
+
**Is it an SSH client?** No. Nothing to configure on the computer beyond this one command:
|
|
108
|
+
no SSH server, keys, open ports or dynamic DNS.
|
|
109
|
+
|
|
110
|
+
**Does it need VS Code?** No. It's inspired by VS Code's remote tunnels but runs on its own.
|
|
111
|
+
|
|
112
|
+
**Does my code go through a third party?** Traffic passes through Microsoft's Dev Tunnels
|
|
113
|
+
relay, encrypted in transit; Code Remote runs no server of its own and collects nothing.
|
|
114
|
+
|
|
115
|
+
**What happens when my phone locks?** Terminal sessions keep running on the computer, with
|
|
116
|
+
their recent output. Reopen the app and they reattach.
|
|
117
|
+
|
|
118
|
+
**Can I share more than one folder?** One at a time for now: `coderemote up` uses one
|
|
119
|
+
tunnel per computer. Share a parent folder to reach several projects; the Git tab finds every
|
|
120
|
+
repository inside it.
|
|
121
|
+
|
|
122
|
+
## License
|
|
123
|
+
|
|
124
|
+
[AGPL-3.0-or-later](https://github.com/Tranthanh98/coderemote/blob/main/LICENSE).
|
|
125
|
+
"Code Remote" and its icon are trademarks of the project; see
|
|
126
|
+
[TRADEMARKS.md](https://github.com/Tranthanh98/coderemote/blob/main/TRADEMARKS.md).
|