Patent Connector CLI
Install the Patent CLI
The patent CLI gives you patent & trademark tools (EPO, USPTO, DPMA, EUIPO, IP Australia, JPO, TIPO and more) from your terminal. Install takes about ten seconds; you then activate a free license once and you're ready.
It runs three ways:
- As a client of the hosted Patent Connector at
https://patent.dev/mcp- zero setup, recommended. The CLI is just the client, running on the shared server patent.dev provides for free. - In-process with your own provider keys - no server at all (
--local). Best for a single machine, one user. - Fully self-hosted - run
patentitself as your own Patent Connector server and point CLIs at it. For a company / multi-user intranet, with provider credentials stored centrally instead of on every machine. Needs a self-host license (see Self-host).
Requirements: macOS or Linux (Windows: see below). The installer downloads a single self-contained binary - no runtime, no dependencies.
Quick install (macOS & Linux)
curl -fsSL https://get.patent.dev/install.sh | sh
This detects your OS and CPU architecture, downloads the matching build from get.patent.dev, verifies its SHA-256 checksum, and installs patent to /usr/local/bin (it will prompt for sudo only if that directory isn't writable).
Check it worked:
patent --help
Homebrew (macOS & Linux)
Prefer a package manager? Install from the tap:
brew tap patent-dev/tap
brew install patent
Upgrade later with brew upgrade patent.
Activate your free license
Running any tool requires a license - the hosted free tier covers normal use. Get one once:
patent register --email you@firm.com # the license server emails you an activation code
patent activate <code> # redeem the code; the license is cached and auto-renews
That's it - the CLI renews the license automatically from then on.
License vs. token - the two things you provide
The CLI uses two separate credentials; knowing which is which avoids confusion:
- License (what you just activated) - your binary's entitlement. Always required. The free tier covers normal use of the hosted service; running your own server needs more (see Self-host below).
- Token (next step) - signs you in to a server. You need one only when you talk to a server - the hosted
https://patent.dev/mcp, or your own. Each server issues its own tokens.
Running tools in-process with --local (your own provider keys) needs the license only - no token.
So: hosted use = license (free) + a patent.dev token. In-process = license + your provider keys. Self-host a server = a self-host license + your team's tokens on that server.
Sign in and run your first search
The hosted server at https://patent.dev/mcp is the default, so there's nothing to configure - just sign in and search:
patent login # paste your Access Code (https://patent.dev/mcp -> Connect Your Chatbot)
patent search-patents --query "electric vehicle battery" --limit 5
Output is JSON by default; add -o table or -o yaml for other formats. Run patent <command> --help for any command's flags, and patent get-search-syntax --provider <id> to see a provider's query grammar (it differs per office).
Reference data (examination manuals and classification schemes -reference_search,list_manuals,get_manual_section,classification_tree,classification_catchword) works out of the box on the hosted server. Running it yourself - in-process with--local, or on a self-hosted server - needs a paid license; reference is bundled into the self-host / full-access license. Get in touch at info@patent.dev.
Prefer no server? Run every tool in-process with your own provider keys: set them as environment variables, e.g.export PATENT_EPO_OPS_CONSUMER_KEY=… PATENT_EPO_OPS_CONSUMER_SECRET=…, then add--localto any tool.
Self-host a server (for a team)
Run your own Patent Connector server so a whole team shares one endpoint, with provider credentials stored centrally (BYOK) instead of on every machine.
Self-hosting needs a license that includes it - the free tier covers using the hosted service, not running your own server. Get in touch at info@patent.dev to enable self-hosting on your license.
Once licensed, start the server (it's configured entirely by environment variables) and point your team's CLIs at it:
# on the server host:
BASE_URL=https://patents.acme.com ENCRYPTION_KEY=$(openssl rand -hex 16) patent server
# each teammate:
patent config set-server https://patents.acme.com
patent login # paste a token from your server's dashboard
Run patent server --help for the full list of settings (database, port, provider credentials).
Windows
Scoop
scoop bucket add patent-dev https://github.com/patent-dev/scoop-bucket
scoop install patent
Update later with scoop update patent.
Or download directly
Grab the Windows archive from get.patent.dev:
patent_<version>_windows_amd64.zip (or _arm64.zip)
Unzip it and put patent.exe somewhere on your PATH. The latest version number is always at https://get.patent.dev/latest.txt.
Options
The installer reads a few environment variables:
| Variable | Default | Purpose |
|---|---|---|
PATENT_BIN_DIR | /usr/local/bin | Where to install the binary (e.g. ~/.local/bin for a no-sudo install) |
PATENT_VERSION | latest | Pin a specific version instead of the newest |
PATENT_INSTALL_BASE | https://get.patent.dev | Alternate download origin |
Example - install a pinned version into your home directory without sudo:
curl -fsSL https://get.patent.dev/install.sh | PATENT_BIN_DIR="$HOME/.local/bin" PATENT_VERSION=1.6.0-beta.6 sh
Verify the download (optional)
The installer already verifies the SHA-256 checksum on every install. If you also want to verify the release signature out of band, each release publishes a cosign signature of checksums.txt:
curl -fsSLO https://get.patent.dev/checksums.txt
curl -fsSLO https://get.patent.dev/checksums.txt.sig
curl -fsSLO https://get.patent.dev/cosign.pub
cosign verify-blob \
--key cosign.pub \
--signature checksums.txt.sig \
--insecure-ignore-tlog=true \
checksums.txt
Upgrade
Use whichever channel you installed with:
# curl install:
curl -fsSL https://get.patent.dev/install.sh | sh
# Homebrew:
brew upgrade patent
# Scoop:
scoop update patent
Uninstall
# curl install:
sudo rm /usr/local/bin/patent
# Homebrew:
brew uninstall patent && brew untap patent-dev/tap
# Scoop:
scoop uninstall patent && scoop bucket rm patent-dev
Then remove the cached license and tokens:
rm -rf ~/.patent # cached license key
rm -rf "$HOME/Library/Application Support/patent" # macOS: cached license + tokens
Troubleshooting
command not found: patent- your install directory isn't onPATH. Add it (e.g.export PATH="$HOME/.local/bin:$PATH") or reinstall with the defaultPATENT_BIN_DIR.checksum mismatch- a corrupted or interrupted download. Re-run the installer.provider … is not configured- that tool needs provider credentials; see the provider setup docs.