anyterm 0.1.0 → 0.1.2

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 (3) hide show
  1. package/README.md +205 -0
  2. package/dist/index.js +0 -1
  3. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,205 @@
1
+ # anyterm
2
+
3
+ Stream your terminal to any device. End-to-end encrypted. The server never sees your data.
4
+
5
+ Run any command locally, access it from your browser, phone, or tablet. Full interactive terminal with colors, unicode, and TUI support. Every byte encrypted before it leaves your machine.
6
+
7
+ ```bash
8
+ npm i -g anyterm
9
+ anyterm login
10
+ anyterm run claude
11
+ # Open your browser → full interactive terminal, from anywhere
12
+ ```
13
+
14
+ ## Why anyterm
15
+
16
+ Your terminal stays on your machine. You get a live, encrypted window into it from any device.
17
+
18
+ - **Any command.** Claude Code, vim, htop, docker logs, ssh, your own scripts. Not locked to one tool.
19
+ - **True zero-knowledge encryption.** XChaCha20-Poly1305 with X25519 key exchange. The relay server stores only ciphertext. Even a full database breach reveals nothing.
20
+ - **Bidirectional.** Type in the browser, keystrokes go to the real shell. Not a read-only viewer.
21
+ - **Port forwarding.** Expose localhost ports through encrypted tunnels. See your dev server live in the browser, side-by-side with the terminal.
22
+ - **Daemon mode.** Run `anyterm daemon` on your machine, spawn terminals remotely from the web dashboard or your phone.
23
+ - **Session recording.** Every session saved encrypted. Replay anytime.
24
+ - **Self-hostable.** Source-available, run on your own infrastructure. Free forever.
25
+
26
+ ## Install
27
+
28
+ ```bash
29
+ npm i -g anyterm
30
+ ```
31
+
32
+ Requires Node.js 20+.
33
+
34
+ ## Quick start
35
+
36
+ ```bash
37
+ # Authenticate (credentials stored in your OS keychain)
38
+ anyterm login
39
+
40
+ # Stream a terminal session
41
+ anyterm run
42
+
43
+ # Stream a specific command
44
+ anyterm run claude
45
+
46
+ # Stream with port forwarding
47
+ anyterm run "npm run dev" --forward 3000
48
+
49
+ # Run as a background daemon (spawn sessions from the web)
50
+ anyterm daemon
51
+ ```
52
+
53
+ Open [anyterm.dev](https://anyterm.dev) in your browser to view and interact with your sessions.
54
+
55
+ ## Commands
56
+
57
+ ### `anyterm login`
58
+
59
+ Authenticate and store credentials securely.
60
+
61
+ ```bash
62
+ anyterm login # Cloud (anyterm.dev)
63
+ anyterm login -s https://self-hosted.co # Self-hosted server
64
+ ```
65
+
66
+ Credentials are stored in your OS keychain (macOS Keychain, Windows Credential Vault, Linux libsecret). Falls back to local config with confirmation if keychain is unavailable.
67
+
68
+ For CI/headless environments, set `ANYTERM_AUTH_TOKEN` and `ANYTERM_MASTER_KEY` environment variables.
69
+
70
+ ### `anyterm run [command]`
71
+
72
+ Capture a local terminal and stream it encrypted to the web.
73
+
74
+ ```bash
75
+ anyterm run # Interactive shell
76
+ anyterm run claude # Stream Claude Code
77
+ anyterm run "npm run dev" # Stream a dev server
78
+ anyterm run htop -n "Server Stats" # Custom session name
79
+ anyterm run "npm run dev" --forward 3000,8080 # With port forwarding
80
+ ```
81
+
82
+ | Flag | Description |
83
+ |------|-------------|
84
+ | `--forward <ports>` | Forward local ports (comma-separated) |
85
+ | `-n, --name <name>` | Session display name |
86
+
87
+ ### `anyterm daemon`
88
+
89
+ Run a persistent background process. Spawn terminal sessions remotely from the web dashboard or mobile app without needing the CLI open.
90
+
91
+ ```bash
92
+ anyterm daemon # Start daemon
93
+ anyterm daemon -n "MacBook Pro" # Custom machine name
94
+ anyterm daemon --allow "claude,npm,node" # Restrict allowed commands
95
+ ```
96
+
97
+ | Flag | Description |
98
+ |------|-------------|
99
+ | `-n, --name <name>` | Machine display name (defaults to hostname) |
100
+ | `-d, --debug` | Enable debug logging |
101
+ | `--allow <patterns>` | Restrict spawnable commands (comma-separated substrings) |
102
+
103
+ ### `anyterm list`
104
+
105
+ List your terminal sessions.
106
+
107
+ ### `anyterm org`
108
+
109
+ Manage organizations.
110
+
111
+ ```bash
112
+ anyterm org list # List your organizations
113
+ anyterm org current # Show active organization
114
+ anyterm org switch # Switch active organization
115
+ ```
116
+
117
+ ### `anyterm logout`
118
+
119
+ Clear saved credentials.
120
+
121
+ ## How encryption works
122
+
123
+ The server is a zero-knowledge relay. It routes encrypted bytes between your CLI and browser. It cannot decrypt anything.
124
+
125
+ ```
126
+ Your machine Server Browser
127
+ │ │ │
128
+ ├─ capture PTY output │ │
129
+ ├─ encrypt (XChaCha20) ───► ├─ relay ciphertext ───► ├─ decrypt
130
+ │ │ (cannot read) ├─ render in xterm.js
131
+ │ │ │
132
+ ├─ decrypt ◄─────────────── ├─ relay ◄─────────────── ├─ encrypt keystrokes
133
+ ├─ write to PTY stdin │ │
134
+ ```
135
+
136
+ **Key hierarchy:**
137
+
138
+ 1. Your password + Argon2id = master key (never leaves your device)
139
+ 2. Master key encrypts your X25519 private key (server stores only ciphertext)
140
+ 3. Each session gets a random session key, sealed with your public key
141
+ 4. Every terminal chunk: XChaCha20-Poly1305(data, session key)
142
+
143
+ Database compromise = nothing. Not "we promise we don't look." Mathematically provable nothing.
144
+
145
+ ## Port forwarding
146
+
147
+ Expose local ports through encrypted tunnels. See your running app in the browser, right next to the terminal.
148
+
149
+ ```bash
150
+ anyterm run "npm run dev" --forward 3000
151
+ anyterm run "npm run dev" --forward 3000,8080,5173
152
+ ```
153
+
154
+ The web dashboard shows a live iframe preview of your forwarded port. Navigate, interact, debug, all from your browser.
155
+
156
+ ## Use cases
157
+
158
+ **Remote AI coding.** Run Claude Code, Cursor, Copilot, or any AI agent locally. Access the session from your phone while it works. anyterm auto-detects AI agents and tags them in your dashboard.
159
+
160
+ **DevOps on the go.** Check production logs, run diagnostics, manage containers from your phone. No VPN required.
161
+
162
+ **Encrypted session recording.** Every terminal session is saved encrypted. Replay for audits, compliance, or debugging. Even server admins can't read the recordings.
163
+
164
+ **Team collaboration.** Share encrypted terminal sessions with your team. Organization-level encryption keys, RBAC, SSO, audit logs.
165
+
166
+ **Teaching.** Stream a live terminal to students. They see exactly what you see, in real time, without screen sharing lag.
167
+
168
+ ## Self-hosting
169
+
170
+ anyterm is fully self-hostable. Run the entire platform on your own infrastructure, free forever.
171
+
172
+ See the [full documentation](https://github.com/anyterm-io/anyterm) for setup instructions.
173
+
174
+ ## Teams & organizations
175
+
176
+ anyterm supports multi-user organizations with:
177
+
178
+ - Role-based access control (owner, admin, member)
179
+ - Organization-level encryption keys
180
+ - SSO via OIDC
181
+ - Audit logging
182
+ - Stripe billing integration
183
+
184
+ Available on Team and Enterprise plans, or free when self-hosted.
185
+
186
+ ## Pricing
187
+
188
+ | | Self-hosted | Pro | Team | Enterprise |
189
+ |---|---|---|---|---|
190
+ | Price | Free | $12/user/mo | $29/user/mo | Custom |
191
+ | Concurrent sessions | Unlimited | 3/user | 10/user | Custom |
192
+ | Retention | Unlimited | 7 days | 30 days | Up to 365 days |
193
+ | SSO & audit logs | - | - | Yes | Yes |
194
+
195
+ Self-hosted is always free. No feature gates, no SaaS cap, limited only by your infrastructure.
196
+
197
+ ## Links
198
+
199
+ - Website: [anyterm.dev](https://anyterm.dev)
200
+ - GitHub: [github.com/anyterm-io/anyterm](https://github.com/anyterm-io/anyterm)
201
+ - Docs: [anyterm.dev/docs](https://anyterm.dev/docs)
202
+
203
+ ## License
204
+
205
+ Source-available under [PolyForm Shield 1.0.0](https://polyformproject.org/licenses/shield/1.0.0/). Use, modify, and self-host freely. You can inspect every line of the encryption implementation.
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- #!/usr/bin/env node
3
2
  import {
4
3
  DEFAULT_SERVER_URL,
5
4
  config,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anyterm",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "anyterm": "./dist/index.js"