Sign inSign up

dingbatter/shebangrun

By dingbatter

•Updated 8 months ago

Docker container with the shebang.run site

Image
0

1.0K

dingbatter/shebangrun repository overview

⁠shebang.run

A platform for hosting and sharing shell scripts and code snippets with built-in versioning, encryption, and signing.

⁠Features

  • Script Versioning - Auto-incrementing versions with immutable history
  • End-to-End Encryption - RSA-4096 + ChaCha20-Poly1305 encryption
  • Access Control - Private, unlisted, and public scripts with token-based sharing
  • OAuth Integration - GitHub and Google authentication
  • Key Management - Generate or import RSA keypairs for signing/encryption
  • Rate Limiting - Configurable per-user limits
  • Admin Panel - User management and system configuration
  • Python Library - Full API client with decryption support

⁠Quick Start

bash docker run -d
-p 8080:8080
-e JWT_SECRET="your-secret-key"
-e DATABASE_URL="root:password@tcp(mariadb:3306)/shebang?parseTime=true"
dingbatter/shebangrun:latest

⁠Docker Compose

yaml version: '3.8' services: app: image: dingbatter/shebangrun:latest ports: - "8080:8080" environment: - JWT_SECRET=your-secret-key - DATABASE_URL=root:password@tcp(mariadb:3306)/shebang?parseTime=true - STORAGE_TYPE=s3 depends_on: - mariadb - minio

Full docker-compose.yml: https://github.com/skibare87/shebangrun/blob/main/docker-compose.yml⁠

⁠Usage

⁠Retrieve Scripts

bash

⁠Latest version

curl https://your-domain.com/username/scriptname⁠ | sh

⁠Specific version

curl https://your-domain.com/username/scriptname@v5⁠ | sh

⁠Tagged version

curl https://your-domain.com/username/scriptname@dev⁠ | sh

⁠Python Library

bash pip install shebangrun

python from shebangrun import run

⁠Fetch and execute

run(username="user", script="deploy", eval=True)

⁠Decrypt encrypted scripts

run(username="user", script="private", key=open("private.pem").read())

⁠Environment Variables

VariableDescriptionDefault
SERVER_PORTServer port8080
DATABASE_URLMariaDB connection stringRequired
JWT_SECRETSecret for JWT tokensRequired
STORAGE_TYPEs3 or locals3
S3_ENDPOINTS3 endpoint URLminio:9000
S3_ACCESS_KEYS3 access keyminioadmin
S3_SECRET_KEYS3 secret keyminioadmin
S3_BUCKETS3 bucket namescripts
DEFAULT_RATE_LIMITRequests per minute50
DEFAULT_MAX_SCRIPTSMax scripts per user25
DEFAULT_MAX_SCRIPT_SIZEMax script size (bytes)1048576
GITHUB_CLIENT_IDGitHub OAuth client IDOptional
GITHUB_CLIENT_SECRETGitHub OAuth secretOptional
GOOGLE_CLIENT_IDGoogle OAuth client IDOptional
GOOGLE_CLIENT_SECRETGoogle OAuth secretOptional

⁠Architecture

  • Backend: Go 1.22
  • Database: MariaDB 11
  • Storage: S3-compatible (MinIO) or local filesystem
  • Frontend: htmx + Alpine.js + Tailwind CSS
  • Encryption: RSA-4096, ChaCha20-Poly1305, SHA-256

⁠License

MIT License

Tag summary

Content type

Image

Digest

sha256:61845f539…

Size

13 MB

Last updated

8 months ago

docker pull dingbatter/shebangrun