Webpaste
Upload code snippets, git diffs, command logs, or text files to https://pastes.dev.
When to use
- Share code snippets, traces, logs, or diffs via a web URL.
- Upload file contents or pipe stdin to pastes.dev.
- Inspect or retrieve existing pastes by key.
Public entrypoint
uv run --script <skill-dir>/scripts/cli.py [OPTIONS] [FILE]
Common calls
# Upload a file (language inferred from file extension)
webpaste src/server.ts
# Pipe stdin with explicit language or shebang detection
git diff | webpaste -l diff
# Upload with JSON output for machine consumers
webpaste --json src/config.json
# Fetch / read raw content of an existing paste by key
webpaste --get <key>
# Target a custom base URL
webpaste --base-url http://localhost:8080/data/ src/app.py
Options
FILE: Path to local file. Reads from stdin if omitted or -.
-l, --lang: Explicit syntax language or alias (e.g. python, py, ts, diff, json, rust, shell, yaml, plain).
--json: Output result as JSON {"key": "...", "url": "...", "raw_url": "..."}.
--raw: Output only the paste key.
--raw-url: Output direct raw content URL.
--get <KEY>: Fetch and print content of an existing paste.
--base-url <URL>: API base URL (default: https://api.pastes.dev/).
--user-agent <UA>: User-Agent header string (default: webpaste-cli/0.1.0).
--timeout <SEC>: Network timeout in seconds (default: 15).
--no-gzip: Disable request body compression.
Supported languages
plain, log, yaml, json, xml, ini, java, javascript, typescript, python, kotlin, scala, cpp, csharp, shell, ruby, rust, sql, go, lua, swift, c, html, css, scss, php, graphql, diff, dockerfile, markdown, proto.
Exit codes
0: Success.
1: Network, HTTP, or API error.
2: File not found or invalid arguments.
1---2name: webpaste3description: Use to upload code, diffs, logs, or text to pastes.dev via CLI or stdin with automatic syntax highlighting.4license: AGPL-3.0-or-later5---67# Webpaste89Upload code snippets, git diffs, command logs, or text files to https://pastes.dev.1011## When to use1213- Share code snippets, traces, logs, or diffs via a web URL.14- Upload file contents or pipe stdin to pastes.dev.15- Inspect or retrieve existing pastes by key.1617## Public entrypoint1819```bash20uv run --script <skill-dir>/scripts/cli.py [OPTIONS] [FILE]21```2223## Common calls2425```bash26# Upload a file (language inferred from file extension)27webpaste src/server.ts2829# Pipe stdin with explicit language or shebang detection30git diff | webpaste -l diff3132# Upload with JSON output for machine consumers33webpaste --json src/config.json3435# Fetch / read raw content of an existing paste by key36webpaste --get <key>3738# Target a custom base URL39webpaste --base-url http://localhost:8080/data/ src/app.py40```4142## Options4344- `FILE`: Path to local file. Reads from `stdin` if omitted or `-`.45- `-l`, `--lang`: Explicit syntax language or alias (e.g. `python`, `py`, `ts`, `diff`, `json`, `rust`, `shell`, `yaml`, `plain`).46- `--json`: Output result as JSON `{"key": "...", "url": "...", "raw_url": "..."}`.47- `--raw`: Output only the paste key.48- `--raw-url`: Output direct raw content URL.49- `--get <KEY>`: Fetch and print content of an existing paste.50- `--base-url <URL>`: API base URL (default: `https://api.pastes.dev/`).51- `--user-agent <UA>`: User-Agent header string (default: `webpaste-cli/0.1.0`).52- `--timeout <SEC>`: Network timeout in seconds (default: 15).53- `--no-gzip`: Disable request body compression.5455## Supported languages5657`plain`, `log`, `yaml`, `json`, `xml`, `ini`, `java`, `javascript`, `typescript`, `python`, `kotlin`, `scala`, `cpp`, `csharp`, `shell`, `ruby`, `rust`, `sql`, `go`, `lua`, `swift`, `c`, `html`, `css`, `scss`, `php`, `graphql`, `diff`, `dockerfile`, `markdown`, `proto`.5859## Exit codes6061- `0`: Success.62- `1`: Network, HTTP, or API error.63- `2`: File not found or invalid arguments.