2025-02-08 14:17:20 +01:00
# servicepoint-cli
This repository contains a command line interface for the ServicePoint display.
To send commands, this uses the [servicepoint crate ](https://crates.io/crates/servicepoint ).
2025-02-08 14:27:59 +01:00
## Installation with cargo
2025-02-08 14:17:20 +01:00
```shell
2025-02-08 14:27:59 +01:00
cargo install servicepoint-cli
2025-02-08 14:17:20 +01:00
```
2025-02-08 14:27:59 +01:00
If you have set your PATH to include the ~/.cargo/bin, you can now run `servicepoint-cli` .
## Running with nix
2025-02-08 14:17:20 +01:00
```shell
# from CCCB Forgejo
nix run git+https://git.berlin.ccc.de/servicepoint/servicepoint-cli.git -- < args >
# from GitHub mirror
nix run github:kaesaecracker/servicepoint-cli -- < args >
```
2025-02-08 14:27:59 +01:00
## Running a debug build
```shell
git clone https://git.berlin.ccc.de/servicepoint/servicepoint-cli.git
cd servicepoint-cli
cargo run -- < args >
```
2025-02-12 20:46:34 +01:00
## Usage
```
Usage: servicepoint-cli [OPTIONS] < COMMAND >
Commands:
reset-everything [aliases: r]
pixels [aliases: p]
brightness [aliases: b]
stream [aliases: s]
help Print this message or the help of the given subcommand(s)
Options:
-d, --destination < DESTINATION > ip:port of the servicepoint display [default: 127.0.0.1:2342]
-t, --transport < TRANSPORT > protocol to use for communication with display [default: udp] [possible values: udp, web-socket, fake]
-v, --verbose verbose logging
-h, --help Print help
-V, --version Print version
```
### Stream
```
Usage: servicepoint-cli stream < COMMAND >
Commands:
2025-02-12 22:02:17 +01:00
stdin Pipe text to the display, example: `journalctl | servicepoint-cli stream stdin`
screen Stream the default source to the display. On Linux Wayland, this pops up a screen or window chooser, but it also may directly start streaming your main screen.
2025-02-12 20:46:34 +01:00
help Print this message or the help of the given subcommand(s)
2025-02-12 22:02:17 +01:00
```
#### Screen
```
Usage: servicepoint-cli stream screen [OPTIONS]
Options:
-n, --no-dither Disable dithering
-p, --pointer Show mouse pointer in video feed
-h, --help Print help
```
#### Stdin
```
Usage: servicepoint-cli stream stdin [OPTIONS]
2025-02-12 20:46:34 +01:00
Options:
2025-02-12 22:02:17 +01:00
-s, --slow
2025-02-12 20:46:34 +01:00
-h, --help Print help
```
### Brightness
```
Usage: servicepoint-cli brightness < COMMAND >
Commands:
2025-02-12 22:02:17 +01:00
max Reset brightness to the default (max) level [aliases: r, reset]
set Set one brightness for the whole screen [aliases: s]
min Set brightness to lowest possible level.
help Print this message or the help of the given subcommand(s)
2025-02-12 20:46:34 +01:00
```
### Pixels
2025-02-12 22:02:17 +01:00
2025-02-12 20:46:34 +01:00
```
Usage: servicepoint-cli pixels < COMMAND >
Commands:
2025-02-12 22:02:17 +01:00
off Reset all pixels to the default (off) state [aliases: r, reset]
invert Invert the state of all pixels [aliases: i]
on Set all pixels to the on state
help Print this message or the help of the given subcommand(s)
2025-02-12 20:46:34 +01:00
```
2025-02-08 14:17:20 +01:00
## Contributing
If you have ideas on how to improve the code, add features or improve documentation feel free to open a pull request.
You think you found a bug? Please open an issue.
2025-02-12 20:46:34 +01:00
Submissions on [Forgejo ](https://git.berlin.ccc.de/servicepoint/servicepoint-cli ) are preferred, but you can also use [GitHub ](https://github.com/kaesaecracker/servicepoint-cli ).
2025-02-08 14:17:20 +01:00
All creatures welcome.
## License
This code is licensed under [GNU General Public License v3.0 or later ](https://www.gnu.org/licenses/gpl-3.0-standalone.html ).