fpasoterm 1.6.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.
Potentially problematic release.
This version of fpasoterm might be problematic. Click here for more details.
- package/CHANGELOG.md +230 -0
- package/CONTRIBUTING.md +67 -0
- package/INSTALL.ja.md +204 -0
- package/INSTALL.md +229 -0
- package/LICENSE +21 -0
- package/README.ja.md +389 -0
- package/README.md +607 -0
- package/bin/fpasoterm +2882 -0
- package/completions/_fpasoterm +81 -0
- package/completions/fpasoterm.bash +55 -0
- package/completions/fpasoterm.fish +64 -0
- package/completions/fpasoterm.ps1 +47 -0
- package/docs/capability-diagnostics.en.md +77 -0
- package/docs/capability-diagnostics.ja.md +63 -0
- package/docs/completion.en.md +141 -0
- package/docs/completion.ja.md +113 -0
- package/docs/config.en.md +554 -0
- package/docs/config.ja.md +544 -0
- package/docs/debugging.en.md +72 -0
- package/docs/debugging.ja.md +66 -0
- package/docs/diagnostics.en.md +69 -0
- package/docs/diagnostics.ja.md +64 -0
- package/docs/font-diagnostics.en.md +116 -0
- package/docs/font-diagnostics.ja.md +105 -0
- package/docs/fpasoterm-plugin.d.ts +51 -0
- package/docs/known-issues.en.md +23 -0
- package/docs/known-issues.ja.md +23 -0
- package/docs/plugins.en.md +266 -0
- package/docs/plugins.ja.md +176 -0
- package/docs/pr-review.en.md +177 -0
- package/docs/pr-review.ja.md +170 -0
- package/docs/release-checklist.en.md +72 -0
- package/docs/release-checklist.ja.md +71 -0
- package/docs/security.en.md +36 -0
- package/docs/security.ja.md +31 -0
- package/docs/spec.en.md +106 -0
- package/docs/spec.ja.md +99 -0
- package/docs/sshfs.en.md +28 -0
- package/docs/sshfs.ja.md +28 -0
- package/docs/sync.en.md +280 -0
- package/docs/sync.ja.md +280 -0
- package/examples/apply-default-appearance.bat +8 -0
- package/examples/apply-default-appearance.ps1 +7 -0
- package/examples/apply-default-appearance.sh +7 -0
- package/examples/apply-runtime-appearance.bat +8 -0
- package/examples/apply-runtime-appearance.ps1 +7 -0
- package/examples/apply-runtime-appearance.sh +7 -0
- package/examples/config/default-appearance.toml +36 -0
- package/examples/config/minimal.toml +30 -0
- package/examples/config/profiles.toml +20 -0
- package/examples/config/runtime-appearance.toml +24 -0
- package/examples/config/sync-folder.toml +17 -0
- package/examples/config/tui-compatibility.toml +7 -0
- package/examples/config/with-plugins.toml +33 -0
- package/examples/plugins/hello.ts +17 -0
- package/examples/plugins/status-banner.ts +14 -0
- package/examples/plugins/theme.ts +32 -0
- package/examples/plugins/welcome-banner.ts +16 -0
- package/extra/linux/icons/hicolor/128x128/apps/fpasoterm.png +0 -0
- package/extra/linux/icons/hicolor/16x16/apps/fpasoterm.png +0 -0
- package/extra/linux/icons/hicolor/192x192/apps/fpasoterm.png +0 -0
- package/extra/linux/icons/hicolor/256x256/apps/fpasoterm.png +0 -0
- package/extra/linux/icons/hicolor/32x32/apps/fpasoterm.png +0 -0
- package/extra/linux/icons/hicolor/48x48/apps/fpasoterm.png +0 -0
- package/extra/linux/icons/hicolor/512x512/apps/fpasoterm.png +0 -0
- package/extra/linux/icons/hicolor/64x64/apps/fpasoterm.png +0 -0
- package/extra/linux/io.github.oyoguhito.fpasoterm.desktop +10 -0
- package/extra/logo/fpasoterm.png +0 -0
- package/extra/macos/fpasoterm.icns +0 -0
- package/extra/windows/fpasoterm.cmd +40 -0
- package/extra/windows/fpasoterm.ico +0 -0
- package/package.json +81 -0
- package/scripts/build-artifacts.js +183 -0
- package/scripts/generate-icon.js +251 -0
- package/scripts/init-jj-empty-main +41 -0
- package/scripts/install-linux-desktop.js +238 -0
- package/scripts/run +16 -0
- package/scripts/security/scan-secrets.js +89 -0
- package/scripts/tests/smoke.js +2476 -0
- package/scripts/uninstall-desktop.js +20 -0
- package/scripts/uninstall-linux-desktop.js +96 -0
- package/scripts/uninstall-windows-path.js +94 -0
- package/src/config.js +855 -0
- package/src/renderer/confirm.html +71 -0
- package/src/renderer/index.html +223 -0
- package/src/renderer/renderer.js +4166 -0
- package/src/renderer/styles.css +969 -0
- package/src/renderer/vendor/addon-fit/addon-fit.js +2 -0
- package/src/renderer/vendor/addon-image/LICENSE +19 -0
- package/src/renderer/vendor/addon-image/addon-image.js +3 -0
- package/src/renderer/vendor/addon-web-links/LICENSE +19 -0
- package/src/renderer/vendor/addon-web-links/addon-web-links.js +2 -0
- package/src/renderer/vendor/xterm/xterm.css +292 -0
- package/src/renderer/vendor/xterm/xterm.js +2 -0
- package/src-tauri/Cargo.lock +5253 -0
- package/src-tauri/Cargo.toml +29 -0
- package/src-tauri/build.rs +140 -0
- package/src-tauri/capabilities/default.json +13 -0
- package/src-tauri/default-config.toml +128 -0
- package/src-tauri/src/main.rs +9347 -0
- package/src-tauri/tauri.conf.json +60 -0
package/docs/sshfs.ja.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# SSHFS mount
|
|
2
|
+
|
|
3
|
+
FpasoTermはlocalにinstallされている`sshfs` commandでremote directoryをmountできます。SSH serverやfile copy機能をFpasoTerm自身が実装するものではありません。
|
|
4
|
+
|
|
5
|
+
**Sync > SSHFS Mounts**を開き、host、user、SSH port、absolute remote path、mount nameを入力します。managerは対応する全OSで、使用中のFpasoTerm window内のmodalとして開きます。Linux/macOSのlocal pathは使用中のFpasoTerm設定directory配下の`User/mounts/<name>`です。Windowsでは未使用のdrive letter(例: `Z:`)を自動的に割り当てます。terminalや他のlocal applicationから結果のpathを使用できます。
|
|
6
|
+
|
|
7
|
+
identityとpasswordを空欄にした場合、SSHFSは`~/.ssh/config`、default key、ssh-agentを含む通常のSSH authenticationを使用します。任意のidentity file pathはこのSSHFS commandにだけ渡します。任意のpasswordは`-o password_stdin`でstandard inputへ渡し、実行後にUIからclearします。config、log、sync fileには保存しません。
|
|
8
|
+
|
|
9
|
+
事前にSSHFSをinstallしてください。Linuxではpackage managerの`sshfs`、macOSではmacFUSEとSSHFS、WindowsではSSHFS-WinとWinFspが一般的です。password modeは利用中のSSHFS実装が`password_stdin`をsupportする必要があります。
|
|
10
|
+
|
|
11
|
+
macOSでは、Terminalを介さず起動した場合にもmacFUSEのmount channelを維持できるよう、FpasoTermはSSHFSをforeground modeで起動します。`FD_CLOEXEC`を含むSSHFS errorはcredentialやremote pathではなく、macFUSEのlazy mountと古いSSHFS実装の互換性問題です。install済みSSHFS packageをupdateしてください。
|
|
12
|
+
|
|
13
|
+
Windowsでは、FpasoTermはSSHFS-Winが対応するディスク型network driveとして未使用のdrive letterを割り当てます。bundled Cygwinの`sshfs.exe`を直接起動しません。認証は使用中のFpasoTerm windowを親とする、Explorerや`net use`と同じSSHFS-WinのWindows credential dialogで行います。必要に応じてそのdialogまたはWindows Credential Managerを使用してください。identity-file欄はSSHFS-Winのmapped driveがmount単位の指定をsupportしないためWindowsでは受け付けず、SSHFS-Winが対応するkey設定を使用してください。managerを開いた直後のstatusには、実際に確認したSSHFS-Win pathが表示されます。PowerShellでの確認例です。
|
|
14
|
+
|
|
15
|
+
remote rootをmountする場合はremote pathに`/`を入力します。FpasoTermはこれを末尾separatorなしのSSHFS-Win root UNC形式`\\sshfs.r\\user@host!port`へ変換します。subdirectoryの場合は`/home/user/project`のようなabsolute pathを入力してください。
|
|
16
|
+
|
|
17
|
+
```powershell
|
|
18
|
+
Test-Path "$env:ProgramFiles\SSHFS-Win\bin\sshfs.exe"
|
|
19
|
+
& "$env:ProgramFiles\SSHFS-Win\bin\sshfs.exe" --version
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
標準以外の場所にinstallしている場合は、`FPASOTERM_SSHFS_PATH`に`sshfs.exe`のfull pathを設定してからFpasoTermを再起動してください。SSHFS-Winの標準`bin` directoryは[公式README](https://github.com/winfsp/sshfs-win)にも記載されています。
|
|
23
|
+
|
|
24
|
+
FpasoTermはsecretを含まないmount情報を`User/mounts/sshfs-mounts.json`へ保存するため、managerを閉じて再度開いても項目を復元してUnmountできます。Windowsでは割り当てたdrive letterも保存します。passwordは保存しません。active managed mountはterminal titlebarに`SSHFS (n)`として表示します。terminal windowを閉じる際はmountを残す前に確認します。Unmountも同じmanagerでmount nameを指定します。Linux/macOSでFpasoTermがUnmountできるのは自身の`User/mounts`配下だけです。Windowsでは記録済みdrive letterのみUnmountします。
|
|
25
|
+
|
|
26
|
+
mount失敗後や外部commandでfilesystemを解除した後も、managerは保存recordを残します。この項目は`(not mounted)`と表示されます。選択して**Forget Saved**を実行すると、inactive recordだけを削除できます。filesystemが実際にmountされている場合は削除を拒否します。
|
|
27
|
+
|
|
28
|
+
SSHFS-Winでは通常のUnmount後もnetwork driveが残る場合があります。FpasoTermはまず通常のWindows解除APIを実行し、driveが消えたことを確認します。残っている場合だけ、`sshfs.exe`を終了して再解除する確認dialogをWindows標準UIで表示します。この強制復旧は、同じWindows userで利用できる他のSSHFS-Win mountも切断する可能性があります。他のmountを残す必要がある場合はCancelしてください。driveが実際に解除されたことを確認するまで、mount recordは削除しません。
|
package/docs/sync.en.md
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
# Sync Folder
|
|
2
|
+
|
|
3
|
+
fpasoterm can share diagnostics and terminal output logs through a local folder that is synchronized by another tool, such as Google Drive for desktop, OneDrive, Dropbox, Syncthing, or rsync.
|
|
4
|
+
|
|
5
|
+
fpasoterm does not call the Google Drive API. It does not require OAuth, API keys, or a Google Cloud project. Google Drive is only responsible for syncing files that fpasoterm writes to a local folder.
|
|
6
|
+
|
|
7
|
+
## Configuration
|
|
8
|
+
|
|
9
|
+
For first-time setup, use the interactive setup command:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
fpasoterm --setup-sync
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
When running from a source checkout on Windows, `bin/fpasoterm` is a Node.js script, so run it through `node`.
|
|
16
|
+
|
|
17
|
+
PowerShell:
|
|
18
|
+
|
|
19
|
+
```powershell
|
|
20
|
+
node .\bin\fpasoterm --setup-sync
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
cmd.exe:
|
|
24
|
+
|
|
25
|
+
```bat
|
|
26
|
+
node bin\fpasoterm --setup-sync
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
After a global npm install, the normal command works on Windows too:
|
|
30
|
+
|
|
31
|
+
```powershell
|
|
32
|
+
fpasoterm --setup-sync
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
It asks for the local sync folder, channel, and a generated command secret, then creates or updates `[sync]` and `[logging]` in `~/.config/fpasoterm/User/config.toml`. Copy the same secret only to trusted devices that need remote Broadcast. Existing window, terminal, and plugin settings are preserved.
|
|
36
|
+
|
|
37
|
+
On ChromeOS, if folders such as `shared` and `temp` are shared with Linux, `--setup-sync` lists writable candidates. Enter a candidate number or type the exact path.
|
|
38
|
+
|
|
39
|
+
### Sync Channel
|
|
40
|
+
|
|
41
|
+
`Sync channel` is a name that separates sync data inside the same sync folder. In normal use, keep `default`.
|
|
42
|
+
|
|
43
|
+
Only fpasoterm instances with the same `path` and the same `channel` share diagnostics and logs in the same location. If ChromeOS and Windows should share the same sync area, use the same channel name on both machines.
|
|
44
|
+
|
|
45
|
+
### Status, Health, and Cleanup
|
|
46
|
+
|
|
47
|
+
Use these commands before troubleshooting a sync folder or after a device was offline for a long time:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
fpasoterm --sync-status
|
|
51
|
+
fpasoterm --sync-diagnostics
|
|
52
|
+
fpasoterm --sync-clean
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`--sync-status` is read-only. It reports the resolved local path, current channel, root existence/read/write checks, diagnostics file size, short-lived command counts, and every discovered channel below the sync root. `--sync-diagnostics` prints the same Markdown report so it can be pasted into a GitHub Issue.
|
|
56
|
+
|
|
57
|
+
`--sync-clean` scans every channel in the configured sync root. It removes only command JSON files whose expiry has passed, plus malformed or temporary command files older than `commandTtlSeconds`. It never removes `diagnostics.json`, terminal logs, or valid pending commands. A disabled or missing sync folder is not created by status or cleanup.
|
|
58
|
+
|
|
59
|
+
The hamburger menu also provides **Sync Status** and **Sync Clean**. Sync Status opens the same health information in the diagnostics panel. Sync Clean performs the same safe stale-file cleanup, then refreshes that panel.
|
|
60
|
+
|
|
61
|
+
Examples:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
default
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
General use. This is enough when all machines share one sync destination.
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
work
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Use this when you want work sync data separated.
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
chromeos-test
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Use this for testing without mixing data into your normal sync channel.
|
|
80
|
+
|
|
81
|
+
## Preparing a Google Drive Folder
|
|
82
|
+
|
|
83
|
+
fpasoterm does not mount Google Drive itself. First, make Google Drive available as a local folder through your OS.
|
|
84
|
+
|
|
85
|
+
### ChromeOS / Baguette
|
|
86
|
+
|
|
87
|
+
1. Open the ChromeOS Files app.
|
|
88
|
+
2. Create folders under `Google Drive` -> `My Drive` that will be shared with Linux. Examples: `shared`, `temp`.
|
|
89
|
+
3. Right-click each folder and choose `Share with Linux`.
|
|
90
|
+
4. Confirm that Linux can see the folder:
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
ls /mnt/chromeos/shared/GoogleDrive/MyDrive/shared
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
5. Use a sync path such as:
|
|
97
|
+
|
|
98
|
+
```text
|
|
99
|
+
/mnt/chromeos/shared/GoogleDrive/MyDrive/shared/fpasoterm-sync
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Baguette can expose the MyDrive root while still refusing writes directly under that root from Linux. In that case, use a folder that was individually shared with Linux from the ChromeOS Files app. In the example above, that is the `shared` folder.
|
|
103
|
+
|
|
104
|
+
Other ChromeOS Linux environments may expose the same shared folder as `/mnt/shared/GoogleDrive/MyDrive/shared` or `/mnt/chromeos/GoogleDrive/MyDrive/shared`. Use a path that exists and is writable from Linux.
|
|
105
|
+
|
|
106
|
+
If a shared folder is renamed in the ChromeOS Files app, Linux sharing may not follow the new name automatically. For example, after renaming `test` to `temp`, right-click the renamed `temp` folder and choose `Share with Linux` again.
|
|
107
|
+
|
|
108
|
+
If you shared a `temp` folder, the path follows the same pattern:
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
/mnt/chromeos/shared/GoogleDrive/MyDrive/temp/fpasoterm-sync
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
If neither path exists, open ChromeOS Settings, then `Developers` -> `Linux development environment` -> `Manage shared folders`, and confirm that Google Drive is shared with Linux.
|
|
115
|
+
|
|
116
|
+
### macOS
|
|
117
|
+
|
|
118
|
+
1. Install Google Drive for desktop and sign in.
|
|
119
|
+
2. Find the local Google Drive folder in Finder.
|
|
120
|
+
3. A common path looks like:
|
|
121
|
+
|
|
122
|
+
```text
|
|
123
|
+
~/Library/CloudStorage/GoogleDrive-<account>/My Drive/fpasoterm-sync
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
The `<account>` part differs by machine. Drag the folder from Finder into Terminal if you need the exact path.
|
|
127
|
+
|
|
128
|
+
### Windows
|
|
129
|
+
|
|
130
|
+
1. Install Google Drive for desktop and sign in.
|
|
131
|
+
2. Find the Google Drive drive letter or local folder in Explorer.
|
|
132
|
+
3. Create a `fpasoterm-sync` folder inside Google Drive.
|
|
133
|
+
4. A common path looks like:
|
|
134
|
+
|
|
135
|
+
```text
|
|
136
|
+
G:\My Drive\fpasoterm-sync
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
If your drive letter is not `G:`, use the actual path shown on that machine. Depending on localization or Google Drive settings, it may look like `G:\マイドライブ\fpasoterm-sync` or `D:\My Drive\fpasoterm-sync`.
|
|
140
|
+
|
|
141
|
+
PowerShell examples for checking the path:
|
|
142
|
+
|
|
143
|
+
```powershell
|
|
144
|
+
Test-Path 'G:\My Drive'
|
|
145
|
+
Test-Path 'G:\マイドライブ'
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
If `--setup-sync` does not show candidates, type the exact Google Drive folder path shown in Explorer.
|
|
149
|
+
|
|
150
|
+
### Linux desktop
|
|
151
|
+
|
|
152
|
+
Google does not provide an official Google Drive desktop client for Linux. Use a local synced folder from rclone mount, google-drive-ocamlfuse, Insync, Syncthing, Dropbox, rsync, or another sync tool that fpasoterm can read and write as a normal directory.
|
|
153
|
+
|
|
154
|
+
## Manual Configuration
|
|
155
|
+
|
|
156
|
+
Add a `[sync]` section to `~/.config/fpasoterm/User/config.toml`:
|
|
157
|
+
|
|
158
|
+
```toml
|
|
159
|
+
[sync]
|
|
160
|
+
enabled = true
|
|
161
|
+
provider = "folder"
|
|
162
|
+
path = "~/Google Drive/fpasoterm-sync"
|
|
163
|
+
channel = "work"
|
|
164
|
+
diagnostics = true
|
|
165
|
+
maxBytes = 1048576
|
|
166
|
+
commands = true
|
|
167
|
+
commandSecret = "paste-the-same-32-character-or-longer-secret-on-trusted-devices"
|
|
168
|
+
commandTtlSeconds = 60
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Use the same `path` and `channel` on the other fpasoterm instance. If your Google Drive folder uses another name, set `path` to that exact local directory.
|
|
172
|
+
|
|
173
|
+
On ChromeOS/Baguette, use:
|
|
174
|
+
|
|
175
|
+
```toml
|
|
176
|
+
path = "/mnt/chromeos/shared/GoogleDrive/MyDrive/shared/fpasoterm-sync"
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
If another ChromeOS Linux environment exposes the folder under a different path, use the path that exists:
|
|
180
|
+
|
|
181
|
+
```toml
|
|
182
|
+
path = "/mnt/shared/GoogleDrive/MyDrive/shared/fpasoterm-sync"
|
|
183
|
+
path = "/mnt/chromeos/GoogleDrive/MyDrive/shared/fpasoterm-sync"
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Files
|
|
187
|
+
|
|
188
|
+
For `channel = "work"`, fpasoterm writes:
|
|
189
|
+
|
|
190
|
+
```text
|
|
191
|
+
<sync path>/work/diagnostics.json
|
|
192
|
+
<sync path>/work/commands/command-<source>-<timestamp>.json
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
`diagnostics.json` contains a JSON payload with `kind`, `channel`, `sourceId`, `updatedAt`, and `text`.
|
|
196
|
+
|
|
197
|
+
`commands` contains short-lived broadcast-input requests only when a user explicitly selects `Include synced channel` in the Broadcast dialog. It is disabled by default. Enable it only with a `commandSecret` of at least 32 characters shared by trusted devices. fpasoterm signs command files with HMAC-SHA-256 and ignores unsigned or invalid files. `commandTtlSeconds` defaults to 60 and is capped at 600 seconds. Set `commands = false` to keep diagnostics/log sync while refusing remote input commands.
|
|
198
|
+
|
|
199
|
+
## Usage
|
|
200
|
+
|
|
201
|
+
When sync is enabled, fpasoterm automatically writes a debounced diagnostics snapshot to `diagnostics.json` as diagnostics change. The snapshot contains the current in-memory diagnostics ring buffer, which is the most recent fpasoterm diagnostics/debug log lines from this app session. It is for troubleshooting fpasoterm itself, such as config loading, PTY events, renderer errors, and sync folder activity. It is not the terminal output log.
|
|
202
|
+
|
|
203
|
+
To stop writing `diagnostics.json`, disable sync in `config.toml`:
|
|
204
|
+
|
|
205
|
+
```toml
|
|
206
|
+
[sync]
|
|
207
|
+
enabled = false
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Clearing `sync.path` also disables sync because there is no destination folder. After editing `config.toml`, restart fpasoterm or apply the config from the running terminal.
|
|
211
|
+
|
|
212
|
+
In short, `sync.enabled = false` is the setting for a local-only session with no sync-folder diagnostics writes.
|
|
213
|
+
|
|
214
|
+
## Broadcast Input
|
|
215
|
+
|
|
216
|
+
`Ctrl+Shift+B` opens the Broadcast dialog. Select the target local windows by title and PID, then use `Send` to deliver the entered command only to those windows. With every local window selected, `Include synced channel` additionally writes a temporary request under `<sync path>/<channel>/commands`. Every already-running fpasoterm using that same folder and channel receives it once and writes it to its own PTY. Partial local selection never sends to the sync channel.
|
|
217
|
+
|
|
218
|
+
The same operation is available without opening a window:
|
|
219
|
+
|
|
220
|
+
```sh
|
|
221
|
+
# Send to every currently running local fpasoterm window.
|
|
222
|
+
fpasoterm --broadcast "git status"
|
|
223
|
+
|
|
224
|
+
# Select one or more local targets by PID or exact title.
|
|
225
|
+
fpasoterm --broadcast "uptime" --broadcast-target 1234,"Build-2"
|
|
226
|
+
|
|
227
|
+
# Send to all local windows and to the configured trusted sync channel.
|
|
228
|
+
fpasoterm --broadcast "hostname" --broadcast-sync
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
`--broadcast` normalizes line endings and appends Enter. `--broadcast-target` can be repeated or comma-separated; an unmatched selector is an error. If no target is specified, all currently running local windows are selected. `--broadcast-sync` requires all local windows to be selected, and requires `[sync] enabled = true`, `commands = true`, and a 32-character-or-longer `commandSecret`. It does not start fpasoterm on another machine: only already-running instances sharing the same trusted folder, channel, and secret can receive the command.
|
|
232
|
+
|
|
233
|
+
This is intentionally a trusted-folder feature. Command JSON requires an HMAC-SHA-256 signature, but any device holding the secret can type a command into participating terminals. It provides no encryption, remote launch, or delayed execution. Do not enable synced commands for a shared or untrusted folder.
|
|
234
|
+
|
|
235
|
+
## Terminal Output Logs
|
|
236
|
+
|
|
237
|
+
Sync folder diagnostics are separate from terminal output logging. The hamburger menu contains `Log Start (^S)` / `Log Stop (^S)` and `Log Show (^P)`. `Ctrl+Shift+L` opens that menu at the log actions; `Ctrl+Shift+S` records terminal output to a local log file or closes that file, and `Ctrl+Shift+P` opens a selector for captured logs. The log panel can delete the selected stopped log, or `Delete All` can empty the active log and delete all stopped `terminal-*.log` files after an in-panel confirmation. Saved log files are normalized for readability by removing common ANSI/control sequences, OSC sequences, and CR/control characters or replacing them with line breaks. By default logs are written under `~/.config/fpasoterm/User/logs`.
|
|
238
|
+
|
|
239
|
+
In `Log Show`, use the search field and `Search` button to select and scroll to the next matching text in the displayed log. Repeating `Search` or pressing `N` advances through every match and wraps back to the first match; pressing `P` moves to the previous match. When the log text area has focus, `j` moves to the next match and `k` moves to the previous match. Arrow keys remain available for normal text area scrolling. The counter shows the current match number. Select displayed log text and press `Ctrl+Shift+C` to copy that selection through the same clipboard path used by terminal selection copy.
|
|
240
|
+
|
|
241
|
+
When running tmux, screen, byobu, or herdr, fpasoterm receives the already-rendered PTY output stream. It cannot reliably know which multiplexer pane produced each byte, so pane-specific logging should be done with the multiplexer itself, such as `tmux capture-pane` or a pane-level logging feature.
|
|
242
|
+
|
|
243
|
+
When `--setup-sync` asks `Store terminal output logs in the sync folder?`, choose `N` or press Enter if you do not want terminal output logs in the sync folder. This is the normal choice.
|
|
244
|
+
|
|
245
|
+
If you choose `y`, the following `Terminal log directory` default is under the selected sync folder. On Windows it may look like `G:\マイドライブ\fpasoterm-sync\logs`. That is still a local Windows path, but Google Drive for desktop synchronizes it to other machines.
|
|
246
|
+
|
|
247
|
+
Paths can use `~`, `%USERPROFILE%`, `$HOME`, and similar environment variables. When sharing config across ChromeOS, macOS, and Windows, `~` or explicit per-OS paths are usually easier to reason about.
|
|
248
|
+
|
|
249
|
+
Only put logs in a synced folder when you explicitly want that:
|
|
250
|
+
|
|
251
|
+
```toml
|
|
252
|
+
[logging]
|
|
253
|
+
enabled = true
|
|
254
|
+
directory = "~/Google Drive/fpasoterm-sync/logs"
|
|
255
|
+
autoStart = false
|
|
256
|
+
maxBytes = 10485760
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
The same feature can be controlled from inside the terminal:
|
|
260
|
+
|
|
261
|
+
```sh
|
|
262
|
+
printf '\033]777;log=start\a\r\n'
|
|
263
|
+
printf '\033]777;log=stop\a\r\n'
|
|
264
|
+
printf '\033]777;log=start;logPath=session.log\a\r\n'
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
In PowerShell:
|
|
268
|
+
|
|
269
|
+
```powershell
|
|
270
|
+
[Console]::Write("$([char]27)]777;log=start$([char]7)`r`n")
|
|
271
|
+
[Console]::Write("$([char]27)]777;log=stop$([char]7)`r`n")
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## Security
|
|
275
|
+
|
|
276
|
+
Only diagnostics are synchronized automatically by the sync-folder diagnostics feature. fpasoterm does not synchronize full terminal output automatically.
|
|
277
|
+
|
|
278
|
+
Terminal logs may contain command output, prompts, and other sensitive data. If `logging.directory` points to a synced folder, protect that folder appropriately.
|
|
279
|
+
|
|
280
|
+
The first implementation stores plain JSON and plain terminal logs. Do not use this for secrets unless the sync folder is protected appropriately. A later version can add encrypted payloads if needed.
|
package/docs/sync.ja.md
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
# Sync Folder
|
|
2
|
+
|
|
3
|
+
fpasoterm は、Google Drive for desktop、OneDrive、Dropbox、Syncthing、rsync などが同期しているローカルフォルダを使って、diagnostics と terminal output log を共有できます。
|
|
4
|
+
|
|
5
|
+
fpasoterm は Google Drive API を呼びません。OAuth、API key、Google Cloud project は不要です。Google Drive は、fpasoterm がローカルフォルダに書いたファイルを同期するだけです。
|
|
6
|
+
|
|
7
|
+
## 設定
|
|
8
|
+
|
|
9
|
+
初めて設定する場合は、対話形式の setup を使えます。
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
fpasoterm --setup-sync
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
source checkout から実行している場合、Windows では `bin/fpasoterm` が Node.js script のため、次のように `node` 経由で実行します。
|
|
16
|
+
|
|
17
|
+
PowerShell:
|
|
18
|
+
|
|
19
|
+
```powershell
|
|
20
|
+
node .\bin\fpasoterm --setup-sync
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
cmd.exe:
|
|
24
|
+
|
|
25
|
+
```bat
|
|
26
|
+
node bin\fpasoterm --setup-sync
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
npm global install 済みの場合は、Windows でも次で実行できます。
|
|
30
|
+
|
|
31
|
+
```powershell
|
|
32
|
+
fpasoterm --setup-sync
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
この command はlocal sync folder、channel、生成したcommand secretを質問し、`~/.config/fpasoterm/User/config.toml` の `[sync]` と `[logging]` を生成または更新します。remote Broadcastが必要なtrusted deviceだけに同じsecretを設定してください。既存の window、terminal、plugin 設定は残します。
|
|
36
|
+
|
|
37
|
+
ChromeOS で `shared` や `temp` など複数の folder を `Linux と共有` している場合、`--setup-sync` は書き込み可能な候補を一覧表示します。候補番号を入力するか、実際の path を直接入力してください。
|
|
38
|
+
|
|
39
|
+
### Sync channel
|
|
40
|
+
|
|
41
|
+
`Sync channel` は、同じ sync folder の中で同期データを分けるための名前です。通常は `default` のままで問題ありません。
|
|
42
|
+
|
|
43
|
+
同じ `path` と同じ `channel` を指定した fpasoterm 同士だけが、diagnostics と logs を同じ場所で共有します。ChromeOS と Windows で同じ同期領域を使いたい場合は、両方で同じ channel 名を指定してください。
|
|
44
|
+
|
|
45
|
+
### Status、health check、cleanup
|
|
46
|
+
|
|
47
|
+
sync folder の調査前、または端末が長時間 offline だった後には、次を実行します。
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
fpasoterm --sync-status
|
|
51
|
+
fpasoterm --sync-diagnostics
|
|
52
|
+
fpasoterm --sync-clean
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`--sync-status` は read-only です。解決済み local path、現在の channel、root folder の存在・read/write check、diagnostics file size、短寿命 command の件数、sync root 配下で見つかった全 channel を表示します。`--sync-diagnostics` は同じ内容を GitHub Issue へ貼り付けやすい Markdown として出力します。
|
|
56
|
+
|
|
57
|
+
`--sync-clean` は、設定済み sync root の全 channel を確認します。期限切れの command JSON、及び `commandTtlSeconds` より古い壊れた command file / temporary file だけを削除します。`diagnostics.json`、terminal log、期限内の command は削除しません。sync が無効、または folder が無い場合も、status/cleanup によって directory を作成しません。
|
|
58
|
+
|
|
59
|
+
hamburger menu にも **Sync Status** と **Sync Clean** を追加しています。Sync Status は同じ health 情報を diagnostics panel に表示します。Sync Clean は同じ安全な stale file cleanup を実行してから、その panel を更新します。
|
|
60
|
+
|
|
61
|
+
例:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
default
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
通常用途。1 つの同期先を全端末で共有するだけならこれで十分です。
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
work
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
仕事用だけ分けたい場合。
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
chromeos-test
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
検証用。普段の同期データと混ぜたくない場合。
|
|
80
|
+
|
|
81
|
+
## Google Drive フォルダの準備
|
|
82
|
+
|
|
83
|
+
fpasoterm は Google Drive を直接 mount しません。先に OS 側で Google Drive をローカルフォルダとして見える状態にしてください。
|
|
84
|
+
|
|
85
|
+
### ChromeOS / Baguette
|
|
86
|
+
|
|
87
|
+
1. ChromeOS の Files app を開きます。
|
|
88
|
+
2. `Google Drive` -> `My Drive` の中に、Linux と共有する folder を作成します。例: `shared`、`temp`
|
|
89
|
+
3. 作成した folder を右クリックし、`Linux と共有` または `Share with Linux` を選択します。
|
|
90
|
+
4. Linux 側で次の path が見えることを確認します。
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
ls /mnt/chromeos/shared/GoogleDrive/MyDrive/shared
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
5. fpasoterm 用の同期フォルダとして、例えば次を指定します。
|
|
97
|
+
|
|
98
|
+
```text
|
|
99
|
+
/mnt/chromeos/shared/GoogleDrive/MyDrive/shared/fpasoterm-sync
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Baguette では MyDrive 直下が見えても、Linux から MyDrive 直下に folder を作成できない場合があります。その場合は、ChromeOS Files app で個別に `Share with Linux` した folder 配下を使います。上の例では `shared` folder 配下です。
|
|
103
|
+
|
|
104
|
+
他の ChromeOS Linux 環境では `/mnt/shared/GoogleDrive/MyDrive/shared` または `/mnt/chromeos/GoogleDrive/MyDrive/shared` として見える場合があります。存在し、Linux から書き込める path を使ってください。
|
|
105
|
+
|
|
106
|
+
ChromeOS Files app で共有済み folder の名前を変更した場合、Linux 側の共有設定が新しい名前へ自動追従しないことがあります。`test` から `temp` へ rename した場合などは、rename 後の `temp` folder を改めて右クリックし、`Linux と共有` を実行してください。
|
|
107
|
+
|
|
108
|
+
`temp` folder を共有した場合は、同じ考え方で次のような path になります。
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
/mnt/chromeos/shared/GoogleDrive/MyDrive/temp/fpasoterm-sync
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
どちらも見えない場合は、ChromeOS Settings の `Developers` -> `Linux development environment` -> `Manage shared folders` で Google Drive が Linux に共有されているか確認してください。
|
|
115
|
+
|
|
116
|
+
### macOS
|
|
117
|
+
|
|
118
|
+
1. Google Drive for desktop をインストールしてログインします。
|
|
119
|
+
2. Finder で Google Drive のローカルフォルダを確認します。
|
|
120
|
+
3. 多くの環境では次のような path になります。
|
|
121
|
+
|
|
122
|
+
```text
|
|
123
|
+
~/Library/CloudStorage/GoogleDrive-<account>/My Drive/fpasoterm-sync
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
`<account>` 部分は環境ごとに異なります。Finder から対象フォルダを Terminal に drag and drop すると実際の path を確認しやすいです。
|
|
127
|
+
|
|
128
|
+
### Windows
|
|
129
|
+
|
|
130
|
+
1. Google Drive for desktop をインストールしてログインします。
|
|
131
|
+
2. Explorer で Google Drive の drive letter または local folder を確認します。
|
|
132
|
+
3. Google Drive の中に `fpasoterm-sync` folder を作成します。
|
|
133
|
+
4. 多くの環境では次のような path になります。
|
|
134
|
+
|
|
135
|
+
```text
|
|
136
|
+
G:\My Drive\fpasoterm-sync
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
drive letter が `G:` 以外の場合は、その環境の実際の path を指定してください。日本語表示や設定によっては `G:\マイドライブ\fpasoterm-sync`、`D:\My Drive\fpasoterm-sync` などになる場合があります。
|
|
140
|
+
|
|
141
|
+
PowerShell で path を確認する例:
|
|
142
|
+
|
|
143
|
+
```powershell
|
|
144
|
+
Test-Path 'G:\My Drive'
|
|
145
|
+
Test-Path 'G:\マイドライブ'
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
`--setup-sync` で候補が出ない場合は、Explorer で見えている Google Drive folder の path を直接入力してください。
|
|
149
|
+
|
|
150
|
+
### Linux desktop
|
|
151
|
+
|
|
152
|
+
Google Drive 公式の Linux desktop client はありません。rclone mount、google-drive-ocamlfuse、Insync、Syncthing、Dropbox、rsync などで、fpasoterm から通常の directory として読み書きできる local folder を用意してください。
|
|
153
|
+
|
|
154
|
+
## 手動設定
|
|
155
|
+
|
|
156
|
+
`~/.config/fpasoterm/User/config.toml` に `[sync]` section を追加します。
|
|
157
|
+
|
|
158
|
+
```toml
|
|
159
|
+
[sync]
|
|
160
|
+
enabled = true
|
|
161
|
+
provider = "folder"
|
|
162
|
+
path = "~/Google Drive/fpasoterm-sync"
|
|
163
|
+
channel = "work"
|
|
164
|
+
diagnostics = true
|
|
165
|
+
maxBytes = 1048576
|
|
166
|
+
commands = true
|
|
167
|
+
commandSecret = "trusted-device-only-32-characters-or-longer-secret"
|
|
168
|
+
commandTtlSeconds = 60
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
同期したい別の fpasoterm でも同じ `path` と `channel` を指定します。Google Drive のローカルフォルダ名が異なる場合は、その環境の実際の path を指定してください。
|
|
172
|
+
|
|
173
|
+
ChromeOS/Baguette では次のように指定します。
|
|
174
|
+
|
|
175
|
+
```toml
|
|
176
|
+
path = "/mnt/chromeos/shared/GoogleDrive/MyDrive/shared/fpasoterm-sync"
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
別の ChromeOS Linux 環境で違う path に見えている場合は、存在する方を使います。
|
|
180
|
+
|
|
181
|
+
```toml
|
|
182
|
+
path = "/mnt/shared/GoogleDrive/MyDrive/shared/fpasoterm-sync"
|
|
183
|
+
path = "/mnt/chromeos/GoogleDrive/MyDrive/shared/fpasoterm-sync"
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## 作成されるファイル
|
|
187
|
+
|
|
188
|
+
`channel = "work"` の場合、fpasoterm は次のファイルを読み書きします。
|
|
189
|
+
|
|
190
|
+
```text
|
|
191
|
+
<sync path>/work/diagnostics.json
|
|
192
|
+
<sync path>/work/commands/command-<source>-<timestamp>.json
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
`diagnostics.json` の JSON には `kind`、`channel`、`sourceId`、`updatedAt`、`text` が入ります。
|
|
196
|
+
|
|
197
|
+
`commands` は Broadcast dialog で user が `Include synced channel` を明示選択した時だけ短寿命の broadcast-input request を保存します。既定では無効です。trusted device間で共有する32文字以上の`commandSecret`とともに有効化してください。fpasotermはcommand fileへHMAC-SHA-256署名を付け、署名がない、または一致しないfileを無視します。`commandTtlSeconds` の既定値は 60 秒で、最大 600 秒です。diagnostics/log の同期は残したままremote input commandを拒否する場合は `commands = false` にしてください。
|
|
198
|
+
|
|
199
|
+
## 使用方法
|
|
200
|
+
|
|
201
|
+
sync が有効な場合、fpasoterm は diagnostics が変わった時に debounce して、`diagnostics.json` へ diagnostics snapshot を自動書き込みします。snapshot の内容は、この app session で保持している in-memory diagnostics ring buffer、つまり直近の fpasoterm diagnostics/debug log です。これは config 読み込み、PTY event、renderer error、sync folder activity など fpasoterm 自体の調査用で、terminal output log ではありません。
|
|
202
|
+
|
|
203
|
+
`diagnostics.json` の書き込みを止めたい場合は、`config.toml` で sync を無効にします。
|
|
204
|
+
|
|
205
|
+
```toml
|
|
206
|
+
[sync]
|
|
207
|
+
enabled = false
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
`sync.path` を空にした場合も、書き込み先が無いため sync は無効になります。`config.toml` を編集した後は、fpasoterm を再起動するか、起動中の terminal から config を適用してください。
|
|
211
|
+
|
|
212
|
+
要点として、`sync.enabled = false` が sync folder diagnostics を書き込まないローカル専用の設定です。
|
|
213
|
+
|
|
214
|
+
## Broadcast Input
|
|
215
|
+
|
|
216
|
+
`Ctrl+Shift+B` で Broadcast dialog を開きます。title と PID で対象の local fpasoterm window を選択して `Send` を実行すると、選択した window だけへ command を送ります。全 local window を選択して `Include synced channel` を選ぶと、追加で `<sync path>/<channel>/commands` 配下へ一時 request を保存します。同じ folder と channel を使って、すでに起動している各 fpasoterm は一度だけ自身の PTY へ書き込みます。local の一部選択時は sync channel へ送信しません。
|
|
217
|
+
|
|
218
|
+
window を開かずに CLI からも同じ操作を実行できます。
|
|
219
|
+
|
|
220
|
+
```sh
|
|
221
|
+
# 起動中の全 local fpasoterm window へ送信します。
|
|
222
|
+
fpasoterm --broadcast "git status"
|
|
223
|
+
|
|
224
|
+
# PID または完全一致 title で一つ以上の local target を選択します。
|
|
225
|
+
fpasoterm --broadcast "uptime" --broadcast-target 1234,"Build-2"
|
|
226
|
+
|
|
227
|
+
# 全 local window と設定済み trusted sync channel へ送信します。
|
|
228
|
+
fpasoterm --broadcast "hostname" --broadcast-sync
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
`--broadcast` は改行コードを正規化して Enter を末尾へ追加します。`--broadcast-target` は繰り返し指定または comma 区切りで使え、存在しない selector は error になります。target を指定しない場合は起動中の全 local window が対象です。`--broadcast-sync` は全 local window を選択している場合だけ使え、`[sync] enabled = true`、`commands = true`、32文字以上の`commandSecret`が必要です。別 machine の fpasoterm を起動する機能ではなく、同じtrusted folder、channel、secretを使用して既に起動しているinstanceだけがcommandを受信します。
|
|
232
|
+
|
|
233
|
+
これは trusted folder を前提にした機能です。command JSONにはHMAC-SHA-256署名が必要ですが、secretを持つdeviceは参加中terminalへcommandを入力できます。暗号化、remote起動、遅延実行は行いません。sharedまたは信頼できないfolderではsynced commandを有効にしないでください。
|
|
234
|
+
|
|
235
|
+
## Terminal Output Logs
|
|
236
|
+
|
|
237
|
+
sync folder の diagnostics と terminal output logging は別機能です。hamburger menu に `Log Start (^S)` / `Log Stop (^S)` と `Log Show (^P)` を表示します。`Ctrl+Shift+L` はlog操作にfocusした状態でmenuを開き、`Ctrl+Shift+S` で terminal output のlocal log fileへの記録を開始または停止し、`Ctrl+Shift+P` でcaptured `terminal-*.log` の一覧から表示対象を選択する画面を開きます。log panel では選択した停止済み log の削除ができ、`Delete All` は log panel 内の確認で承認された場合だけ active log を空にして、設定済み log directory の停止済み `terminal-*.log` を全て削除します。保存される log file は読みやすさのため一般的な ANSI/control sequence、OSC sequence、CR/control character を除去または改行へ正規化します。既定では `~/.config/fpasoterm/User/logs` 配下へ保存します。
|
|
238
|
+
|
|
239
|
+
`Log Show` では、検索欄と `Search` ボタンで表示中の log text の次の一致箇所を選択し、その位置へ scroll します。`Search` の繰り返し、または `N` で全ての一致箇所を順番に進み、末尾の後は先頭に戻ります。`P` は前の一致箇所へ戻ります。log text area に focus がある場合は、`j` で次、`k` で前の一致箇所へ移動します。矢印キーは通常の text area scroll 用に残します。counter は現在の一致番号を表示します。表示された log text を選択して `Ctrl+Shift+C` を押すと、terminal selection copy と同じ clipboard 経路で選択範囲をコピーします。
|
|
240
|
+
|
|
241
|
+
tmux、screen、byobu、herdr を使っている場合、fpasoterm が受け取るのは multiplexer が描画した後の PTY output stream です。どの pane がどの byte を出したかを fpasoterm 側で確実に判定できないため、pane 単位の log は `tmux capture-pane` や multiplexer 側の pane logging 機能で取得してください。
|
|
242
|
+
|
|
243
|
+
`--setup-sync` の `Store terminal output logs in the sync folder?` で `N` または Enter を選ぶと、terminal output log は同期フォルダへ置かれません。通常はこのままで構いません。
|
|
244
|
+
|
|
245
|
+
`y` を選ぶと、次の `Terminal log directory` の既定値は Google Drive などの同期フォルダ配下になります。例えば Windows では `G:\マイドライブ\fpasoterm-sync\logs` のように表示されることがあります。これは Windows 上のローカル path ですが、Google Drive for desktop によって他端末へ同期されます。
|
|
246
|
+
|
|
247
|
+
path には `~`、`%USERPROFILE%`、`$HOME` などを使えます。ただし、ChromeOS、macOS、Windows で同じ設定を共有する場合は、`~` または各 OS ごとの実 path を使う方が分かりやすいです。
|
|
248
|
+
|
|
249
|
+
log を同期フォルダに置きたい場合だけ次のように設定します。
|
|
250
|
+
|
|
251
|
+
```toml
|
|
252
|
+
[logging]
|
|
253
|
+
enabled = true
|
|
254
|
+
directory = "~/Google Drive/fpasoterm-sync/logs"
|
|
255
|
+
autoStart = false
|
|
256
|
+
maxBytes = 10485760
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
terminal 内からも同じ機能を制御できます。
|
|
260
|
+
|
|
261
|
+
```sh
|
|
262
|
+
printf '\033]777;log=start\a\r\n'
|
|
263
|
+
printf '\033]777;log=stop\a\r\n'
|
|
264
|
+
printf '\033]777;log=start;logPath=session.log\a\r\n'
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
PowerShell の場合:
|
|
268
|
+
|
|
269
|
+
```powershell
|
|
270
|
+
[Console]::Write("$([char]27)]777;log=start$([char]7)`r`n")
|
|
271
|
+
[Console]::Write("$([char]27)]777;log=stop$([char]7)`r`n")
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## セキュリティ
|
|
275
|
+
|
|
276
|
+
sync folder diagnostics 機能で自動同期されるのは diagnostics だけです。terminal 全出力は自動同期しません。
|
|
277
|
+
|
|
278
|
+
terminal log には command output、prompt、その他の機密情報が含まれる可能性があります。`logging.directory` を同期フォルダに向ける場合は、そのフォルダの保護に注意してください。
|
|
279
|
+
|
|
280
|
+
初期実装では plain JSON と plain terminal log として保存します。機密情報を扱う場合は、同期フォルダ自体の保護に注意してください。必要であれば、今後の版で payload 暗号化を追加できます。
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
setlocal
|
|
3
|
+
|
|
4
|
+
rem Resolve the default config path relative to this batch file.
|
|
5
|
+
set "CONFIG_PATH=%~dp0config\default-appearance.toml"
|
|
6
|
+
|
|
7
|
+
rem Emit fpasoterm OSC 777 using Windows PowerShell, which is available on supported Windows installs.
|
|
8
|
+
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "$esc=[char]27; $bel=[char]7; [Console]::Write($esc + ']777;config=' + $env:CONFIG_PATH + $bel + [char]13 + [char]10)"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
$ErrorActionPreference = 'Stop'
|
|
2
|
+
|
|
3
|
+
# Resolve the default config path relative to this script.
|
|
4
|
+
$ConfigPath = Join-Path $PSScriptRoot 'config\default-appearance.toml'
|
|
5
|
+
|
|
6
|
+
# Emit fpasoterm OSC 777 so the running window restores the default appearance.
|
|
7
|
+
[Console]::Write("`e]777;config=$ConfigPath`a`r`n")
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
setlocal
|
|
3
|
+
|
|
4
|
+
rem Resolve the sample config path relative to this batch file.
|
|
5
|
+
set "CONFIG_PATH=%~dp0config\runtime-appearance.toml"
|
|
6
|
+
|
|
7
|
+
rem Emit fpasoterm OSC 777 using Windows PowerShell, which is available on supported Windows installs.
|
|
8
|
+
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "$esc=[char]27; $bel=[char]7; [Console]::Write($esc + ']777;config=' + $env:CONFIG_PATH + $bel + [char]13 + [char]10)"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
$ErrorActionPreference = 'Stop'
|
|
2
|
+
|
|
3
|
+
# Resolve the sample config path relative to this script.
|
|
4
|
+
$ConfigPath = Join-Path $PSScriptRoot 'config\runtime-appearance.toml'
|
|
5
|
+
|
|
6
|
+
# Emit fpasoterm OSC 777 so the running window applies the sample appearance.
|
|
7
|
+
[Console]::Write("`e]777;config=$ConfigPath`a`r`n")
|