Share an HTML file from the command line
One command uploads report.html and prints a link that opens it as a web page. Another replaces the contents later and keeps the same link, which suits build scripts and CI jobs that regenerate a report.
A script that writes an HTML report, a test run that outputs a coverage page, a build that produces a single-file prototype: the file ends up on disk, and getting it in front of someone usually means opening a browser and dragging it into an upload page. The FileShare Pro command-line tool, fsp, does that step from the terminal and prints the link.
Install and sign in
Install it with npm (Node.js 20 or later): npm install -g filesharepro-cli
In the FileShare Pro app, open Connect → Advanced and create an API token. It is shown once. Then run fsp login and paste it at the prompt; the token is not echoed, and fsp checks it before saving. fsp whoami shows the account, plan and usage the token belongs to.
A token gives full access to your account, including deleting files. Keep it out of shell history and repositories, and revoke it on the same page if it leaks. fsp has no --token flag for that reason; use fsp login, or the FSP_TOKEN environment variable in scripts.
Upload a file and get the link
fsp upload report.html --title "Q3 report" uploads the file and prints its share link. Anyone with the link sees the page rendered, not a download prompt.
The link goes to standard output and progress messages go to standard error, so fsp upload report.html | pbcopy puts only the link on your clipboard on a Mac. fsp upload *.html uploads several files and prints one link per file.
The file extension sets how the page is served: .html, .md, .pdf, .svg, .png, .jpg, .csv, .json and a few others open in the browser. Any other extension downloads. Pass --type text/html to render a file that has no extension.
Update it without changing the link
fsp replace q3-report-a1b2c3 report.html swaps the contents of an existing file. The share link stays the same, so a link already sent in an email or pinned in a chat shows the new version. The previous contents are kept in version history.
The first argument is a ref: the slug, the full share URL, or the file id. fsp url prints a file’s link and fsp list shows your files, newest first.
Use it in a build script or CI job
Store the token as a secret in your CI system and expose it to the job as FSP_TOKEN. Install the CLI in the job, then run fsp replace with the slug of the page you created once by hand. Each run updates the same page, so the link in your team’s bookmarks always shows the latest report.
Add --json for the raw API response on standard output, ready for jq. Exit codes separate the failures a script cares about: 0 succeeded, 1 failed, 2 bad usage, 3 token rejected, 4 could not reach the API. A sandbox with no outbound network fails with 4, and fsp whoami is the quickest check.
Create a separate token for each machine or pipeline, so one can be revoked without breaking the others.
Control who can open it
fsp set changes a file’s settings from the terminal: --expires 2026-12-31 makes the link stop working after that date, --visibility disabled turns the link off without deleting the file, and --comments on lets viewers leave notes on the page after typing a name. fsp stats shows how many times the link was opened, with a 30-day breakdown.
Prefer to have an AI coding agent do the uploading? The same account works through the MCP server: publishing HTML from Claude Code. If the hosted page is missing styles or scripts, it probably loads files from your project folder: making an HTML file self-contained.
Frequently asked
Install the CLI with npm install -g filesharepro-cli, run fsp login with an API token from the app, then run fsp upload yourfile.html. It prints a link that opens the file as a web page.
Yes. Set FSP_TOKEN in the job and run fsp replace with the page’s slug and the new file. The link stays the same and the old contents go to version history.
Each upload is a single request of up to 100 MB, which is also the free plan’s per-file limit.
Yes. The free plan includes the CLI, the API and the MCP server, with up to 50 files. Password-protected links and custom domains are on Pro.
Drop the file, copy the link — live in seconds, free plan included.
Start sharing free