Media Library
Chukfi’s media library handles uploads, tagging, and serving — backed by Amazon S3 in production and the local filesystem during development.
Note: This video demonstrates a planned npm distribution. v0.2.0 ships as a Rust binary — see the Quick Start for current setup.
Features
Section titled “Features”- Drag-and-drop upload — Drop files into the browser, Chukfi handles MIME detection and storage
- Type filtering — Filter by image, document, or all media types
- S3-backed — Production media lives in an S3 bucket with lifecycle rules (Free Tier: 5 GB). Configure via
AWS_ACCESS_KEY_IDandS3_BUCKETenvironment variables. - CLI support — Upload and list media from the terminal with
chukfi mediacommands
CLI: Media Commands
Section titled “CLI: Media Commands”Upload a file
Section titled “Upload a file”chukfi media upload \ --path ./images/hero.png \ --alt "Hero banner image" \ --caption "Site hero banner" \ --jsonAuto-detects MIME type from file extension. Uploads to S3 (if AWS credentials present) or the local filesystem.
List and search media
Section titled “List and search media”# All imageschukfi media list --mime-type image/ --json
# Search by alt text or captionchukfi media list --q banner --limit 20 --json| Flag | Default | Description |
|---|---|---|
--mime-type |
none | Filter by MIME type prefix (e.g. image/) |
--q |
none | Search in alt text and caption |
--limit |
50 |
Maximum items (max 100) |
--offset |
0 |
Pagination offset |
--json |
false |
Output as JSON |
Storage
Section titled “Storage”| Environment | Backend |
|---|---|
| Local development | Filesystem (./media/ directory) |
| Production | Amazon S3 |
S3 storage is activated by setting AWS_ACCESS_KEY_ID (or AWS_PROFILE) and S3_BUCKET in your environment. The bucket itself must be provisioned separately — via the AWS console, CDK, or Terraform.