Skip to content

Add CLI for uploading files - #12

Merged
gskril merged 2 commits into
mainfrom
cli
Oct 19, 2026
Merged

gskril merged 2 commits into
mainfrom
cli

Conversation

@gskril

@gskril gskril commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Adds a third app to the repo: cli/, a tiny Bun CLI for uploading files to the file sharing service from the terminal. It has zero runtime dependencies.

files video.mp4                  # upload, prints the share link
files a.png b.pdf -t "Receipts"  # upload several files with a title
files video.mp4 | pbcopy         # copy the link to your clipboard
files list                       # list files, newest first
  • Uses the same /api/create and /api/list endpoints and x-admin-secret header as the Raycast extension.
  • Reads FILES_SECRET (required) and FILES_URL (defaults to https://files.gregskril.com) from the environment.
  • Missing files, a missing secret, auth failures and network errors print a one-line error and exit with code 1.
  • Install with npm link for a live link to the source, or bun run build for a standalone binary.
  • Adds a cli CI job that type-checks and builds.

Testing

  • Uploaded a test file to production. The share page and /cdn route served it with the right content type and size, and it appeared at the top of files list.
  • Sending a wrong secret produces clean Unauthorized errors for both commands.
  • npm link install tested from a fresh shell.

🤖 Generated with Claude Code

A tiny Bun CLI with zero runtime dependencies that uploads files to the
file sharing service and prints share links, plus a `list` command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
files d9786c9 Commit Preview URL

Branch Preview URL
Oct 19 2026, 09:29 PM

Upload errors now show the status code like list does, and 401s hint at
checking FILES_SECRET.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gskril
gskril merged commit 45fad03 into main Oct 19, 2026
5 checks passed
@gskril
gskril deleted the cli branch October 19, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant