Minimal code sharing
sipp.mp4
- Single binary for web server and TUI
- Create snippets and share on the web
- Raw output for CLI tools —
curl,wget, andhttpieget plain text automatically - Interactive TUI with authenticated access for snippet management
- Minimal, fast, and low memory consumption
1. Install
Install via the releases page, or directly with cargo
cargo install sipp-soTo confirm it was installed correctly run the following
sipp --help2. Start Server
For demo purposes you can run this locally, but ideally this would be run in a deployment server with a proper ENV setup with your admin key.
sipp server --port 30003. Create a Snippet
You can either open up http://localhost:3000 and create a snippet in a web browser, or use the TUI. In the same directory, open a new terminal window and use
# Path to file
sipp path/to/file.rs
# Or use the interactive tui
sippA small instance running at sipp.so that can be used for testing and demo purposes.
sipp -r https://sipp.soWarning
All snippets created here are public and might be deleted at any time; host your own instance with your own API key for personal use!
Sipp can be installed several ways
Visit the releases page and install through cURL script and other methods.
brew install stevedylandev/tap/sipp-so
cargo install sipp-sosipp [OPTIONS] [FILE] [COMMAND]
| Command | Description |
|---|---|
server |
Start the web server |
tui |
Launch the interactive TUI |
auth |
Save remote URL and API key to config file |
| Argument | Description |
|---|---|
[FILE] |
File path to create a snippet from |
| Option | Description |
|---|---|
-r, --remote <URL> |
Remote server URL (e.g. http://localhost:3000) (env: SIPP_REMOTE_URL) |
-k, --api-key <KEY> |
API key for authenticated operations (env: SIPP_API_KEY) |
Sipp includes a built-in web server powered by Axum. Start it with:
sipp server --port 3000 --host localhost| Variable | Description |
|---|---|
SIPP_API_KEY |
API key for protecting endpoints |
SIPP_AUTH_ENDPOINTS |
Comma-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_SIZE |
Maximum snippet content size in bytes (defaults to 512000 / 500 KB) |
SIPP_DB_PATH |
Custom path for the SQLite database file (defaults to sipp.sqlite in the working directory) |
The server stores snippets in a local sipp.sqlite SQLite database.
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/snippets |
List all snippets |
POST |
/api/snippets |
Create a snippet ({"name": "...", "content": "..."}) |
GET |
/api/snippets/{short_id} |
Get a snippet by ID |
PUT |
/api/snippets/{short_id} |
Update a snippet ({"name": "...", "content": "..."}) |
DELETE |
/api/snippets/{short_id} |
Delete a snippet by ID |
Authenticated endpoints require an x-api-key header.
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/abc123The Sipp TUI makes it easy to create, copy, share, and manage your snippets either locally or remotely. Launch it with:
# 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-keyIf you are running sipp in the same directory as the sipp.sqlite file created by the server instance, the TUI will automatically access the datebase locally and you can edit it directly.
To access a remote instance of Sipp make sure to do the following:
- Set the
SIPP_API_KEYvariable in your server instance - Run
sipp authto enter in your server instance URL and the API key, which will be stored under$HOME/.config/sipp. You can also set these with the ENV variablesSIPP_REMOTE_URLandSIPP_API_KEY
Note
You can try a limited remote instance without an API key with sipp -r https://sipp.so
While inside the TUI the following actions are available
| Key | Action |
|---|---|
j/↓ |
Move down / Scroll down |
k/↑ |
Move up / Scroll up |
Enter |
Focus content pane |
Esc |
Back / Quit |
y |
Copy snippet content |
Y |
Copy snippet link |
o |
Open in browser |
e |
Edit snippet |
d |
Delete snippet |
c |
Create snippet |
/ |
Search snippets |
r |
Refresh snippets (remote only) |
q |
Quit |
? |
Toggle help |
Since Sipp is a single binary it can be run in virtually any enviornment.
Create a service file at /etc/systemd/system/sipp.service:
[Unit]
Description=Sipp snippet server
After=network.target
[Service]
ExecStart=/usr/local/bin/sipp server --port 3000 --host 0.0.0.0
Environment=SIPP_API_KEY=your-secret-key
WorkingDirectory=/var/lib/sipp
Restart=on-failure
[Install]
WantedBy=multi-user.targetsudo systemctl enable --now sippA Dockerfile and docker-compose.yml are included in the repository.
# Using Docker Compose (recommended)
SIPP_API_KEY=your-secret-key docker compose up -d
# Or build and run manually
docker build -t sipp .
docker run -p 3000:3000 -e SIPP_API_KEY=your-secret-key -v sipp-data:/data sipp