DEV Community

Cover image for qwiksi, the CLI tool for signing PDFs
Kris Raven
Kris Raven

Posted on • Originally published at 1mbu.gs

qwiksi, the CLI tool for signing PDFs

Every few weeks, a form lands in my inbox that needs a signature. A lease renewal, a contractor agreement, a form for the bank. And every time, the routine is the same:

Open the PDF in some app. Find the signature tool. Drag a box to roughly the right spot on the page. Squint to check it's not overlapping the text. Save. Re-open to double check it looks right. Export.

For a two-second signature that's a lot of time spent clicking around in UIs.

I'm in the terminal most of the day anyway, so I built qwiksi - a CLI tool that signs a PDF from the command line.

What it does

Point it at a PDF and it signs it. Specifically:

  • Detects signature fields on fillable forms, so you usually don't need to specify anything beyond the file
  • Manual coordinates for flat or scanned PDFs that don't have real form fields
  • No signature image on hand? It can generate one from your name in a cursive font, so you're not stuck hunting for a scanned copy of your actual signature

Basic usage:

qwiksi sign contract.pdf --field signature
Enter fullscreen mode Exit fullscreen mode

or, for a scanned PDF with no form fields:

qwiksi sign scanned-form.pdf --x 120 --y 480 --page 2
Enter fullscreen mode Exit fullscreen mode

Why a CLI instead of a UI

  • Mostly just personal preference. I'd rather run one command than context-switch into a full PDF editor for something this small. It can be scripted too. It also means signing can be automated such as batch-signing a folder of PDFs or adding it into some other workflow.
  • It's written in Go which is a great language for CLI tools. It builds as a single binary so no runtime to install or dependencies to manage.

Try it

You can build it yourself or grab a release binary. Details are in the README:

If you try it, I'd like to know:

  • Does the detection of fields work reliably on forms you've tried?
  • Is there a PDF workflow annoyance of yours this doesn't solve?

Happy to take issues/PRs or just hear what's broken.

Where it's rough

It's early. Right now:

  • Signature placement on scanned PDFs is manual (using coordinates), which works but isn't as smooth as I'd like - I'm thinking about a way to preview placement before committing
  • Font support for the generated cursive signature is limited to a couple of options so far

Top comments (0)