npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fileinbox

v0.1.0

Published

CLI for the Fileinbox API — manage upload pages, responses, and file submissions

Readme

fileinbox-cli

CLI for the Fileinbox API. Manage upload pages, view responses, download files, and submit files programmatically.

Prerequisites

  • Node.js 18+

Setup

npm install -g fileinbox
# or
git clone https://github.com/christiangenco/fileinbox-cli.git
cd fileinbox-cli
npm install && npm run build && npm link

Get an API token from fileinbox.com/settings/api_tokens, then:

fileinbox auth login
# paste your token when prompted

Or set environment variables:

export FILEINBOX_API_TOKEN=fi_xxxxx
export FILEINBOX_API_URL=https://fileinbox.com  # optional, defaults to this

Commands

Authentication

fileinbox auth login [token]    # Save API token to .env (prompts if no token given)
fileinbox auth status           # Verify token works (GET /ping)

Pages

fileinbox pages list [--page N] [--per-page N]
fileinbox pages get <slug>
fileinbox pages create --slug <slug> [--title "Page Title"] [--api-submissions] [--access-code secret]
fileinbox pages update <slug> [--title "New Title"] [--api-submissions | --no-api-submissions]
fileinbox pages delete <slug>

Responses

fileinbox responses list <slug> [--since 2025-01-01T00:00:00Z] [--page N] [--per-page N]
fileinbox responses get <slug> <id>
fileinbox responses delete <slug> <id>

Download Files

# Download a specific file
fileinbox download <slug> <responseId> <fileId> [-o output.pdf]

# Download all files from a response
fileinbox download <slug> <responseId> [-o ./downloads/]

Default output is the current directory using the original filename.

Submit (⭐ Star Command)

Submit files and form answers to a page in one shot. The page must have api_submissions_enabled: true.

# Simple: one file, one answer
fileinbox submit mypage --answer "[email protected]" --file ./report.pdf

# Multiple files
fileinbox submit mypage --answer "[email protected]" --file ./a.pdf --file ./b.jpg

# Use question title instead of ID (fuzzy match)
fileinbox submit mypage --answer "Your [email protected]" --file ./doc.pdf

# Multiple file questions: specify which question each file belongs to
fileinbox submit mypage --file "q_files_1=./report.pdf" --file "q_files_2=./photo.jpg"

# With access code
fileinbox submit mypage --answer "[email protected]" --file ./doc.pdf --access-code secret123

How it works:

  1. Fetches the page to discover questions
  2. Maps --answer keys to question IDs (by ID or fuzzy title match)
  3. Auto-maps --file to the file question (if there's only one)
  4. POSTs multipart form data to /api/v1/pages/:slug/submissions

Output Format

All commands output JSON to stdout:

{"ok": true, "data": { ... }}
{"ok": false, "error": "message", "code": "ERROR_CODE"}

Use --pretty for indented output. Errors exit with code 1.

Environment Variables

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | FILEINBOX_API_TOKEN | Yes | — | API token (starts with fi_) | | FILEINBOX_API_URL | No | https://fileinbox.com | Base URL |

Development

npm run dev -- pages list           # Run without building (via tsx)
npm run build                       # Compile TypeScript
FILEINBOX_API_URL=http://localhost:8529 fileinbox pages list  # Test against dev server

License

MIT