File size: 4,693 Bytes
6a7089a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# CLI Overview

`pinchtab` has two normal usage styles:

- interactive menu mode
- direct command mode

Use menu mode when you want a guided local control surface.
Use direct commands when you want a faster shell workflow or want to script PinchTab.

## Interactive Menu

When you run `pinchtab` with no subcommand in an interactive terminal, it shows the startup banner and main menu.

Typical flow:

```text
listen    running  127.0.0.1:9867
str,plc   simple,fcfs
daemon    ok
security  [■■■■■■■■■■]  LOCKED

Main Menu
  1. Start server
  2. Daemon
  3. Start bridge
  4. Start MCP server
  5. Config
  6. Security
  7. Help
  8. Exit
```

What each entry does:

- `Start server` starts the full PinchTab server
- `Daemon` shows background service status and actions
- `Start bridge` starts the single-instance bridge runtime
- `Start MCP server` starts the stdio MCP server
- `Config` opens the interactive config screen
- `Security` opens the interactive security screen
- `Help` shows the command help tree

## Direct Commands

You can always bypass the menu and call commands directly.

Common examples:

```bash
pinchtab server
pinchtab daemon
pinchtab config
pinchtab security
pinchtab nav https://example.com
pinchtab snap -i -c
pinchtab click e5
pinchtab text
```

Direct commands are the better fit when:

- you are scripting PinchtTab
- you want repeatable shell history
- you are calling PinchtTab from another tool
- you already know which command you want

## Core Local Commands

These are the main local-control commands surfaced in the menu:

| Command | Purpose |
| --- | --- |
| `pinchtab` | Open the interactive menu in a terminal, or start the server in non-interactive use |
| `pinchtab server` | Start the full server and dashboard |
| `pinchtab daemon` | Show daemon status and manage the background service |
| `pinchtab config` | Open the interactive config overview/editor |
| `pinchtab security` | Review or change the current security posture |
| `pinchtab completion <shell>` | Generate shell completion scripts for `bash`, `zsh`, `fish`, or `powershell` |
| `pinchtab bridge` | Start the single-instance bridge runtime |
| `pinchtab mcp` | Start the stdio MCP server |

## Shell Completion

Use the built-in completion command to generate shell-specific scripts:

```bash
# Generate and install zsh completions
pinchtab completion zsh > "${fpath[1]}/_pinchtab"

# Generate bash completions
pinchtab completion bash > /etc/bash_completion.d/pinchtab

# Generate fish completions
pinchtab completion fish > ~/.config/fish/completions/pinchtab.fish
```

## Browser Shortcuts

The most common browser control shortcuts are top-level commands:

| Command | Purpose |
| --- | --- |
| `pinchtab nav <url>` | Navigate to a URL |
| `pinchtab quick <url>` | Navigate and analyze the page |
| `pinchtab snap` | Get an accessibility snapshot |
| `pinchtab click <ref>` | Click an element ref |
| `pinchtab type <ref> <text>` | Type into an element |
| `pinchtab fill <ref|selector> <text>` | Fill an input directly |
| `pinchtab text` | Extract page text |
| `pinchtab screenshot` | Capture a screenshot |
| `pinchtab pdf` | Export the current page as PDF |
| `pinchtab health` | Check server health |

## Config From The CLI

`pinchtab config` now acts as the main interactive config screen.

It shows:

- instance strategy
- allocation policy
- default stealth level
- default tab eviction policy
- config file path
- dashboard URL when the server is running
- the masked server token
- a `Copy token` action for clipboard/manual copy

For exact config commands and schema details, see [Config](./config.md).

## Security From The CLI

`pinchtab security` is the main interactive security screen.

Use it to:

- review the current posture
- inspect warnings
- edit individual security controls
- apply `security up`
- apply `security down`

The direct subcommands also exist:

```bash
pinchtab security up
pinchtab security down
```

For broader security guidance, see [Security Guide](../guides/security.md).

## Daemon From The CLI

`pinchtab daemon` shows status, recent logs, and available actions.

The command is supported on:

- macOS via `launchd`
- Linux via user `systemd`

It will fail fast when the current environment cannot manage a user service, for example:

- Linux shells without a working `systemctl --user` session
- macOS sessions without an active GUI `launchd` domain

For operational details, see [Background Service (Daemon)](../guides/daemon.md).

## Full Command Tree

Use the built-in help for the current command tree:

```bash
pinchtab --help
```

For per-command reference pages, start at [Reference Index](./index.md).