Skip to main content

LeaseVector CLI

lv brings LeaseVector's tools to the command line with your account's permissions, for scripts and for terminal AI agents such as Claude Code and Codex.

Install

The quickest way is the one-line installer shown on the Connect AI tools page in LeaseVector. It installs uv if needed, installs this package, and runs lv setup:

curl -fsSL https://app.leasevector.com/install.sh | sh
irm https://app.leasevector.com/install.ps1 | iex

To install by hand, use uv, which also provides the required Python 3.14:

uv tool install leasevector-cli
lv setup

Upgrade later with uv tool upgrade leasevector-cli. lv --version prints the installed version.

Set up

lv setup is the whole onboarding step, and it is safe to run again at any time:

lv setup

Each run does two things:

  1. Signs in. Setup opens your browser to sign in to the deployment, even if this computer is already signed in.
  2. Installs skills. Setup looks for Claude Code (a claude command or a ~/.claude directory) and Codex (a codex command or a ~/.codex directory). For each one it finds, it asks whether to install the LeaseVector skill, or to reinstall it if one is already there. Reinstalling replaces the skill with a fresh copy from the deployment.

Re-run lv setup whenever you need to sign in again or to install or reinstall skills, for example after installing Claude Code or after LeaseVector updates its instructions.

The skill teaches an agent to use lv. Setup downloads it from the deployment at /connected-agents/skill.md, so it always matches the server's own instructions, and writes it to:

  • Claude Code: ~/.claude/skills/leasevector/SKILL.md
  • Codex: ~/.agents/skills/leasevector/SKILL.md

Setup replaces a previous LeaseVector skill, recognized by name: leasevector in its front matter. It never replaces any other file at those paths unless you pass --force.

Questions are asked on the terminal itself, not standard input, so setup can still ask when the installer is piped into a shell. When no terminal is available, setup installs no skills and says so. These options make a run non-interactive:

lv setup --skills claude-code,codex   # install or reinstall for these hosts, detected or not
lv setup --all-skills                 # install or reinstall for every detected host
lv setup --no-skills                  # sign in only; leave skills unchanged

Choose a deployment

lv uses https://app.leasevector.com by default. For staging or local development, give the deployment's address, the one you open in a browser, with --server on any command or LEASEVECTOR_CLI in the environment:

export LEASEVECTOR_CLI=http://localhost:8000
lv setup --no-skills

Addresses must use HTTPS, except on the loopback interface, and have no path; lv finds the deployment's MCP endpoint itself. From a repository checkout, install the working copy with uv tool install --reinstall ./packages/leasevector-cli.

Sign-in and credentials

lv setup and lv login both sign in; lv login leaves skills alone. Sign-in opens a browser and receives the authorization response on an ephemeral loopback port. The deployment must have its leasevector-cli public OAuth registration provisioned. No Django installation or settings are needed by the CLI.

Credentials are stored privately per deployment under $XDG_CONFIG_HOME/leasevector (by default ~/.config/leasevector) on Linux and macOS, and under %APPDATA%\leasevector on Windows. Refreshes are serialized across processes. An interrupted refresh requires signing in again, so a spent refresh token is never replayed. Do not copy credential files between machines.

Use tools

Discover the tools currently allowed for your account. Tool and parameter underscores become hyphens:

lv tools
lv list-leases --help
lv list-leases --client-id 3
lv list-leases --client-id 3 --table
lv tool list_leases --arguments '{"client_id":3,"limit":10}'
lv tool list_leases --arguments-file ./arguments.json

Local lv --help works before sign-in. Remote help and commands fetch every page of the authorized catalog on each invocation, so newly added tools need no CLI release. Names that collide with built-ins remain available through lv tool <exact_name>. Generated flags accept plain strings and JSON numbers, booleans, arrays, objects, and nullable values. Omitted arguments remain omitted; null explicitly supplies a nullable value. Use whole-arguments JSON for exact control or parameters that collide with CLI options. Full JSON cannot be mixed with generated argument flags.

Stdout contains JSON by default, preserving structured result envelopes and pagination fields. --table displays Page items. Validation details from the server remain in JSON; diagnostics, setup progress, and questions go to stderr or the terminal.

Commands act immediately under your account's authority; lv does not ask before running a tool. Approval belongs to you or to the agent host running lv, such as Claude Code or Codex permission modes. Tool descriptions state consequences that LeaseVector cannot undo, such as archiving a client or lease permanently invalidating its share links, and the Audit Log attributes every action to you and the connected agent. Lost mutation responses are not replayed: inspect the Audit Log before deciding whether to retry.

Exit codes

  • 0: success.
  • 2: input, tool, or transport failure. This includes an interrupted command, a skill that lv setup could not download or write, and a non-LeaseVector file that lv setup --skills or --all-skills refused to replace.
  • 3: authentication failure. Run lv login or lv setup.

The CLI uses MCP SDK 2.2.0 and protocol 2026-07-28 only.

Upload files

Submit PDFs to an authorized Client or Lease:

lv upload --client 3 lease.pdf amendment.pdf
lv upload --lease 12 amendment.pdf

Client Users may submit only to their own active Client and cannot select a Lease. JSON receipts contain accepted file identities and individual rejections; any rejection exits with code 2 while preserving successful receipts. Acceptance means durable submission. Processing continues separately in the application; a receipt does not imply extraction completion or access to Broker progress tools. An uncertain upload response is never automatically resubmitted.

Download files

Retrieve a Document's sliced PDF, its original, or an Upload original:

lv download document 45 --output lease.pdf
lv download document 45 --original --output source.pdf
lv download document 45 --lease 12 --revision 7 --output historical.pdf
lv download upload 9 --output submitted.pdf

Document downloads resolve their current Lease through the authorized remote get_document tool. Explicit --lease and optional --revision use the selected context's endpoint authorization, including historical Documents that no longer have a current placement. --revision requires --lease. Default filenames are document-<id>.pdf and upload-<id>.pdf; --overwrite explicitly allows replacing an existing file. Downloads emit JSON containing the saved path after successful completion. Bytes stream directly from signed storage URLs, using a fresh client without credentials or cookies on every redirect. Incomplete transfers leave no finished destination. Rerunning a failed download requests a fresh signed URL from the application; signed URLs are never printed or retained by the CLI.

Metadata

Release files for leasevector-cli 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for leasevector-cli 0.2.0
File Size Uploaded
leasevector_cli-0.2.0.tar.gz 23.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for leasevector-cli 0.2.0
File Interpreter ABI Platform
leasevector_cli-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 53.6 kB

Release files / leasevector_cli-0.2.0.tar.gz

Download URL leasevector_cli-0.2.0.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0c5268ea9701f0c73649200fd770b95c77b92c40f92736460cc9c7ac238bb6d5
BLAKE2b-256 checksum
How to use checksums
6644caa901cf0d168d76f150e7509b42a41ad7b8ac64040afe33f8c4a8e21c46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Guix System","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / leasevector_cli-0.2.0-py3-none-any.whl

Download URL leasevector_cli-0.2.0-py3-none-any.whl
Size 30.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00fad8dec4ae3ad329119ca2c31970b4b330351b0266484f08dc08e0b6448f19
BLAKE2b-256 checksum
How to use checksums
6e848cc48875b65780e1360ee70f92dc95b882d19d2842ddeb8cdf18cf9590b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Guix System","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page