惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
量子位
GbyAI
GbyAI
腾讯CDC
T
Tailwind CSS Blog
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
D
Docker
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
Netflix TechBlog - Medium
Jina AI
Jina AI
IT之家
IT之家
Y
Y Combinator Blog

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - skorotkiewicz/snip: A minimal snippet sharing se...
modinfo · 2026-05-01 · via Hacker News: Show HN

A minimal, self-hosted snippet sharing service. Share code snippets via web UI, CLI, or API.

Demo

Features

  • Web UI - Clean interface with syntax highlighting for 25+ languages
  • CLI Tool - Pipe snippets directly from terminal
  • API - RESTful API for integration
  • Self-hosted - Single binary + SQLite, no external dependencies
  • Multi-platform - Linux (x86_64, aarch64), macOS, Windows

Quick Start

1. Install

Arch Linux (recommended):

yay -S snip-rs
# Start the server
sudo systemctl enable --now snip

Docker:

# Run pre-built image
docker run -d -p 3000:3000 -v snip_data:/data skorotkiewicz/snip:latest

# Or build locally
docker build -t snip .
docker run -d -p 3000:3000 -v snip_data:/data snip

# Or use docker-compose
docker-compose up -d

From source:

cargo install --path .

2. Create Account

# Register a new account
snip register myusername
# Enter password when prompted

# Or login to existing account
snip login myusername

# Or register on demo server
snip --server https://pb.sekor.eu.org register myusername

Credentials are saved to ~/.config/snip/config.json.

3. Share Snippets

# Pipe any content directly
echo 'console.log("hello")' | snip --desc "example" --lang javascript

# Or from a file
cat main.rs | snip --desc "main function" --lang rust

# View the snippet
snip get 42

# Get a sharable link
echo "Check this: http://localhost:3000/s/42"

CLI Usage

Authentication

snip register <username>   # Create new account
snip login <username>      # Login to existing
snip whoami                # Show current user
snip logout                # Clear saved credentials

Post Snippets

# Basic usage (reads from stdin)
echo "code here" | snip

# With description and language
cat script.py | snip --desc "My script" --lang python

# Available languages: bash, c, cpp, css, go, html, java, javascript,
# json, kotlin, lua, markdown, php, python, ruby, rust, scala,
# shell, sql, swift, typescript, yaml, zig (and plaintext)

Browse Snippets

snip get <id>              # View snippet by ID
snip search "query"        # Search all snippets
snip search "fn main" --lang rust   # Search with language filter
snip delete <id>           # Delete your snippet

Shell Completions

# Add to ~/.bashrc or ~/.zshrc
eval "$(snip complete zsh)" 

Available shells: bash, zsh, fish, elvish, powershell

Web Interface

Open http://localhost:3000 to:

  • Browse all snippets
  • Filter by language
  • Search by content
  • View user profiles (/u/username)
  • Get raw content (/raw/123)

Server Configuration

Environment Variables

Variable Default Description
DATABASE_URL sqlite:snip.db SQLite database path
SNIP_HOST 0.0.0.0 Bind address
SNIP_PORT 3000 Port number

Systemd (Manual Install)

sudo cp snipped /usr/bin/
sudo cp systemd/snip.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now snip

Docker Compose

version: '3'
services:
  snip:
    image: ghcr.io/skorotkiewicz/snip
    ports:
      - "3000:3000"
    volumes:
      - ./data:/data
    environment:
      - DATABASE_URL=sqlite:/data/snipped.db

API Reference

All endpoints (except where noted) return JSON.

Authentication

# Register
POST /api/register
{"username": "alice", "password": "secret123"}
→ {"id": 1, "username": "alice", "api_key": "xxx"}

# Login
POST /api/login
{"username": "alice", "password": "secret123"}
→ {"username": "alice", "api_key": "xxx"}

Snippets

# Create (requires API key)
POST /api/snippets -H "X-API-Key: xxx"
{"content": "code", "description": "...", "language": "rust"}

# Get by ID
GET /api/snippets/123

# Delete own snippet
DELETE /api/snippets/123 -H "X-API-Key: xxx"

# List all
GET /api/snippets

# Search
GET /api/search?q=hello&lang=rust&limit=10

# List user's snippets
GET /api/users/alice/snippets

Pages

  • GET / - Web frontend
  • GET /s/{id} - View snippet page
  • GET /raw/{id} - Raw snippet content (text/plain)
  • GET /u/{username} - User profile

Architecture

  • Backend: Axum (Rust) + SQLite
  • Frontend: Vanilla HTML/JS (embedded in binary, no external assets)
  • CLI: Rust + clap + reqwest
  • Syntax Highlighting: highlight.js (CDN)

License

MIT