ttyd-mux 0.2.0 → 0.2.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 (2) hide show
  1. package/README.md +87 -63
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,30 +1,56 @@
1
1
  # ttyd-mux
2
2
 
3
- ttyd session multiplexer - 複数の ttyd+tmux セッションを管理するCLIツール
3
+ A CLI tool for managing multiple ttyd+tmux web terminal sessions.
4
4
 
5
- ## 概要
5
+ 複数の ttyd+tmux Web ターミナルセッションを管理する CLI ツール。
6
6
 
7
+ ---
8
+
9
+ ## Motivation / 開発動機
10
+
11
+ **English:**
12
+ This tool was developed to easily access terminal sessions running AI coding assistants like [Claude Code](https://docs.anthropic.com/en/docs/claude-code) from a web browser. When running long coding sessions with AI assistants on a remote server, you can monitor and interact with them from anywhere through your browser.
13
+
14
+ **日本語:**
15
+ このツールは、[Claude Code](https://docs.anthropic.com/ja/docs/claude-code) などの AI コーディングアシスタントを実行しているターミナルセッションに、ブラウザから簡単にアクセスできるようにする目的で開発されました。リモートサーバーで AI アシスタントと長時間のコーディングセッションを実行する際、ブラウザからどこからでも監視・操作できます。
16
+
17
+ ---
18
+
19
+ ## Overview / 概要
20
+
21
+ **English:**
22
+ ttyd-mux makes it easy to manage multiple web terminal (ttyd) sessions.
23
+
24
+ - Run `ttyd-mux up` in any directory to start a browser-accessible terminal
25
+ - Provides a portal page to manage all sessions
26
+ - Integrates with reverse proxies like Caddy for external access
27
+ - Perfect for monitoring AI coding assistants like Claude Code remotely
28
+
29
+ **日本語:**
7
30
  ttyd-mux は、複数の Web ターミナル(ttyd)セッションを簡単に管理するためのツールです。
8
31
 
9
32
  - カレントディレクトリで `ttyd-mux up` するだけでブラウザアクセス可能なターミナルを起動
10
33
  - 複数セッションを一元管理するポータルページを提供
11
34
  - Caddy などのリバースプロキシと連携して外部公開
35
+ - Claude Code などの AI コーディングアシスタントをリモートから監視するのに最適
12
36
 
13
- ## インストール
37
+ ## Installation / インストール
14
38
 
15
39
  ```bash
40
+ # Install globally with npm
16
41
  # npm でグローバルインストール
17
42
  npm install -g ttyd-mux
18
43
 
44
+ # Or run directly with npx
19
45
  # または npx で直接実行
20
46
  npx ttyd-mux up
21
47
  ```
22
48
 
23
- ### 必要な依存関係
49
+ ### Prerequisites / 必要な依存関係
24
50
 
25
- - **Node.js** 18 以上(または Bun
51
+ - **Node.js** 18+ (or Bun)
26
52
  - **ttyd**: https://github.com/tsl0922/ttyd
27
- - **tmux**: ターミナルマルチプレクサ
53
+ - **tmux**: Terminal multiplexer
28
54
 
29
55
  ```bash
30
56
  # Ubuntu/Debian
@@ -34,65 +60,61 @@ sudo apt install ttyd tmux
34
60
  brew install ttyd tmux
35
61
  ```
36
62
 
37
- ## クイックスタート
63
+ ## Quick Start / クイックスタート
38
64
 
39
65
  ```bash
66
+ # Start in your project directory
40
67
  # プロジェクトディレクトリで起動
41
68
  cd ~/my-project
42
69
  ttyd-mux up
43
70
 
44
- # ブラウザでアクセス
71
+ # Access in browser / ブラウザでアクセス
45
72
  # http://localhost:7680/ttyd-mux/my-project/
46
73
 
47
- # 状態確認
74
+ # Check status / 状態確認
48
75
  ttyd-mux status
49
76
 
50
- # 停止
77
+ # Stop / 停止
51
78
  ttyd-mux down
52
79
  ```
53
80
 
54
- ## コマンド
81
+ ## Commands / コマンド
55
82
 
56
- ### メインコマンド
83
+ ### Main Commands / メインコマンド
57
84
 
58
85
  ```bash
59
- ttyd-mux up [--name <name>] # セッション起動 → 自動アタッチ
60
- ttyd-mux up --detach # セッション起動のみ(アタッチしない)
61
- ttyd-mux down # カレントディレクトリのセッション停止
86
+ ttyd-mux up [--name <name>] # Start session and attach / セッション起動 → 自動アタッチ
87
+ ttyd-mux up --detach # Start without attaching / セッション起動のみ(アタッチしない)
88
+ ttyd-mux down # Stop current directory session / カレントディレクトリのセッション停止
62
89
  ```
63
90
 
64
- ### セッション管理
91
+ ### Session Management / セッション管理
65
92
 
66
93
  ```bash
67
- ttyd-mux start <name> # 事前定義セッションを起動
68
- ttyd-mux start --all # 全ての事前定義セッションを起動
69
- ttyd-mux stop <name> # セッション停止
70
- ttyd-mux stop --all # 全セッション停止
71
- ttyd-mux status # 状態表示
94
+ ttyd-mux start <name> # Start predefined session / 事前定義セッションを起動
95
+ ttyd-mux start --all # Start all predefined sessions / 全ての事前定義セッションを起動
96
+ ttyd-mux stop <name> # Stop session / セッション停止
97
+ ttyd-mux stop --all # Stop all sessions / 全セッション停止
98
+ ttyd-mux status # Show status / 状態表示
72
99
  ```
73
100
 
74
- ### 直接アクセス
101
+ ### Direct Access / 直接アクセス
75
102
 
76
103
  ```bash
77
- ttyd-mux attach [name] # tmuxセッションに直接アタッチ
104
+ ttyd-mux attach [name] # Attach directly to tmux session / tmuxセッションに直接アタッチ
78
105
  ```
79
106
 
80
- ### デーモン制御
107
+ ### Daemon Control / デーモン制御
81
108
 
82
109
  ```bash
83
- ttyd-mux daemon # デーモン起動
84
- ttyd-mux daemon -f # フォアグラウンドで起動(デバッグ用)
85
- ttyd-mux shutdown # デーモン終了
110
+ ttyd-mux daemon # Start daemon / デーモン起動
111
+ ttyd-mux daemon -f # Start in foreground (debug) / フォアグラウンドで起動(デバッグ用)
112
+ ttyd-mux shutdown # Stop daemon / デーモン終了
86
113
  ```
87
114
 
88
- ### 設定生成
89
-
90
- ```bash
91
- ttyd-mux generate caddy # Caddyfile生成
92
- ttyd-mux generate caddy -o Caddyfile --hostname example.com
93
- ```
115
+ ## Configuration / 設定
94
116
 
95
- ## 設定
117
+ Configuration files are searched in the following order:
96
118
 
97
119
  設定ファイルは以下の順序で検索されます:
98
120
 
@@ -100,30 +122,32 @@ ttyd-mux generate caddy -o Caddyfile --hostname example.com
100
122
  2. `./.ttyd-mux.yaml`
101
123
  3. `~/.config/ttyd-mux/config.yaml`
102
124
 
103
- ### 設定例
125
+ ### Example / 設定例
104
126
 
105
127
  ```yaml
106
128
  # ~/.config/ttyd-mux/config.yaml
107
129
 
108
- # URLパスのプレフィックス
130
+ # URL path prefix / URLパスのプレフィックス
109
131
  base_path: /ttyd-mux
110
132
 
111
- # ttydセッションのベースポート
133
+ # Base port for ttyd sessions / ttydセッションのベースポート
112
134
  base_port: 7600
113
135
 
114
- # デーモンのHTTPポート
136
+ # Daemon HTTP port / デーモンのHTTPポート
115
137
  daemon_port: 7680
116
138
 
139
+ # Listen addresses (default: IPv4 + IPv6 localhost)
117
140
  # リッスンアドレス(デフォルト: IPv4 + IPv6 localhost)
118
141
  listen_addresses:
119
142
  - "127.0.0.1"
120
143
  - "::1"
121
- # - "0.0.0.0" # 外部からのアクセスを許可する場合
144
+ # - "0.0.0.0" # Allow external access / 外部からのアクセスを許可する場合
122
145
 
146
+ # Auto-attach to tmux on session start (default: true)
123
147
  # セッション起動時に自動でtmuxにアタッチ(デフォルト: true)
124
148
  auto_attach: true
125
149
 
126
- # 事前定義セッション(オプション)
150
+ # Predefined sessions (optional) / 事前定義セッション(オプション)
127
151
  sessions:
128
152
  - name: project-a
129
153
  dir: /home/user/project-a
@@ -136,7 +160,7 @@ sessions:
136
160
  port_offset: 2
137
161
  ```
138
162
 
139
- ## アーキテクチャ
163
+ ## Architecture / アーキテクチャ
140
164
 
141
165
  ```
142
166
  ┌─────────────────┐
@@ -153,29 +177,29 @@ sessions:
153
177
  └──────────────┘
154
178
  ```
155
179
 
156
- - **Caddy**: 外部からのリクエストを ttyd-mux に転送
157
- - **ttyd-mux daemon**: ポータル表示 + ttyd へのリバースプロキシ
158
- - **ttyd**: 各セッションの Web ターミナル(tmux を起動)
180
+ - **Caddy**: Forwards external requests to ttyd-mux / 外部からのリクエストを ttyd-mux に転送
181
+ - **ttyd-mux daemon**: Portal + reverse proxy to ttyd / ポータル表示 + ttyd へのリバースプロキシ
182
+ - **ttyd**: Web terminal for each session (runs tmux) / 各セッションの Web ターミナル(tmux を起動)
159
183
 
160
- ## Caddy との連携
184
+ ## Caddy Integration / Caddy との連携
161
185
 
162
- ### Admin API で設定(推奨)
186
+ ### Using Admin API (Recommended) / Admin API で設定(推奨)
163
187
 
164
188
  ```bash
165
- # ルートを追加
189
+ # Add route / ルートを追加
166
190
  ttyd-mux caddy setup --hostname example.com
167
191
 
168
- # 設定を確認
192
+ # Check configuration / 設定を確認
169
193
  ttyd-mux caddy status
170
194
 
171
- # ルートを削除
195
+ # Remove route / ルートを削除
172
196
  ttyd-mux caddy remove --hostname example.com
173
197
  ```
174
198
 
175
- ### Caddyfile 手動編集
199
+ ### Manual Caddyfile / Caddyfile 手動編集
176
200
 
177
201
  ```bash
178
- # コピペ用スニペットを表示
202
+ # Show snippet for copy-paste / コピペ用スニペットを表示
179
203
  ttyd-mux caddy snippet
180
204
  ```
181
205
 
@@ -185,38 +209,38 @@ handle /ttyd-mux/* {
185
209
  }
186
210
  ```
187
211
 
188
- 詳細は [docs/caddy-setup.md](docs/caddy-setup.md) を参照。
212
+ See [docs/caddy-setup.md](docs/caddy-setup.md) for details.
189
213
 
190
- ## ファイル構成
214
+ ## File Structure / ファイル構成
191
215
 
192
216
  ```
193
217
  ~/.config/ttyd-mux/
194
- config.yaml # 設定ファイル
218
+ config.yaml # Configuration file / 設定ファイル
195
219
 
196
220
  ~/.local/state/ttyd-mux/
197
- state.json # 実行中セッションの状態
198
- ttyd-mux.sock # デーモン通信用ソケット
221
+ state.json # Running session state / 実行中セッションの状態
222
+ ttyd-mux.sock # Daemon communication socket / デーモン通信用ソケット
199
223
  ```
200
224
 
201
- ## 開発
225
+ ## Development / 開発
202
226
 
203
227
  ```bash
204
- # 開発実行
228
+ # Run in development / 開発実行
205
229
  bun run src/index.ts <command>
206
230
 
207
- # テスト
231
+ # Test / テスト
208
232
  bun test
209
233
 
210
- # 型チェック
234
+ # Type check / 型チェック
211
235
  bun run typecheck
212
236
 
213
- # リント
237
+ # Lint / リント
214
238
  bun run check
215
239
 
216
- # ビルド(単一実行ファイル)
240
+ # Build single executable / ビルド(単一実行ファイル)
217
241
  bun build src/index.ts --compile --outfile ttyd-mux
218
242
  ```
219
243
 
220
- ## ライセンス
244
+ ## License / ライセンス
221
245
 
222
246
  MIT
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ttyd-mux",
3
- "version": "0.2.0",
4
- "description": "ttyd session multiplexer - manage multiple ttyd+tmux sessions",
3
+ "version": "0.2.2",
4
+ "description": "ttyd session multiplexer - manage multiple ttyd+tmux web terminal sessions / 複数の ttyd+tmux Web ターミナルセッションを管理する CLI ツール",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",