CLI for turning local artifacts into temporary browser links for human review. Snapifact is built for AI-agent developers who need to share files, Markdown, diffs, diagrams, comparisons, HTML, CSV, or Slides with a person without leaving the local workflow.
The release installer is the primary installation path for supported Linux and macOS systems on amd64 or arm64:
curl -fsSL https://snapifact.dev/downloads/latest/install.sh | shThe installer verifies the downloaded binary against its SHA-256 manifest and
installs snapifact to $HOME/.local/bin by default. View the latest
checksums before installing.
Alternatively, install the latest Go module version:
go install github.com/kuo77122/snapifact-cli/cmd/snapifact@latestCreate a review link:
snapifact markdown README.md --title "README review"- No account: no signup, email, or API key is required.
- Links are unlisted, not private: anyone with the link can view them.
- Content is readable by the operator. Never upload secrets.
- Snapshots expire after a seven-day expiry and can be deleted earlier with the local delete token.
- New snapshots are writable by default: anyone with the link can normally
append comments. Use
--comments-enabled=falseat creation time for a permanently read-only snapshot. Omit the flag to keep the server default.
| Command | Purpose | Input |
|---|---|---|
snapifact diff |
Upload a unified diff snapshot | One file or stdin |
snapifact compare |
Compare two UTF-8 files | Two file paths |
snapifact text |
Upload UTF-8 plain text or source code | One file or stdin |
snapifact markdown |
Upload a Markdown snapshot | One file or stdin |
snapifact mermaid |
Upload a Mermaid diagram snapshot | One file or stdin |
snapifact html |
Upload a sandboxed HTML snapshot | One file or stdin |
snapifact csv |
Upload a CSV snapshot | One file or stdin |
snapifact slides |
Upload a Slides snapshot | One file or stdin |
snapifact image |
Upload a PNG or JPEG image snapshot | One file or stdin (8 MiB maximum) |
snapifact pdf |
Upload an explicit PDF snapshot | One PDF file or - (16 MiB maximum) |
snapifact delete |
Delete a snapshot | Snapshot ID or URL |
snapifact comments close |
Permanently close all comments | Snapshot ID or URL |
snapifact comments delete |
Permanently delete one comment | Snapshot ID or URL and positive message ID |
snapifact version |
Print the CLI version | — |
Global flags are also available:
snapifact --helporsnapifact -hprints the command list.snapifact --versionprints the CLI version.
The upload and compare commands support these options:
--title TEXTsets a snapshot title.--description-file PATHreads a Markdown description file. Use-to read the description from stdin when the artifact itself comes from a file.--jsonprints the complete create response instead of only the review URL.--comments-enabled=true|falseexplicitly controls whether comments are enabled. Omission preserves the server default;falseis permanently read-only.--passwordsecurely prompts for a password and confirmation from the controlling terminal. It requiresSNAPIFACT_API_KEY; the password is never read from stdin, argv, environment, or a file. Passwords must be valid UTF-8 and at most 1024 bytes.
For image uploads, set the optional SNAPIFACT_API_KEY environment variable to
apply a basic, pro, or admin API key to create requests, including image
creation:
SNAPIFACT_API_KEY="$SNAPIFACT_API_KEY" snapifact image photo.pngTo create a password-protected snapshot, add --password to any create or
compare command. The API key is required and the CLI prompts twice without
echoing the password:
SNAPIFACT_API_KEY="$SNAPIFACT_API_KEY" snapifact markdown README.md --passwordThe key is never sent on delete, view, or raw requests. Image input is limited to 8 MiB; the server remains authoritative for image validation.
PDF uploads use a dedicated byte-preserving multipart request. PDF type is never inferred from a filename, and the filename is display metadata only:
snapifact pdf report.pdf --title "Report review"
cat report.pdf | snapifact pdf - --comments-enabled=truePDF options are --title TEXT, --description-file PATH|-, --json,
--comments-enabled=true|false, and --password-file PATH|-. Content is limited
locally to 16 MiB and the completed multipart body to 17 MiB. The server rejects
malformed or encrypted/password PDFs and enforces a 50-page maximum plus fixed
page-box, dimension, and pixel bounds. The PDF command prints only the review
URL by default, or the redacted complete response with --json, and never
retries an ambiguous create request.
PDF validation is structural, not sanitization and not a malware guarantee. The
server stores the validated original bytes; viewing uses the canvas-only viewer,
while raw download remains an exact-byte operation. Set SNAPIFACT_API_KEY only
for a keyed PDF create; the key is sent only on that create request and never in
metadata, output, view, or delete requests.
Content can be read from stdin with - or by omitting the path:
cat report.md | snapifact markdown -
cat photo.jpg | snapifact image
snapifact compare before.txt after.txt --title "Before and after"
snapifact markdown report.md --description-file notes.md
snapifact delete https://snapifact.dev/v/<snapshot-id>Owner comment administration uses the locally stored snapshot delete token:
snapifact comments close <snapshot-id-or-url>
snapifact comments delete <snapshot-id-or-url> <positive-message-id>Closing comments and deleting a comment are irreversible owner actions. They make one request, never retry automatically, and retain the local delete token after success or failure.
Options may appear before, after, or between path operands. Use -- before a
path that starts with -:
snapifact text -- -report.txtRun snapifact <command> --help for the command's built-in usage text.
This repository uses the same checks as CI:
go test ./...
go vet ./...
go build ./cmd/snapifactRead the open issues, then open an issue or pull request with a focused change and the checks you ran.