sf) lets you turn shelf photos into structured data directly from your terminal. Analyze images, manage stores and tasks, pull reports, and more.
Install
sf (short) and shelfforce (full name).
Authenticate
~/.shelfforce/auth.json.
For CI or non-interactive environments, pass the key directly:
Analyze images
Single image (URL)
Single image (local file)
Batch (directory)
Batch (text file with URLs)
.txt file with image URLs (one per line or space-separated). The CLI submits them all as a batch and polls for combined results.
Options
| Flag | Description |
|---|---|
--external-id <id> | Your reference ID for tracking |
--metadata <json> | JSON metadata object (e.g., '{"store":"42"}') |
--save | Save results as JSON and CSV to ~/Downloads/ |
--json | Output raw JSON (auto-enabled when piped) |
--no-wait | Submit only, don’t wait for results |
Output
The CLI shows a product table and share-of-shelf breakdown:--save, results are saved as:
~/Downloads/run-2026-03-30T10-30-00.json— full JSON with products and stats~/Downloads/run-2026-03-30T10-30-00.csv— product data as CSV
Manage resources
Standard CRUD operations for all resource types:--json for machine-readable output:
Reports
Check usage
Interactive shell
Runsf with no arguments to enter the interactive shell:
sf prefix:
- Command history (up/down arrows)
- Cursor movement (left/right, option+left/right for word jump)
- Word deletion (option+backspace, ctrl+w)
- Line editing (ctrl+a start, ctrl+e end, ctrl+k delete to end)
Profiles
Manage multiple environments:Environment variables
| Variable | Description |
|---|---|
SF_API_KEY | API key (overrides stored auth) |
SF_API_URL | App URL for browser login (e.g., http://localhost:3000 for dev) |