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: twinleaf-tools/README.md
+27-12Lines changed: 27 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,28 +2,43 @@
2
2
3
3
Command-line tools for working with Twinleaf quantum sensors and accessories. Contains a proxy, terminal UIs, and command line utilities.
4
4
5
-
**Note**: In versions <2.0.0, this crate contained binaries named `tio-proxy`, `tio-monitor`, `tio-health`, and `tio-tool`. These commands have been packaged into subcommands under the single binary `tio`. The former three original commands can be simply used without the `-`, while`tio-tool {toolname}` calls have largely been replaced with `tio {toolname}`.
5
+
**Note**: In versions <2.0.0, this crate contained binaries named `tio-proxy`, `tio-monitor`, `tio-health`, and `tio-tool`. These commands are now packaged as subcommands under a singular binary `tio`. These commmands are now used without the `-`, with`tio-tool {toolname}` calls having been replaced with `tio {toolname}`.
6
6
7
-
## CLI Usage
8
-
All the tools mentioned can have the `--help` argument added to display more information. The general workflow is to connect using `tio proxy` which allows all the CLI tools to work with the single device at the same time.
7
+
### Shell completions
8
+
9
+
`tio` can generate completion scripts for bash, zsh, fish, and PowerShell. Add the matching line to your shell's config file:
10
+
11
+
# Bash (~/.bashrc)
12
+
eval "$(tio completions bash)"
13
+
14
+
# Zsh (~/.zshrc)
15
+
eval "$(tio completions zsh)"
16
+
17
+
# Fish (~/.config/fish/config.fish)
18
+
tio completions fish | source
19
+
20
+
# PowerShell ($PROFILE)
21
+
tio completions powershell | Invoke-Expression
22
+
23
+
Run `tio completions --help` to see the full list of supported shells. Zsh users may need to prepend `autoload -Uz compinit && compinit`.
9
24
10
25
### Connecting to the device
11
26
12
-
The proxymakes a device attached via serial port available via Ethernet. The following will automatically scan for a `twinleaf` serial device:
27
+
The general workflow is to connect using `tio proxy` which allows all the CLI tools to work with the single device at the same time. The proxy makes a device attached via serial port available via Ethernet. With no arguments it automatically scans for a `twinleaf` serial device:
13
28
14
-
tio proxy --auto
29
+
tio proxy
15
30
16
-
When there are more than one serial port available, it is necessary to specify the port using:
31
+
When more than one serial port is available, specify the URL:
17
32
18
-
[linux] tio proxy -r /dev/ttyACM0
19
-
[macOS] tio proxy -r /dev/cu.usbserialXXXXXX
20
-
[wsl1] tio proxy -r COM3
33
+
[linux] tio proxy serial:///dev/ttyACM0
34
+
[macOS] tio proxy serial:///dev/cu.usbserialXXXXXX
35
+
[wsl1] tio proxy serial://COM3
21
36
22
37
The proxy allows multiple tools to connect to the device over TCP simultaneously.
23
38
24
-
When a sensor is attached to a hub at port `0`, it is possible to proxy the data directly to that port using the `-s` flag:
39
+
When a sensor is attached to a hub at port `0`, restrict the proxy's subtree using the `-s` flag:
25
40
26
-
tio proxy --auto -s /0
41
+
tio proxy -s /0
27
42
28
43
### Interacting with the device in terminal
29
44
@@ -58,7 +73,7 @@ Device commands:
58
73
59
74
### tio monitor
60
75
61
-
Displays a live stream of incoming data with in-terminal graphs and command suggestions. Graph a stream by selecting it with the arrow keys and pressing Enter, and enter command mode by typing `:` (colon). Use `tio monitor -s {port}` to specify which port to open or `tio monitor -a` to open all ports.
76
+
Displays a live stream of incoming data with in-terminal graphs and command suggestions. Graph a stream by selecting it with the arrow keys and pressing Enter, and enter command mode by typing `:` (colon). Use `tio monitor -s {route}` to scope the view to a single device subtree (e.g. `-s /0/1`), or `--depth N` to limit how deep the device tree is traversed.
0 commit comments