You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,26 @@ description: All TermBeam CLI flags and options — ports, passwords, tunnels, s
46
46
!!! info "Legacy Variables"
47
47
The environment variables `PTY_PASSWORD` and `PTY_CWD` are also supported as fallbacks for `TERMBEAM_PASSWORD` and `TERMBEAM_CWD` respectively.
48
48
49
+
## Subcommands
50
+
51
+
### `termbeam service`
52
+
53
+
TermBeam includes a `service` subcommand for managing a PM2-based background service. Run `termbeam service install` to launch an interactive wizard that configures and starts the service.
The wizard saves its configuration to `~/.termbeam/ecosystem.config.js`. You can edit this file manually and run `termbeam service restart` to apply changes.
66
+
67
+
For a full walkthrough of the wizard steps and each subcommand, see [Running in Background](running-in-background.md#interactive-setup-easiest).
Copy file name to clipboardExpand all lines: docs/getting-started.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,3 +118,13 @@ The bottom touch bar provides quick access to:
118
118
| ^C | Ctrl+C (interrupt process) |
119
119
120
120
Font size can be adjusted with **−** / **+** buttons in the top toolbar.
121
+
122
+
## Running as a Service
123
+
124
+
Want TermBeam always available in the background? The built-in service installer configures [PM2](https://pm2.keymetrics.io/) for you with an interactive wizard:
125
+
126
+
```bash
127
+
termbeam service install
128
+
```
129
+
130
+
After installation, manage the service with `termbeam service status`, `logs`, `restart`, or `uninstall`. For the full setup guide and alternative methods (systemd, launchd, Windows), see [Running in Background](running-in-background.md).
| 7. **Boot auto-start**| Start on system boot? | Default: Yes — runs `pm2 startup`|
49
+
50
+
If you choose **DevTunnel** access, a follow-up question asks whether the tunnel should be **private** (Microsoft login required) or **public** (anyone with the link). Choosing public with no password will auto-generate one for safety.
51
+
52
+
After confirming, the wizard generates an ecosystem config file, starts the PM2 process, and saves the process list.
53
+
54
+
<!-- prettier-ignore -->
55
+
!!! tip "Ecosystem config location"
56
+
The wizard saves the PM2 ecosystem file to `~/.termbeam/ecosystem.config.js`. This file contains all the CLI flags and environment variables for your service. You can edit it manually and run `termbeam service restart` to apply changes.
57
+
58
+
### Service Subcommands
59
+
60
+
After installation, manage the service with these subcommands:
61
+
62
+
#### `termbeam service status`
63
+
64
+
Shows detailed PM2 process information (equivalent to `pm2 describe <name>`), including uptime, restarts, memory usage, and log file paths.
65
+
66
+
```bash
67
+
termbeam service status
68
+
```
69
+
70
+
#### `termbeam service logs`
71
+
72
+
Tails the PM2 log output, showing the last 200 lines and streaming new output in real time. Press `Ctrl+C` to stop.
73
+
74
+
```bash
75
+
termbeam service logs
76
+
```
77
+
78
+
#### `termbeam service restart`
79
+
80
+
Restarts the PM2 process. Useful after editing the ecosystem config file or updating TermBeam.
81
+
82
+
```bash
83
+
termbeam service restart
84
+
```
85
+
86
+
#### `termbeam service uninstall`
87
+
88
+
Stops the PM2 process, removes it from PM2, and deletes the ecosystem config file. Prompts for confirmation before proceeding.
89
+
90
+
```bash
91
+
termbeam service uninstall
92
+
```
93
+
94
+
<!-- prettier-ignore -->
95
+
!!! warning
96
+
`uninstall` removes the service from PM2 and deletes the ecosystem config at `~/.termbeam/ecosystem.config.js`. If you've customized the config, back it up first.
0 commit comments