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

opencode-better-file-upload

v0.2.1

Published

OpenCode plugin that makes dragging any file (PDF, Word, PowerPoint, Excel, …) into chat just work — even on models that can't read binary documents.

Downloads

303

Readme

opencode-better-file-upload

Drop any file into OpenCode chat — it just works.Even on models that can't read PDFs, Word, or PowerPoint.

npm version npm downloads license OpenCode

OpenCode forwards binary attachments (PDF, Word, PowerPoint, Excel…) to the model as-is, but most LLMs can't read them — so dragging a PDF into chat fails with this model does not support pdf input. This plugin intercepts those files, drops them on disk, and converts them to Markdown on demand when the model actually needs the contents. Images and plain text pass straight through.

Highlights

  • It just works — drag any document into chat instead of getting this model does not support pdf input.
  • Lazy by design — nothing is converted until the model asks for it. A 15 MB PDF never blocks your message, and you never pay to convert a file the model doesn't read.
  • Works everywhere — runs inside OpenCode itself (the chat.message hook), so every frontend you use — TUI, CLI, web, OpenChamber — gets the fix with no per-client setup.
  • Non-intrusive — images and plain-text/code files pass straight through untouched.

Supported files

| Category | Extensions | |---|---| | PDF | .pdf | | Word | .docx, .doc | | PowerPoint | .pptx, .ppt | | Excel | .xlsx, .xls | | Web / data | .html, .htm, .csv, .json, .xml | | Books / archives | .epub, .zip | | Email | Outlook .msg | | Images / audio | OCR for .png / .jpg, transcription for .wav / .mp3 | | Web video | YouTube URLs |

→ Background, diagrams, and full reference: docs/details.md.

Install

opencode plugin opencode-better-file-upload --global   # recommended — fixes file upload everywhere

That's it — OpenCode installs the package and adds it to your global config. Drop --global to enable it for the current project only, or edit config by hand: add "plugin": ["opencode-better-file-upload"] to opencode.json.

Optional: uv for document conversion

Conversion is lazy — you only need uv the first time the model actually reads a document. Without it, files are still saved and referenced; the model just gets a clear is 'uv' installed? message when it tries to convert one. Install it whenever you like:

curl -LsSf https://astral.sh/uv/install.sh | sh   # or: brew install uv

It's the only system dependency — no Python environment to set up. uvx downloads and caches MarkItDown automatically on first use.

Usage

Just attach files the way you already do:

opencode run "summarize this document" --file report.pdf

…or drag the file into the TUI / web / OpenChamber chat. New files land in ./uploads/, and the model receives a compact path reference instead of the raw binary — then calls the markitdown tool when it needs the contents.

Configuration

All optional, via environment variables:

| Variable | Default | What it does | |---|---|---| | BETTER_FILE_UPLOAD_PYPI_INDEX | (unset) | Custom PyPI index for uvx (handy on slow PyPI / in China). | | BETTER_FILE_UPLOAD_MARKITDOWN_EXTRAS | per-format | Force the MarkItDown extras to install, e.g. all. | | BETTER_FILE_UPLOAD_DEBUG | 0 | Set to 1 to write a debug log to uploads/.better-file-upload.log. |

China / slow PyPI — if markitdown downloads time out, point it at a mirror (runs as uvx --default-index <mirror> markitdown …):

export BETTER_FILE_UPLOAD_PYPI_INDEX="https://mirrors.aliyun.com/pypi/simple/"

See docs/details.md for supported file types, how it works, OpenChamber notes, and troubleshooting.

Roadmap

  • [ ] Configurable uploads location (project-local vs. global cache)
  • [ ] Pass-through for OCR / Azure Document Intelligence options

License

MIT © brikerman