@leverageai/cli
v0.3.1
Published
CLI for the Leverage public API (api.leverageimmo.com)
Readme
leverage
CLI for the Leverage public HTTP API (https://api.leverageimmo.com).
Install / run
Global (preferred):
npm install -g @leverageai/cli
leverage --helpOne-off (no install):
npx @leverageai/cli@latest --helpThe npm package is @leverageai/cli. After a global install, the leverage binary is on your PATH (see "bin" in package.json). Every command below is written as leverage <subcommand> …; prefix with npx @leverageai/cli if you did not install globally.
If you previously installed the old leverage-cli package globally, run npm uninstall -g leverage-cli before npm install -g @leverageai/cli.
Auth (agents)
LEVERAGE_API_KEYor--api-key:x-api-key(user profile key or service keyLEVERAGE_SERVICE_KEY).LEVERAGE_API_URLor--base-url: API base URL (defaulthttps://api.leverageimmo.com).LEVERAGE_TENANT_IDor--tenant-id: required with service key; optional with user key.
Output: list and get commands print JSON to stdout. task delete and document patch are silent on success. Only portfolio export and plugin install accept --json to toggle between JSON and human-oriented messages.
Commands
Run leverage --help and leverage <topic> --help after install (or the same with npx @leverageai/cli if not global).
leverage document getleverage document patch IDleverage document upload FILEleverage document waitleverage due-diligence createleverage expose document FILEleverage expose getleverage expose textleverage healthleverage help [COMMAND]leverage issue createleverage job get IDleverage plugin installleverage portfolio exportleverage portfolio getleverage propertiesleverage property completeness checkleverage property createleverage property dd-report get PROPERTY-ID REPORT-IDleverage property documents linkleverage property documents listleverage property get IDleverage property keyfigures IDleverage property patch IDleverage property tenancies importleverage task createleverage task delete IDleverage task get IDleverage task patch IDleverage tasks
leverage document get
Poll document job (GET /api/v1/documents?job_id=).
USAGE
$ leverage document get --job-id <value> [-k <value>] [-u <value>] [-t <value>]
FLAGS
--job-id=<value> (required) job_id from upload response
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Poll document job (GET /api/v1/documents?job_id=).
Requires --tenant-id (x-tenant-id).
Examples:
leverage document get --job-id <uuid> --tenant-id <uuid>See code: src/commands/document/get.ts
leverage document patch ID
Patch document metadata (PATCH /api/v1/documents/{id}).
USAGE
$ leverage document patch ID [-k <value>] [-u <value>] [-t <value>] [--name <value>] [--type <value>] [--path
<value>]
ARGUMENTS
ID Document UUID
FLAGS
--name=<value> Display name
--path=<value> Data-room path including filename
--type=<value> document_type enum value
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Patch document metadata (PATCH /api/v1/documents/{id}).
Examples:
leverage document patch <uuid> --path 06-Mieter/foo.pdfSee code: src/commands/document/patch.ts
leverage document upload FILE
Upload document for OCR/processing (POST /api/v1/documents).
USAGE
$ leverage document upload FILE --path <value> [-k <value>] [-u <value>] [-t <value>] [--document-type <value>]
ARGUMENTS
FILE Path to PDF/XLS/XLSX file
FLAGS
--document-type=<value> [default: expose] document_type query param (default expose)
--path=<value> (required) Data-room path including filename (e.g. 06-Mieter/Mueller-2A/Mietvertrag.pdf)
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Upload document for OCR/processing (POST /api/v1/documents).
Requires --tenant-id (x-tenant-id) because the shared client sends it for this route.
Requires --path (data-room path including filename).
Examples:
leverage document upload ./scan.pdf --path 06-Mieter/foo.pdf --tenant-id <uuid>See code: src/commands/document/upload.ts
leverage document wait
Poll document job until completed or failed (GET /api/v1/documents?job_id=).
USAGE
$ leverage document wait --job-id <value> [-k <value>] [-u <value>] [-t <value>] [--poll-interval-ms <value>]
[--timeout-ms <value>]
FLAGS
--job-id=<value> (required) job_id from upload response
--poll-interval-ms=<value> [default: 2000] Delay between polls in ms
--timeout-ms=<value> [default: 120000] Max wait in ms
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Poll document job until completed or failed (GET /api/v1/documents?job_id=).
Requires --tenant-id (x-tenant-id).
Examples:
leverage document wait --job-id <uuid> --tenant-id <uuid>See code: src/commands/document/wait.ts
leverage due-diligence create
Start due diligence report job (POST /api/v1/due-diligence).
USAGE
$ leverage due-diligence create --property-id <value> --document-id <value>... [-k <value>] [-u <value>] [-t <value>]
FLAGS
--document-id=<value>... (required) Document UUID (repeat flag for multiple)
--property-id=<value> (required) Property UUID
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Start due diligence report job (POST /api/v1/due-diligence).
Examples:
leverage due-diligence create --property-id <uuid> --document-id <uuid> --document-id <uuid2>See code: src/commands/due-diligence/create.ts
leverage expose document FILE
Upload document for expose extraction (POST /api/v1/expose/document).
USAGE
$ leverage expose document FILE [-k <value>] [-u <value>] [-t <value>] [--persist-listing]
[--extract-document-figures]
ARGUMENTS
FILE Path to PDF/XLS/XLSX
FLAGS
--[no-]extract-document-figures extract_document_figures form field
--[no-]persist-listing persist_listing form field
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Upload document for expose extraction (POST /api/v1/expose/document).
Poll: leverage job get <job_id> (or leverage expose get --job-id …).
Examples:
leverage expose document ./expose.pdfSee code: src/commands/expose/document.ts
leverage expose get
Poll expose extraction job (GET /api/v1/expose?job_id=).
USAGE
$ leverage expose get --job-id <value> [-k <value>] [-u <value>] [-t <value>]
FLAGS
--job-id=<value> (required) Job UUID from expose text/document
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Poll expose extraction job (GET /api/v1/expose?job_id=).
Examples:
leverage expose get --job-id <uuid>See code: src/commands/expose/get.ts
leverage expose text
Submit text/HTML for expose extraction (POST /api/v1/expose/text).
USAGE
$ leverage expose text --content <value> [-k <value>] [-u <value>] [-t <value>] [--text-type text|html]
[--document-id <value>] [--persist-listing]
FLAGS
--content=<value> (required) Raw text or HTML
--document-id=<value> Optional existing document UUID
--[no-]persist-listing Whether to persist listing when done
--text-type=<option> [default: text]
<options: text|html>
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Submit text/HTML for expose extraction (POST /api/v1/expose/text).
Poll job with: leverage job get <job_id>
Examples:
leverage expose text --content "..."
leverage expose text --content "..." --text-type html --persist-listing=falseSee code: src/commands/expose/text.ts
leverage health
GET /api/health — no API key required.
USAGE
$ leverage health [-u <value>]
AUTH FLAGS
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
GET /api/health — no API key required.
Examples:
leverage health
leverage health --base-url http://localhost:8080See code: src/commands/health.ts
leverage help [COMMAND]
Display help for leverage.
USAGE
$ leverage help [COMMAND...] [-n]
ARGUMENTS
[COMMAND...] Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for leverage.See code: @oclif/plugin-help
leverage issue create
Create a support ticket (POST /api/v1/issues).
USAGE
$ leverage issue create --title <value> --description <value> [-k <value>] [-u <value>] [-t <value>]
[--current-url <value>] [--image <value>...]
FLAGS
--current-url=<value> Page or context URL (optional)
--description=<value> (required) Ticket body (prefix with @path to read from file)
--image=<value>... Image file path (repeat up to 5 times)
--title=<value> (required) Ticket title
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Create a support ticket (POST /api/v1/issues).
Examples:
leverage issue create --title "API error" --description "GET /api/v1/properties returns 500"
leverage issue create --title "Bug" --description @./notes.txt --image ./shot.pngSee code: src/commands/issue/create.ts
leverage job get ID
Get async job status (GET /api/v1/jobs/{id}).
USAGE
$ leverage job get ID [-k <value>] [-u <value>] [-t <value>]
ARGUMENTS
ID Job UUID
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Get async job status (GET /api/v1/jobs/{id}).
Examples:
leverage job get <job-uuid>See code: src/commands/job/get.ts
leverage plugin install
Install the leverage-purchase plugin (Claude Cowork, Cowork on 3P, or Claude Code).
USAGE
$ leverage plugin install [-c cowork|cowork-3p|claude-code] [--target <value>] [-f] [-j]
FLAGS
-c, --client=<option> Target app: cowork | cowork-3p | claude-code (default: auto-detect, else cowork)
<options: cowork|cowork-3p|claude-code>
-f, --force Overwrite existing plugin directory
-j, --json Print JSON result to stdout
--target=<value> Full path to the plugin directory (overrides default path from --client)
DESCRIPTION
Install the leverage-purchase plugin (Claude Cowork, Cowork on 3P, or Claude Code).
Copies the bundled plugin from this CLI package into the default directory for the
selected client, or into --target. Use --force to overwrite an existing install.
Examples:
leverage plugin install
leverage plugin install --client cowork-3p
leverage plugin install --client claude-code
leverage plugin install --target /path/to/leverage-purchase
leverage plugin install --forceSee code: src/commands/plugin/install.ts
leverage portfolio export
Export portfolio PDF (POST /api/v1/portfolio/export).
USAGE
$ leverage portfolio export [-k <value>] [-u <value>] [-t <value>] [-o <value>] [-j]
FLAGS
-o, --out=<value> [default: overview.pdf] Output PDF path
OUTPUT FLAGS
-j, --json Print JSON on stdout: success { path, bytes, contentDisposition }; failure { ok: false, error }
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Export portfolio PDF (POST /api/v1/portfolio/export).
Writes binary PDF. With --json prints JSON metadata only (path, bytes).
Examples:
leverage portfolio export --out overview.pdf
leverage portfolio export --jsonSee code: src/commands/portfolio/export.ts
leverage portfolio get
Portfolio JSON metrics (GET /api/v1/portfolio).
USAGE
$ leverage portfolio get [-k <value>] [-u <value>] [-t <value>]
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Portfolio JSON metrics (GET /api/v1/portfolio).
Examples:
leverage portfolio getSee code: src/commands/portfolio/get.ts
leverage properties
List properties (GET /api/v1/properties).
USAGE
$ leverage properties [-k <value>] [-u <value>] [-t <value>] [--acquisition-state <value>] [--limit <value>]
[--offset <value>]
FLAGS
--acquisition-state=<value> Comma-separated: new, in_purchase, purchased, archive
--limit=<value> [default: 50]
--offset=<value>
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
List properties (GET /api/v1/properties).
Examples:
leverage properties
leverage properties --acquisition-state new,purchased --limit 100See code: src/commands/properties.ts
leverage property completeness check
Check document completeness for a property (POST /api/v1/properties/{id}/completeness/check).
USAGE
$ leverage property completeness check --property-id <value> [-k <value>] [-u <value>] [-t <value>]
FLAGS
--property-id=<value> (required) Property UUID
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Check document completeness for a property (POST /api/v1/properties/{id}/completeness/check).
Examples:
leverage property completeness check --property-id <uuid>See code: src/commands/property/completeness/check.ts
leverage property create
Create a property (POST /api/v1/properties).
USAGE
$ leverage property create --calculation-strategy buy_and_hold|fix_and_flip|own_use|special_rental --property-type
multi_family_house|house|apartment [-k <value>] [-u <value>] [-t <value>] [--listing-id <value>] [--purchase-price
<value>] [--living-area <value>] [--interest-rate <value>] [--repayment-rate <value>] [--loan-amount-percentage
<value>] [--address-json <value>] [--addr-latitude <value>] [--addr-longitude <value>] [--addr-country-code <value>]
[--addr-city <value>] [--addr-post-code <value>] [--addr-street <value>] [--addr-house-number <value>] [--body-file
<value>]
FLAGS
--addr-city=<value>
--addr-country-code=<value>
--addr-house-number=<value>
--addr-latitude=<value>
--addr-longitude=<value>
--addr-post-code=<value>
--addr-street=<value>
--address-json=<value> JSON object for address (coordinates, country_code, city, post_code, street,
house_number)
--body-file=<value> JSON merged first; explicit flags override file fields
--calculation-strategy=<option> (required)
<options: buy_and_hold|fix_and_flip|own_use|special_rental>
--interest-rate=<value> Decimal fraction e.g. 0.04
--listing-id=<value> Optional listing UUID to prefill
--living-area=<value> Living area m²
--loan-amount-percentage=<value> Decimal fraction e.g. 0.8
--property-type=<option> (required)
<options: multi_family_house|house|apartment>
--purchase-price=<value> Required without listing when listing has no price
--repayment-rate=<value> Decimal fraction e.g. 0.02
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Create a property (POST /api/v1/properties).
Required: --calculation-strategy, --property-type.
Without --listing-id also need address + --purchase-price + --living-area (or supply full body via --body-file).
Address: either --address-json '<object>' or flat flags --addr-latitude, --addr-longitude, --addr-country-code,
--addr-city, --addr-post-code, --addr-street, --addr-house-number.
Examples:
leverage property create --calculation-strategy buy_and_hold --property-type apartment --listing-id <uuid>
leverage property create --calculation-strategy buy_and_hold --property-type house --purchase-price 400000
--living-area 120 --addr-city Berlin --addr-post-code 10115 --addr-country-code DE --addr-latitude 52.52
--addr-longitude 13.405See code: src/commands/property/create.ts
leverage property dd-report get PROPERTY-ID REPORT-ID
Get due diligence report (GET /api/v1/properties/{id}/dd-reports/{reportId}).
USAGE
$ leverage property dd-report get PROPERTY-ID REPORT-ID [-k <value>] [-u <value>] [-t <value>]
ARGUMENTS
PROPERTY-ID Property UUID
REPORT-ID Numeric report id from due-diligence create
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Get due diligence report (GET /api/v1/properties/{id}/dd-reports/{reportId}).
Examples:
leverage property dd-report get <property-uuid> <report-id>See code: src/commands/property/dd-report/get.ts
leverage property documents link
Link documents to a property (POST /api/v1/properties/{id}/documents).
USAGE
$ leverage property documents link --property-id <value> --document-id <value>... [-k <value>] [-u <value>] [-t <value>]
[--is-pinned] [--body-file <value>]
FLAGS
--body-file=<value> JSON with optional paths map { "document-uuid": "06-Mieter/foo.pdf", ... } merged into body
--document-id=<value>... (required) Document UUID (repeat for multiple)
--[no-]is-pinned Pin linked rows
--property-id=<value> (required) Property UUID
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Link documents to a property (POST /api/v1/properties/{id}/documents).
Examples:
leverage property documents link --property-id <uuid> --document-id <a> --document-id <b>
leverage property documents link --property-id <uuid> --body-file paths.jsonSee code: src/commands/property/documents/link.ts
leverage property documents list
List documents linked to a property (GET /api/v1/properties/{id}/documents).
USAGE
$ leverage property documents list --property-id <value> [-k <value>] [-u <value>] [-t <value>]
FLAGS
--property-id=<value> (required) Property UUID
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
List documents linked to a property (GET /api/v1/properties/{id}/documents).
Examples:
leverage property documents list --property-id <uuid>See code: src/commands/property/documents/list.ts
leverage property get ID
Get a property (GET /api/v1/properties/{id}).
USAGE
$ leverage property get ID [-k <value>] [-u <value>] [-t <value>]
ARGUMENTS
ID Property UUID
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Get a property (GET /api/v1/properties/{id}).
Examples:
leverage property get <uuid>See code: src/commands/property/get.ts
leverage property keyfigures ID
Key figures (GET /api/v1/properties/{id}/keyfigures).
USAGE
$ leverage property keyfigures ID --range full|year1|year10 [-k <value>] [-u <value>] [-t <value>] [--date-unit
month|year]
ARGUMENTS
ID Property UUID
FLAGS
--date-unit=<option> [default: year] Buy-and-hold series density (alias date_unit on API)
<options: month|year>
--range=<option> (required) Projection horizon (required)
<options: full|year1|year10>
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Key figures (GET /api/v1/properties/{id}/keyfigures).
Examples:
leverage property keyfigures <uuid> --range full
leverage property keyfigures <uuid> --range year10 --date-unit monthSee code: src/commands/property/keyfigures.ts
leverage property patch ID
Patch a property (PATCH /api/v1/properties/{id}).
USAGE
$ leverage property patch ID [-k <value>] [-u <value>] [-t <value>] [--patch-json <value>] [--patch-file <value>]
ARGUMENTS
ID Property UUID
FLAGS
--patch-file=<value> Path to JSON file for request body
--patch-json=<value> JSON object string for request body
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Patch a property (PATCH /api/v1/properties/{id}).
Provide --patch-json '<object>' and/or --patch-file. For complex edits prefer JSON.
Examples:
leverage property patch <uuid> --patch-json '{"name":"My deal"}'See code: src/commands/property/patch.ts
leverage property tenancies import
Import tenants from JSON (POST /api/v1/properties/{id}/tenancies/import).
USAGE
$ leverage property tenancies import --property-id <value> --body-file <value> [-k <value>] [-u <value>] [-t <value>]
FLAGS
--body-file=<value> (required) Path to JSON body
--property-id=<value> (required) Property UUID
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Import tenants from JSON (POST /api/v1/properties/{id}/tenancies/import).
Body file shape: { "tenants": [ { "display_name": "Max Müller", "rent_net": 500, "unit_id": null } ] }
Examples:
leverage property tenancies import --property-id <uuid> --body-file tenants.jsonSee code: src/commands/property/tenancies/import.ts
leverage task create
Create a task (POST /api/v1/tasks). Requires --title.
USAGE
$ leverage task create -T <value> [-k <value>] [-u <value>] [-t <value>] [--description <value>] [--category
general|bank|taxes|cashflow|rental] [--due-date <value>] [--property-id <value>] [--linked-unit-id <value>]
[--linked-tenancy-id <value>] [--linked-dd-issue-id <value>] [--is-checked] [--body-file <value>]
FLAGS
-T, --title=<value> (required) Task title (required)
--body-file=<value> Path to JSON file merged into request (e.g. extra fields)
--category=<option> Category (default general)
<options: general|bank|taxes|cashflow|rental>
--description=<value> Optional description
--due-date=<value> ISO date-time for due date
--[no-]is-checked Initial checked state
--linked-dd-issue-id=<value> property_dd_issues.id
--linked-tenancy-id=<value> property_tenancies.id
--linked-unit-id=<value> property_units.id UUID
--property-id=<value> Linked property UUID
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Create a task (POST /api/v1/tasks). Requires --title.
Merge: optional --body-file JSON is merged under explicit flags (flags win).
Examples:
leverage task create --title "Follow up"
leverage task create --title "DD" --property-id <uuid> --linked-dd-issue-id 42See code: src/commands/task/create.ts
leverage task delete ID
Soft-delete a task (DELETE /api/v1/tasks/{id}) → 204.
USAGE
$ leverage task delete ID [-k <value>] [-u <value>] [-t <value>]
ARGUMENTS
ID Numeric task id
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Soft-delete a task (DELETE /api/v1/tasks/{id}) → 204.
Examples:
leverage task delete 42See code: src/commands/task/delete.ts
leverage task get ID
Get one task with full linked context (GET /api/v1/tasks/{id}).
USAGE
$ leverage task get ID [-k <value>] [-u <value>] [-t <value>] [--include-deleted]
ARGUMENTS
ID Numeric task id
FLAGS
--include-deleted Pass include_deleted=true to the API query
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Get one task with full linked context (GET /api/v1/tasks/{id}).
Examples:
leverage task get 123
leverage task get 123 --include-deletedSee code: src/commands/task/get.ts
leverage task patch ID
Patch a task (PATCH /api/v1/tasks/{id}). Send at least one field.
USAGE
$ leverage task patch ID [-k <value>] [-u <value>] [-t <value>] [--title <value>] [--description <value>]
[--category general|bank|taxes|cashflow|rental] [--due-date <value>] [--property-id <value>] [--linked-unit-id
<value>] [--linked-tenancy-id <value>] [--linked-dd-issue-id <value>] [--is-checked] [--body-file <value>]
ARGUMENTS
ID Numeric task id
FLAGS
--body-file=<value> JSON object merged last (overrides flags)
--category=<option> <options: general|bank|taxes|cashflow|rental>
--description=<value> New description (empty to clear — omit if not changing)
--due-date=<value> ISO due date or null sent as empty string
--[no-]is-checked
--linked-dd-issue-id=<value>
--linked-tenancy-id=<value>
--linked-unit-id=<value>
--property-id=<value> property UUID or omit
--title=<value> New title
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
Patch a task (PATCH /api/v1/tasks/{id}). Send at least one field.
Examples:
leverage task patch 42 --title "Updated"
leverage task patch 42 --is-checkedSee code: src/commands/task/patch.ts
leverage tasks
List tasks (GET /api/v1/tasks).
USAGE
$ leverage tasks [-k <value>] [-u <value>] [-t <value>] [--property-id <value>] [--is-checked true|false]
[--category general|bank|taxes|cashflow|rental] [--include-deleted] [--limit <value>] [--offset <value>]
FLAGS
--category=<option> Filter by category
<options: general|bank|taxes|cashflow|rental>
--include-deleted Include soft-deleted tasks
--is-checked=<option> Filter by checked state
<options: true|false>
--limit=<value> [default: 100]
--offset=<value>
--property-id=<value> Filter by property UUID
AUTH FLAGS
-k, --api-key=<value> [env: LEVERAGE_API_KEY] x-api-key value (user API key from profile, or service key
LEVERAGE_SERVICE_KEY). Prefer env LEVERAGE_API_KEY.
-t, --tenant-id=<value> [env: LEVERAGE_TENANT_ID] x-tenant-id when using the service API key (acting user in that
tenant). Env LEVERAGE_TENANT_ID.
-u, --base-url=<value> [default: https://api.leverageimmo.com, env: LEVERAGE_API_URL] Leverage API base URL without
trailing slash. Env LEVERAGE_API_URL.
DESCRIPTION
List tasks (GET /api/v1/tasks).
Examples:
leverage tasks
leverage tasks --property-id <uuid> --limit 50
leverage tasks --category general --is-checked false
Auth: LEVERAGE_API_KEY or --api-key; with service key also LEVERAGE_TENANT_ID or --tenant-id.See code: src/commands/tasks.ts
Repo development
pnpm install
cd packages/cli && pnpm run dev:help
pnpm run dev tasks --help
pnpm run buildoclif readme refreshes the command table above during prepack.
Publish (maintainers)
Releases are driven by release-please on pushes to main (see .github/workflows/release-please.yaml):
- Merge PRs whose commits touch
packages/cli/and/orpackages/leverage/and use Conventional Commits (feat:,fix:, …). - When there is enough releasable work, release-please opens a Release PR (bumps package.json
versionand updatesCHANGELOG.md). - Merge the Release PR — that creates the tag
cli-vX.Y.Zand the GitHub Release. .github/workflows/cli-release.yamlruns on the tag and publishes@leverageai/clito npm.
The typed HTTP client is published separately as @leverageai/leverage (same release-please flow; tag leverage-v*, workflow .github/workflows/leverage-release.yaml).
