Skip to main content

A simple, secure file preview service with time-limited URLs

Project description

vibefs

A file preview server with time-limited access control, designed for AI agents to share local files with users via URLs.

Files are not accessible by default. Each file must be explicitly authorized with a TTL (default: 1 hour). The server starts automatically on the first allow call and shuts down when all authorizations expire.

Agent interaction File preview

Install

With uv:

# Install globally
uv tool install vibefs

# Or run directly without installing
uvx vibefs --help

Usage

Authorize a file

vibefs allow /path/to/file.py
# http://localhost:17173/f/a3b7c2d1/file.py

vibefs allow /path/to/file.py --ttl 300   # 5 minutes
vibefs allow /path/to/file.py --head 50   # Only first 50 lines
vibefs allow /path/to/file.py --tail 20   # Only last 20 lines

The daemon starts automatically if it's not already running.

Manage authorizations

vibefs list                 # List active authorizations
vibefs revoke <token>       # Revoke a specific authorization

Server control

vibefs status               # Check if daemon is running
vibefs stop                 # Stop the daemon
vibefs serve                # Start server in foreground (for debugging)

Configuration

vibefs config set base_url https://files.example.com
vibefs config get base_url

# Pygments syntax highlighting options
vibefs config set pygments.style dracula    # Theme (default: monokai)
vibefs config set pygments.linenos true     # Show line numbers (default: false)

Available styles: monokai, dracula, github-dark, one-dark, nord, solarized-dark, gruvbox-dark, and many more.

When base_url is set, the allow command outputs URLs using it instead of localhost:port:

vibefs allow /path/to/file.py
# https://files.example.com/f/a3b7c2d1/file.py

File rendering

  • Code and text files (.py, .js, .md, .json, etc.) are rendered with syntax highlighting via Pygments.
  • Other files are served with their original content type.

Deploy

vibefs listens on localhost:17173 by default. To make it accessible from the internet, use a tunneling service to map the local port to a public domain.

Cloudflare Tunnel

# Install cloudflared: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/

# Quick tunnel (temporary public URL)
cloudflared tunnel --url http://localhost:17173

# Named tunnel (persistent domain)
cloudflared tunnel create vibefs
cloudflared tunnel route dns vibefs vibefs.example.com
cloudflared tunnel run --url http://localhost:17173 vibefs

Other options

  • ngrok: ngrok http 17173
  • Tailscale Funnel: tailscale funnel 17173
  • frp, bore, or any TCP tunneling tool

After setting up the tunnel, configure the base URL so generated links use your public domain:

vibefs config set base_url https://vibefs.example.com

Agent integration

To let an AI agent use vibefs, add instructions like the following to its system prompt or tool documentation:

You have access to `vibefs`, a file preview tool. When you want to share a file
with the user, run:

    vibefs allow /path/to/file [--ttl SECONDS]

This prints a URL. Send the URL to the user — they can open it in a browser to
view the file. The link expires after the TTL (default: 1 hour).

Use this when:
- Showing code, logs, or config files
- Sharing generated output
- Any time a file is easier to read in a browser than in chat

State

All runtime data is stored in ~/.vibefs/:

  • vibefs.db — authorization records (SQLite)
  • vibefs.pid — daemon PID file
  • vibefs.log — daemon log output
  • config.json — configuration

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vibefs-0.4.0.tar.gz (189.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vibefs-0.4.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file vibefs-0.4.0.tar.gz.

File metadata

  • Download URL: vibefs-0.4.0.tar.gz
  • Upload date:
  • Size: 189.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for vibefs-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6378c85ee3a3306cda78b1f824fe7e33c6fc425e67b03c4e9c35330b7dd4eb0a
MD5 620cf5d2f354178171ce5395559e3fa5
BLAKE2b-256 69b3dbb8185ea13a955fb4e194108264b6365d2ec1c738aed706835691f1cd6a

See more details on using hashes here.

File details

Details for the file vibefs-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: vibefs-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for vibefs-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8c747ea9ddbc5af4a65f12ecc7a2615860c1409051487d2be5435f9d53ff175
MD5 0d8ef2d735ec94fe31cb08d18117ec67
BLAKE2b-256 10756ecb89a2392b928d075e7ef31234e77d226ef9dcb6261e91ed6be0e3a30d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page