https://github.com/empathic/hotline
Easy bug reports from distributed applications
https://github.com/empathic/hotline
Last synced: 3 months ago
JSON representation
Easy bug reports from distributed applications
- Host: GitHub
- URL: https://github.com/empathic/hotline
- Owner: empathic
- License: apache-2.0
- Created: 2026-02-13T22:33:01.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-03-29T22:16:08.000Z (3 months ago)
- Last Synced: 2026-03-30T00:54:13.984Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 147 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hotline
[](https://crates.io/crates/hotln)
[](https://www.npmjs.com/package/hotln)
[](https://www.npmjs.com/package/hotln-proxy)
A library for filing bug reports to [Linear](https://linear.app) and
[GitHub Issues](https://github.com) from distributed applications. Reports
are sent through a proxy server that holds API credentials.
Available for [Rust](https://crates.io/crates/hotln) and [TypeScript/JavaScript](https://www.npmjs.com/package/hotln).
The proxy server is available as [`hotln-proxy`](https://www.npmjs.com/package/hotln-proxy).
## Usage
### Rust
```rust
hotln::github("https://your-proxy.example.com")
.with_token("secret")
.title("crash on startup")
.text("Something went wrong.")
.file("config.toml", &toml_str)
.create()?;
hotln::linear("https://your-proxy.example.com")
.with_token("secret")
.title("crash on startup")
.text("Details.")
.attachment("crash.log", &log_bytes)
.create()?;
```
### TypeScript
```typescript
import hotln from "hotln";
await hotln.github("https://your-proxy.example.com")
.withToken("secret")
.title("crash on startup")
.text("Something went wrong.")
.file("config.toml", tomlStr)
.create();
await hotln.linear("https://your-proxy.example.com")
.withToken("secret")
.title("crash on startup")
.text("Details.")
.attachment("crash.log", logBytes)
.create();
```
## Builder API
Both backends use a fluent builder. Call `.create()` to send the request and
get back the issue URL (`Result` in Rust, `Promise` in
TypeScript).
| Method | Description |
|--------|-------------|
| `.title(s)` | Set the issue title |
| `.text(s)` | Append a text block to the body |
| `.file(name, content)` | Append a fenced code block to the body |
| `.attachment(name, data)` | **Linear only.** Upload as a real Linear attachment (binary OK) |
| `.with_token(s)` | Set a bearer token for proxy auth |
| `.create()` | Send the request and return the issue URL |
`.text()` and `.file()` blocks are joined in order, separated by blank lines.
## Proxy protocol
The client POSTs JSON to the proxy. Each backend has its own path:
- `POST /linear` — create a Linear issue
- `POST /github` — create a GitHub issue
If `with_token` is set, the client sends an `Authorization: Bearer ` header.
### Linear request
```typescript
interface LinearRequest {
title: string;
description: string;
attachments?: {
filename: string;
contentType: string;
data: string;
encoding?: "text" | "base64";
}[];
}
```
### GitHub request
```typescript
interface GitHubRequest {
title: string;
description: string;
}
```
### Response (both backends)
```typescript
interface Response {
url: string; // URL of the created issue
}
```
## Proxy
A reference proxy implementation lives in `hotln-proxy/`. See
[hotln-proxy/README.md](hotln-proxy/README.md) for setup and configuration.
## CLI
```
hotln github "crash on startup" --proxy-url https://worker.example.com
hotln linear "crash on startup" --proxy-url https://worker.example.com
hotln linear "crash on startup" --proxy-url https://worker.example.com -f config.toml -a crash.log
```
All flags can also be set via environment variables (`HOTLINE_PROXY_URL`,
`HOTLINE_PROXY_TOKEN`).