Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/WyattBrashear/CLIF/llms.txt

Use this file to discover all available pages before exploring further.

The CLIF server is a Flask HTTP API that accepts file uploads from the CLIF CLI client, stores file contents on disk, and tracks file ownership and metadata in a local SQLite database. You run it on any machine you control and point your clients at its address.

Configuration

Configure port, host binding, and per-user storage limits using CLIF.json.

Self-hosting

Deploy CLIF on a VPS or home server and connect remote clients.

How the server works

The server receives HTTP requests from the CLIF CLI (or any HTTP client such as curl), writes file contents to disk, and updates its database with ownership and size information. Request handling Clients send HTTP POST requests to upload files. The server reads the file content, computes a SHA-256 hash, and writes the file to the FileStor directory before recording metadata in the database. File storage Files are stored content-addressed by their SHA-256 hash. The on-disk path uses the first two characters of the hash as a subdirectory:
FileStor/{first_2_chars_of_hash}/{file_id}
Because files are addressed by hash, two uploads of identical content produce the same hash and resolve to the same storage path.
Metadata tracking The server records file ownership, name, and size in a local UserData.db SQLite database. This lets the server enforce per-user storage quotas and associate files with the accounts that uploaded them. Storage limits Each user account has an allocation limit (in bytes). The server tracks how much storage each user has consumed and rejects uploads that would exceed that user’s limit. The default limit is set via CLIF.json and applies at user registration time.

Build docs developers (and LLMs) love