Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Sipp

Minimal code sharing

Overview

A single binary for code sharing with a web server and interactive TUI.

  • Create snippets and share on the web
  • Raw output for CLI tools -- curl, wget, and httpie get plain text automatically
  • Interactive TUI with authenticated access for snippet management
  • Minimal, fast, and low memory consumption

Quickstart

cargo install sipp-so
sipp --help

Start a server and create a snippet:

sipp server --port 3000
# Path to file
sipp path/to/file.rs
 
# Or use the interactive TUI
sipp

Install

Sipp can be installed several ways:

Homebrew

brew install stevedylandev/tap/sipp-so

Cargo

cargo install sipp-so

Releases

Visit the releases page for binaries and install scripts.

CLI

sipp [OPTIONS] [FILE] [COMMAND]

Commands

CommandDescription
serverStart the web server
tuiLaunch the interactive TUI
authSave remote URL and API key to config file

Arguments

ArgumentDescription
[FILE]File path to create a snippet from

Options

OptionDescription
-r, --remote <URL>Remote server URL (env: SIPP_REMOTE_URL)
-k, --api-key <KEY>API key for authenticated operations (env: SIPP_API_KEY)

Server

Sipp includes a built-in web server powered by Axum. Start it with:

sipp server --port 3000 --host localhost

Environment Variables

VariableDescription
SIPP_API_KEYAPI key for protecting endpoints
SIPP_AUTH_ENDPOINTSComma-separated list of endpoints requiring auth: api_list, api_create, api_get, api_delete, all, or none (defaults to api_delete,api_list)
SIPP_MAX_CONTENT_SIZEMaximum snippet content size in bytes (defaults to 512000 / 500 KB)
SIPP_DB_PATHCustom path for the SQLite database file (defaults to sipp.sqlite)

API Endpoints

MethodEndpointDescription
GET/api/snippetsList all snippets
POST/api/snippetsCreate a snippet ({"name": "...", "content": "..."})
GET/api/snippets/{short_id}Get a snippet by ID
PUT/api/snippets/{short_id}Update a snippet
DELETE/api/snippets/{short_id}Delete a snippet by ID

Authenticated endpoints require an x-api-key header.

Raw Output for CLI Tools

When you access a snippet URL (/s/{short_id}) with curl, wget, or httpie, the server returns the raw content as plain text instead of HTML:

curl https://sipp.so/s/abc123

TUI

The Sipp TUI makes it easy to create, copy, share, and manage your snippets either locally or remotely.

# Launch TUI (default behavior when no file argument is given)
sipp
 
# Or explicitly
sipp tui
 
# With remote options
sipp -r https://sipp.so -k your-api-key

Local Access

If you are running sipp in the same directory as the sipp.sqlite file created by the server instance, the TUI will automatically access the database locally.

Remote Access

To access a remote instance:

  • Set the SIPP_API_KEY variable in your server instance
  • Run sipp auth to enter your server URL and API key, stored under $HOME/.config/sipp

Keybindings

KeyAction
j/DownMove down / Scroll down
k/UpMove up / Scroll up
EnterFocus content pane
EscBack / Quit
yCopy snippet content
YCopy snippet link
oOpen in browser
eEdit snippet
dDelete snippet
cCreate snippet
/Search snippets
rRefresh snippets (remote only)
qQuit
?Toggle help

Structure

sipp/
├── src/
│   ├── main.rs        # CLI argument parsing and entry point
│   ├── lib.rs         # Library exports
│   ├── server.rs      # Axum web server, routes, and templates
│   ├── tui.rs         # Interactive terminal UI
│   ├── db.rs          # SQLite database layer
│   ├── backend.rs     # Local/remote backend abstraction
│   ├── config.rs      # Config file management
│   └── highlight.rs   # Syntax highlighting with custom themes
├── templates/         # Askama HTML templates
├── static/            # Fonts, favicons, and styles
├── Dockerfile
└── docker-compose.yml

Deployment

Railway

Deploy on Railway

Docker

SIPP_API_KEY=your-secret-key docker compose up -d

Binary

cargo build --release -p sipp

The resulting binary is self-contained with all assets embedded. Copy it to your server with your environment variables configured and run it directly.