@kitlangton/tailcode 0.1.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 ADDED
@@ -0,0 +1,91 @@
1
+ # TailCode
2
+
3
+ TailCode is a small terminal wizard that sets up remote access to OpenCode over your Tailscale tailnet.
4
+
5
+ It walks you through:
6
+ - connecting/logging into Tailscale
7
+ - starting `opencode serve` on `127.0.0.1`
8
+ - publishing it with `tailscale serve`
9
+ - showing the tailnet URL and a QR code for phone access
10
+
11
+ ## How It Works
12
+
13
+ - TailCode checks that `tailscale` and `opencode` are installed
14
+ - If Tailscale is not connected, it prompts you to sign in (including QR-based flows from Tailscale)
15
+ - It starts OpenCode locally only (`127.0.0.1`, default port `4096`)
16
+ - It runs `tailscale serve` so the app is reachable from devices on your tailnet
17
+ - It keeps the process alive until you quit, then cleans up the local server process
18
+
19
+ ## Install Prerequisites
20
+
21
+ 1. Install Tailscale
22
+
23
+ - macOS: `brew install --cask tailscale-app`
24
+ - Windows: `winget install --id tailscale.tailscale --exact`
25
+ - Linux: `curl -fsSL https://tailscale.com/install.sh | sh`
26
+
27
+ Then sign in and make sure Tailscale is running on this machine.
28
+
29
+ 2. Install OpenCode
30
+
31
+ - macOS: `brew install anomalyco/tap/opencode`
32
+ - Linux: `curl -fsSL https://opencode.ai/install | bash`
33
+ - Alternative: `bun install -g opencode-ai`
34
+
35
+ Verify both commands work:
36
+
37
+ ```bash
38
+ tailscale version
39
+ opencode --version
40
+ ```
41
+
42
+ ## Run TailCode
43
+
44
+ Requires Bun (the `tailcode` executable is a Bun CLI):
45
+
46
+ ```bash
47
+ curl -fsSL https://bun.sh/install | bash
48
+ ```
49
+
50
+ Run without installing globally:
51
+
52
+ ```bash
53
+ bunx @kitlangton/tailcode
54
+ ```
55
+
56
+ Or install globally:
57
+
58
+ ```bash
59
+ bun add -g @kitlangton/tailcode
60
+ tailcode
61
+ ```
62
+
63
+ Run from source:
64
+
65
+ ```bash
66
+ bun install
67
+ bun run start
68
+ ```
69
+
70
+ For development (hot reload):
71
+
72
+ ```bash
73
+ bun run dev
74
+ ```
75
+
76
+ ## Optional Configuration
77
+
78
+ - `TAILCODE_PORT` (default: `4096`)
79
+ - `TAILCODE_PASSWORD` (optional; passed to `OPENCODE_SERVER_PASSWORD`)
80
+
81
+ Example:
82
+
83
+ ```bash
84
+ TAILCODE_PORT=4096 TAILCODE_PASSWORD=secret bun run start
85
+ ```
86
+
87
+ ## Usage Notes
88
+
89
+ - The published URL is only reachable from devices on your Tailscale tailnet
90
+ - OpenCode is bound to localhost to avoid exposing it on your LAN
91
+ - TailCode shows a local attach command after setup: `opencode attach http://127.0.0.1:4096`
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bun
2
+
3
+ import "../src/main.tsx"
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@kitlangton/tailcode",
3
+ "version": "0.1.0",
4
+ "description": "Terminal wizard for publishing OpenCode to your Tailscale tailnet",
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/kitlangton/tailcode.git"
10
+ },
11
+ "homepage": "https://github.com/kitlangton/tailcode",
12
+ "bugs": {
13
+ "url": "https://github.com/kitlangton/tailcode/issues"
14
+ },
15
+ "keywords": [
16
+ "tailscale",
17
+ "opencode",
18
+ "cli",
19
+ "tui",
20
+ "bun"
21
+ ],
22
+ "engines": {
23
+ "bun": ">=1.3.0"
24
+ },
25
+ "files": [
26
+ "bin/tailcode.ts",
27
+ "src/main.tsx",
28
+ "src/app.tsx",
29
+ "src/flow.ts",
30
+ "src/runtime.ts",
31
+ "src/qr.ts",
32
+ "src/state.ts",
33
+ "src/services/*.ts",
34
+ "README.md"
35
+ ],
36
+ "bin": {
37
+ "tailcode": "./bin/tailcode.ts"
38
+ },
39
+ "publishConfig": {
40
+ "access": "public"
41
+ },
42
+ "scripts": {
43
+ "dev": "bun run --conditions=browser --preserve-symlinks --hot src/main.tsx",
44
+ "start": "bun run --conditions=browser --preserve-symlinks src/main.tsx",
45
+ "showcase": "bun run --conditions=browser --preserve-symlinks src/showcase.tsx",
46
+ "showcase:dev": "bun run --conditions=browser --preserve-symlinks --hot src/showcase.tsx",
47
+ "typecheck": "tsc -p tsconfig.json --noEmit",
48
+ "fmt": "oxfmt --write src",
49
+ "fmt:check": "oxfmt --check src",
50
+ "lint": "oxlint src",
51
+ "check": "bun run typecheck && bun run lint && bun run fmt:check"
52
+ },
53
+ "dependencies": {
54
+ "@effect/atom-solid": "4.0.0-beta.11",
55
+ "@effect/platform-bun": "4.0.0-beta.11",
56
+ "@opentui/core": "0.1.81",
57
+ "@opentui/solid": "0.1.81",
58
+ "effect": "4.0.0-beta.11",
59
+ "qrcode": "1.5.4",
60
+ "solid-js": "1.9.11"
61
+ },
62
+ "devDependencies": {
63
+ "@effect/language-service": "0.75.1",
64
+ "@effect/vitest": "4.0.0-beta.11",
65
+ "@tsconfig/bun": "^1.0.7",
66
+ "@types/bun": "^1.3.9",
67
+ "@types/qrcode": "^1.5.5",
68
+ "oxfmt": "^0.35.0",
69
+ "oxlint": "^1.50.0",
70
+ "tuistory": "^0.0.15",
71
+ "typescript": "^5.8.2",
72
+ "vitest": "^4.0.18"
73
+ }
74
+ }