Skip to main content

YNAB API CLI

Complete, synchronous REST CLI for the reviewed YNAB API contract. The official SDK is not a dependency. Generated, strictly typed endpoint classes and models are included for Python callers.

Install and connect

uv tool install ynab-api-cli
ynab-api-cli configure
ynab-api-cli doctor
ynab-api-cli plans get-plans
ynab-api-cli select-plan PLAN_UUID
ynab-api-cli doctor

Generate your personal token in YNAB Developer Settings, then enter it through the hidden terminal prompt. Do not put it in command arguments. Configuration is stored under $XDG_CONFIG_HOME/ynab-api-cli, falling back to ~/.config/ynab-api-cli on all platforms. Credentials are plaintext and protected with private POSIX permissions or a current-user Windows ACL.

ynab-api-cli discover
ynab-api-cli discover transactions
ynab-api-cli inspect createTransaction
ynab-api-cli transactions get-transactions --since-date 2026-01-01
ynab-api-cli call getTransactions --request @request.json

Uniform requests use {"path":{},"query":{},"body":{}}; omit body for operations without one. --request - and --body - read stdin. Endpoint flags use kebab-case names. Boolean flags take true or false.

Writes preview by default. Add --execute only for an intended mutation and verify its result through reads. Requests use TLS, a 30-second timeout, and no automatic retries or redirects. An uncertain write must be reconciled before retrying. Amounts are integer milliunits, and explicit null differs from omission.

--metadata adds status, selected headers, and contract version. Exit codes: 0 success, 1 configuration/API/compatibility failure, 2 usage error, and 130 interruption. doctor --offline does not validate API access. configure --replace explicitly rotates credentials while preserving unrelated fields.

Typed Python interface

from ynab_api_cli.generated.api.transactions.get_transactions import Endpoint
from ynab_api_cli.transport import Connection, Transport

# Load protected credentials through ConfigStore in real applications.
response = Endpoint.execute(transport=Transport(Connection(token)), plan_id=plan_id)
raw_json = response.raw
typed_result = response.parsed

Typed endpoint execution directly submits mutations; preview guards belong to the CLI. The transport independently validates requests and responses against the bundled contract. Raw JSON remains available alongside typed parsing.

Development and maintenance

uv sync --locked
uv run poe fix
uv run poe check
uv run poe codegen-check
uv run poe contract-check
uv run poe compat-check
uv build

The contract snapshot, reviewed operation catalog, and provenance are packaged resources. Generator configuration lives in pyproject.toml; templates and deterministic transforms produce all generated code. Do not edit generated files manually.

See maintenance for reviewed upgrades, test coverage, and CI. See live testing before enabling writes against a dedicated test plan.

See secure live CI for the separate, manually approved read-only workflow. Ordinary CI requires no YNAB credentials. No local token is uploaded automatically.

Supplementary Codex skill

ynab-api-cli skill show
ynab-api-cli skill export /path/to/codex/skills/ynab-api-cli

Export refuses an existing destination. The canonical skill is in skills/ynab-api-cli and is also included as installed package data. The CLI works independently of Codex.

For a source checkout, install with uv tool install . or run commands with uv run ynab-api-cli.

Releases

The publishing pipeline follows VerdiClip's release-please and PyPI trusted-publishing pattern. See publishing for the initial project setup, release process, and TestPyPI option.

Metadata

Release files for ynab-api-cli 0.1.1

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

Source distribution (sdist)

Source distribution for ynab-api-cli 0.1.1
File Size Uploaded Provenance Actions
ynab_api_cli-0.1.1.tar.gz 129.5 kB With provenance Details for ynab_api_cli-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ynab-api-cli 0.1.1
File Interpreter ABI Platform Actions
ynab_api_cli-0.1.1-py3-none-any.whl Python 3 none any Details for ynab_api_cli-0.1.1-py3-none-any.whl

Total release size: 333.0 kB

Release files / ynab_api_cli-0.1.1.tar.gz

Download URL ynab_api_cli-0.1.1.tar.gz
Size 129.5 kB
Tags Source
SHA-256 checksum
How to use checksums
98ec6a6f5e5d5d0238e18a19d49ef4607deba49f192e8281826b9bff0d362aa2
BLAKE2b-256 checksum
How to use checksums
89874061353adaf6d917048ccec42e02b038142de76dc047d1d29a9053268960
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / ynab_api_cli-0.1.1-py3-none-any.whl

Download URL ynab_api_cli-0.1.1-py3-none-any.whl
Size 203.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e197e8d791087576769e67cd4f1b49b5ee6ad78cf385b5a902bedf7fdccbfeb
BLAKE2b-256 checksum
How to use checksums
aff2cdbeaeade145cd88e0693be60c0bbfae686cc29dec6766bbaf64e5a46e5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Security for ynab-api-cli 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ynab_api_cli-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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