Beam
Beam me up Ferris!
What is Beam?
Beam an interface on top of the Teleport CLI. It uses skim, a fuzzy finder written in Rust, to provide a nice interface for searching and filtering.
Table of Contents
Installation
Make sure that you have the Teleport CLI installed, before using Beam.
For installing you will have to install Rust. Rustup is the recommended way to do that.
You can install beam through running:
&&
Configuration
Before using Beam you will have to configure a default profile.
If you want to use SSO as your authentication method, you will have to set sso for Authentication Method
For only showing specific labels, you can set yes for Do you want to only show specific labels?
Pattern matching
If you want to select a specific profile, for a set of hostnames, that match a specific pattern, you can specify yes for Do you want to auto-select this profile, using a regex pattern on the hostname?
|)\b
Beam will then match any of the following hostnames:
- quality.app.example.com
- staging.app.example.com
If the hostname doesnt match any profile pattern, Beam will use the default profile.
Important: Beam will only use the proxy from the default profile, when running the
beamcommand, as it does not know the hostname, before selecting it. When using thebeam connect <hostname>command, Beam will use the hostname from the command line and is able to use the proxy from the profile.
Caching
By default Beam caches the list of nodes it receives from Teleport for 24 hours. To avoid using cache you can use the --clear-cache or -c flag:
You can change the cache duration using the --cache-ttl flag.
The following example will cache the list of nodes for 1 hour:
Usage
A few useful Beam commands:
- Opening a fuzzy finder view for selecting a host:
- Listing the names of all available nodes
- Directly connect to a host via its hostname
- Manually selecting a profile to use
Search Syntax
Beam uses skim under the hood for its fuzzy search. The syntax for searching is the same as for skim. See skim for more information.
| Token | Match type | Description |
|---|---|---|
text |
fuzzy-match | items that match text |
^music |
prefix-exact-match | items that start with music |
.mp3$ |
suffix-exact-match | items that end with .mp3 |
'wild |
exact-match (quoted) | items that include wild |
!fire |
inverse-exact-match | items that do not include fire |
!.mp3$ |
inverse-suffix-exact-match | items that do not end with .mp3 |
skim also supports the combination of tokens.
- Whitespace has the meaning of
AND. With the termsrc main,skimwill search for items that match bothsrcandmain. |meansOR(note the spaces around|). With the term.md$ | .markdown$,skimwill search for items ends with either.mdor.markdown.ORhas higher precedence. Soreadme .md$ | .markdown$is grouped intoreadme AND (.md$ OR .markdown$).
Adding completions to your shell
In order to add completions to your shell, you can use one of the following commands: