79 lines
2.4 KiB
Markdown
79 lines
2.4 KiB
Markdown
# DebugReport
|
|
|
|
DebugReport is a command-line utility designed to record terminal sessions using `asciinema`, upload the recordings to Hastebin, and send notifications to Pushover. This utility is ideal for capturing debug sessions and sharing them easily.
|
|
|
|
## Installation
|
|
|
|
To use DebugReport, ensure you have the `asciinema` tool installed on your system.
|
|
|
|
### Installing Asciinema
|
|
|
|
You can install `asciinema` by following the instructions on their [official website](https://asciinema.org/docs/installation).
|
|
|
|
## Installation
|
|
|
|
To install the binary locally, you can use the provided installation script. Run the following command in your terminal:
|
|
|
|
```sh
|
|
curl -sSL https://git.nixc.us/colin/debugreport/raw/branch/master/install.sh | bash
|
|
```
|
|
|
|
This will download and install the debugreport and decodereport binary to your local machine.
|
|
|
|
## Usage
|
|
|
|
You can use DebugReport to record your terminal sessions, upload the recordings to Hastebin, and send notifications to Pushover.
|
|
|
|
### Start a Recording
|
|
|
|
Run the `debugreport` command:
|
|
|
|
```sh
|
|
debugreport
|
|
```
|
|
|
|
You will see a message indicating that the recording has started. To stop the recording, press `Ctrl+D` or type `exit`.
|
|
|
|
### Sending Notifications
|
|
|
|
After the recording is finished, you will be prompted to specify if the notification is a high-priority issue:
|
|
|
|
```
|
|
Is this a priority notification? (yes/no):
|
|
```
|
|
|
|
- If you answer `yes`, the notification will be sent as a high-priority (emergency) notification with a retry interval of 60 seconds and an expire time of 1800 seconds (30 minutes).
|
|
- If you answer `no`, the notification will be sent as a low-priority notification.
|
|
|
|
|
|
### Play a Recording
|
|
|
|
Run the `decodereport` command:
|
|
|
|
```sh
|
|
decodereport https://haste.nixc.us/token
|
|
```
|
|
|
|
## External Services
|
|
|
|
DebugReport interacts with the following external services:
|
|
|
|
- **Pushover**: Used to send notifications.
|
|
- **Hastebin**: Used to upload the recorded sessions.
|
|
|
|
Ensure you have accounts and necessary credentials for these services.
|
|
|
|
## Example
|
|
|
|
```sh
|
|
./debugreport
|
|
```
|
|
|
|
1. The program will start recording the terminal session.
|
|
2. To stop the recording, press `Ctrl+D` or type `exit`.
|
|
3. After the recording is finished, you will be prompted to specify if the notification is a high-priority issue.
|
|
4. The recording will be uploaded to Hastebin and a notification will be sent to Pushover with the recording URL.
|
|
|
|
## Dependencies
|
|
|
|
Ensure `asciinema` is installed and properly configured in your environment. |