Skip to content

pszemraj/localpaste.rs

Repository files navigation

LocalPaste.rs

A fast, localhost-only pastebin with a modern editor, built in Rust.

LocalPaste Screenshot

What It Is

LocalPaste provides:

  • Native desktop GUI (localpaste-gui) as the primary UX
  • Headless API server (localpaste) for automation/integration
  • CLI client (lpaste) for terminal workflows

Warning

Keep exactly one writer process per DB_PATH (localpaste-gui or standalone localpaste).

Quick Start

GUI is the default workspace target:

# Desktop GUI
cargo run

# Explicit GUI binary
cargo run -p localpaste_gui --bin localpaste-gui

Headless server + CLI flow:

# Terminal A: run server on default local endpoint (127.0.0.1:38411)
cargo run -p localpaste_server --bin localpaste

# Terminal B: create/list via CLI
echo "hello from quickstart" | cargo run -p localpaste_cli --bin lpaste -- new --name "quickstart"
cargo run -p localpaste_cli --bin lpaste -- list --limit 5

If your server is not on the default endpoint, set LP_SERVER (or pass --server):

# bash example
export LP_SERVER="http://127.0.0.1:38973"

# powershell example
$env:LP_SERVER="http://127.0.0.1:38973"

Language detection and highlighting defaults:

  • localpaste_gui and localpaste_server enable magika by default.
  • localpaste_cli stays heuristic-only by default.
  • Feature/runtime details: docs/language-detection.md.

Precompiled Binaries

GitHub Releases publish GUI assets under localpaste-* filenames. lpaste and the standalone localpaste server are source-built with Cargo. Artifact names, platform coverage, checksums, and macOS signing/notarization behavior are in docs/release-gui.md.

Configuration and Ops

License

MIT