app ledger

aeat app ledger add

Add one manual ledger transaction in the active profile

Parameters

--date

Booked date (YYYY-MM-DD) Option, required.

--amount

Transaction amount in the transaction currency (decimal, e.g. 1200.50). Option, required.

--direction

Transaction direction (INCOMING / OUTGOING / INTERNAL_TRANSFER) Option, required.

--description

Non-blank narrative Option, required.

--value-date

Value date (YYYY-MM-DD) Option, optional.

--currency

Three-letter ISO 4217 currency code Option, optional.

--counterparty

Counterparty descriptor Option, optional.

--classification

Business classification (BUSINESS / PERSONAL / MIXED / …) Option, optional.

--business-pct

Business-use share from 0 to 1; only for MIXED rows. Omit for fully BUSINESS rows. Option, optional.

--category-id

Deductible-expense category id (expense transactions only; income needs no category) Option, optional.

--taxable-base

IVA-exclusive base amount Option, optional.

--iva-rate

Optional IVA rate as a decimal fraction Option, optional.

--iva-amount

Optional IVA amount on the row Option, optional.

--iva-category

Explicit IVA category override for this transaction (e.g. intra_community_supply, export_third_country_zero_rated, export_assimilated_zero_rated, domestic_not_subject) Option, optional.

--deduction-kind

Exact source of the input-IVA deduction (for example domestic_current). Required for the input cuota to be deducted; the taxonomy is not inferred. Option, optional.

--counterparty-country

Country where the counterparty is established (ISO 3166-1 alpha-2, e.g. US, DE). Establishment only; use –counterparty-identification-state for VAT identification. Option, optional.

--counterparty-identification-state

Member State whose VAT number the counterparty trades under (Ley 37/1992 art. 25 exempts on this, not on where it is established) Option, optional.

--recargo-amount

Recargo de equivalencia cuota charged on this sale to a recargo-regime retailer (LIVA art. 161); aggregated into the Modelo 303 recargo cuota by IVA rate tier Option, optional.

--irpf-category

IRPF-specific category key Option, optional.

--usage-ratio-id

Configured usage-ratio id, not arbitrary prose. Inspect the configured ratios and eligible categories before creating or assigning one; the row’s –category-id must already carry that ratio. Option, optional.

--prorrata-reference

IVA prorrata substrate reference Option, optional.

--art-104-tres-exclusion

Operator-declared LIVA art. 104.Tres denominator exclusion (foreign permanent establishment or non-habitual real-estate/financial operation); excludes the operation from both terms of the prorrata ratio. Option, optional.

--input-classification

Operator-declared LIVA art. 106 prorrata-especial per-input use classification (exclusively_deductible: deducted in full; exclusively_non_deductible: no deduction; common: deducted at the general prorrata percentage); meaningful only for input rows in a bucket under prorrata especial. Option, optional.

--sector

Differentiated-sector id (LIVA arts. 9.1.c / 101) to which this input belongs; it must match an already declared sector. Option, optional.

--purchase-invoice-evidence-id

Canonical purchase-invoice evidence id Option, optional.

--attachment-id

Supplementary attachment id (repeatable) Option, optional.

--notes

Operator notes stored with the transaction Option, optional.

--actor

Operator name recorded on the bucket event Option, optional.

--idempotency-key

Stable key for this logical add: passing the same key again is a safe no-op, so retries do not duplicate the row. Omit it to append a deliberate duplicate. Option, optional.

--source-jurisdiction

Two-letter ISO 3166-1 alpha-2 country code identifying the regulatory source jurisdiction of the income or expense (e.g. ES for Spanish-source, FR for French-source). Required for IRNR scope and the Art. 93 LIRPF Beckham filter. Option, optional.

aeat app ledger allocate

Record business/private proportionality for a ledger transaction

Parameters

transaction_id

Ledger transaction id to allocate Argument, required.

--business-pct

Business-use share from 0 to 1 for MIXED/proportional rows; do not use ledger allocate for a fully BUSINESS row. Option, required.

--category-id

Deductible-expense category id (expense transactions only; income needs no category) Option, optional.

--usage-ratio-id

Configured usage-ratio id, not arbitrary prose. Inspect the configured ratios and eligible categories before creating or assigning one; the row’s –category-id must already carry that ratio. Option, optional.

--prorrata-reference

IVA prorrata reference for IVA workflows Option, optional.

--actor

Operator name recorded on the bucket event Option, optional.

aeat app ledger archive

Archive one ledger transaction in the active profile

Parameters

transaction_id

Ledger transaction id to archive Argument, required.

--reason

Reason recorded in lifecycle history Option, optional.

--yes

Confirm archiving the ledger transaction Option, optional.

--actor

Operator name recorded on the bucket event Option, optional.

aeat app ledger attach

Attach existing evidence to a ledger transaction.

Parameters

transaction_id

Ledger transaction id to attach evidence to Argument, required.

--purchase-invoice-evidence-id

Existing purchase-invoice evidence id supporting the transaction. Option, optional.

--attachment-id

Secure attachment id to link to the transaction; repeat for multiple attachments Option, optional.

--actor

Operator name recorded on the bucket event Option, optional.

aeat app ledger bienes-inversion declare

Declare one capital good tracked for IVA regularización.

Parameters

identifier

Stable register identifier. Argument, required.

--description

Human description of the good. Option, required.

--acquisition-year

Year the good was acquired. Option, required.

--acquisition-ledger-id

No description. Option, required.

--cuota-soportada

Total input IVA borne on acquisition (positive). Option, required.

--prorrata-inicial

Definitive deduction percentage of the acquisition year (0-100). Option, required.

--kind

Regularisation window: mueble (4yr) or inmueble (9yr). Option, required.

–art108-elegible / –no-art108-elegible

Whether the good qualifies as a bien de inversión under LIVA art. 108. Option, optional.

--sector

No description. Option, optional.

--disposal-year

Optional art-110 disposal year. Option, optional.

--disposal-regime

Disposal regime (sujeta_no_exenta or exenta_o_no_sujeta); required with –disposal-year. Option, optional.

aeat app ledger bienes-inversion list

List every tracked capital good on the active profile register.

aeat app ledger categories

List the category ids accepted by –category-id and –irpf-category

aeat app ledger check

Probe ledger transactions in the addressed profile (defaults to the active profile) and report anomaly rows aggregated across every period a transaction touches, plus any invoice link the invoice and transaction catalogues disagree about. Local-only; never contacts AEAT.

Parameters

--bucket-id

Bucket id to probe (defaults to the active profile). Option, optional.

--period

Optional filing period as an AEAT token: 1T-4T (quarters), 0A (annual), 01-12 (months). Combine with –year to match ledger status. Option, optional.

--year

Filing year for –period (e.g. 2024). Option, optional.

aeat app ledger classify

Classify one ledger transaction in the active profile

Parameters

transaction_id

Ledger transaction id to classify Argument, optional.

--classification

Business classification state for the transaction Option, optional.

--file

Path to a CSV file with columns transaction_id, classification[, category_id, business_pct, usage_ratio_id, taxable_base, iva_rate, iva_amount, iva_category, irpf_category]. Option, optional.

--business-pct

Business-use share from 0 to 1; required with –classification MIXED, rejected for any other classification, and omitted for fully BUSINESS rows Option, optional.

--category-id

Deductible-expense category id (expense transactions only; income needs no category) Option, optional.

--taxable-base

Taxable base amount Option, optional.

--iva-rate

IVA rate as a decimal, for example 0.21 Option, optional.

--iva-amount

IVA amount Option, optional.

--irpf-category

IRPF category id. Net-paid professional invoices use actividad_economica; net-paid rents use arrendamiento_local or arrendamiento_vivienda_afecto. Royalties and SGAE income are capital mobiliario under LIRPF art. 25.4 when the taxpayer is not the author, and actividad economica under LIRPF art. 27 when they are and carry on the activity. Consult the ledger category catalogue for all ids. Option, optional.

--m210-tipo-renta-code

Official two-digit Modelo 210 tipo-de-renta code. Option, optional.

--m210-gross-income-amount

Explicit gross income for the Modelo 210 source projection. Option, optional.

--m210-applicable-rate

Applicable Modelo 210 rate as a decimal fraction, for example 0.24. Option, optional.

--m210-payer-mode

One payer or the explicit code-35 multiple-payer exception. Option, optional.

--m210-payer-id

Stable payer identity for a single-payer Modelo 210 component. Option, optional.

--m210-asset-or-right-id

Stable property or right identity for the Modelo 210 renta. Option, optional.

--iva-category

Explicit IVA category override for this transaction (e.g. intra_community_supply, export_third_country_zero_rated, export_assimilated_zero_rated, domestic_not_subject) Option, optional.

--deduction-kind

Exact source of the input-IVA deduction (for example domestic_current). Required for the input cuota to be deducted; the taxonomy is not inferred. Option, optional.

--counterparty-country

Country where the counterparty is established (ISO 3166-1 alpha-2, e.g. US, DE). Establishment only; use –counterparty-identification-state for VAT identification. Option, optional.

--counterparty-identification-state

Member State whose VAT number the counterparty trades under (Ley 37/1992 art. 25 exempts on this, not on where it is established) Option, optional.

--actor

Operator name recorded on the bucket event Option, optional.

--reaffirm

Reaffirm the classification of an already-classified transaction. Option, optional.

--llm

Ask the on-host local reader to classify the transaction; preview by default, persist with –apply. Option, optional.

--apply

Persist the LLM suggestion with llm: provenance instead of only previewing it. Option, optional.

--saturate

Saturate via LLM: also select the IVA category and derive the rate, base, and IVA amount. Option, optional.

--read-evidence

Read the transaction’s attached evidence on-host and feed it to the classifier. Option, optional.

--vision-model

Override the local Ollama vision model for an image/scanned-invoice read (e.g. qwen2.5vl:7b); defaults to the configured model. Option, optional.

--auto-split

Read the attached invoice and, when it is multi-component, split it into per-line base/IVA children; otherwise classify it in place (requires –read-evidence). Option, optional.

--reject

Record an explicit rejection of the LLM suggestion as an audit event, without classifying the row (cannot be combined with –apply). Option, optional.

--reason

Free-text reason recorded as the transaction notes and as the classification decision’s provenance reason (visible on ledger view), or with a –reject decision. Option, optional.

aeat app ledger counterparty confirm

Confirm where a counterparty is established and which State VAT-identifies it.

Parameters

tax_identifier

The counterparty’s tax identifier as printed on the document. Argument, required.

--scope

The IVA territory the counterparty is established in. Option, optional.

--identification-state

Member State that VAT-identifies the counterparty. A different fact from –scope: art. 25 exempts on this, not on where the party is established. Option, optional.

--country-code

Country the identifier is stated under, when it is not Spanish. Option, optional.

--note

What the answer rests on, in your own words. Recorded, never consulted. Option, optional.

--actor

Operator identifier recorded as having made the assertion. Option, optional.

aeat app ledger counterparty view

Show what the VAT-identification ladder would answer for this counterparty based on what is confirmed so far.

Parameters

tax_identifier

The counterparty’s tax identifier as printed on the document. Argument, required.

--country-code

Country the identifier is stated under, when it is not Spanish. Option, optional.

--evidenced-scope

Territory a document in hand places this party in. Supply it to ask what the ladder will answer for that document, which is the only way to see a disagreement with what you confirmed before a confirm refuses on it. Option, optional.

aeat app ledger counterparty withdraw

Withdraw what was confirmed about a counterparty, stating the earlier answer was wrong.

Parameters

tax_identifier

The counterparty’s tax identifier as printed on the document. Argument, required.

--country-code

Country the identifier is stated under, when it is not Spanish. Option, optional.

aeat app ledger detach

Detach attachments from a ledger transaction without deleting their bytes.

Parameters

transaction_id

Ledger transaction id (or an unambiguous prefix). Argument, required.

--attachment-id

Id of the attachment to detach; repeatable. Option, optional.

--actor

Actor recorded on the lifecycle event. Option, optional.

aeat app ledger evidence add

Register purchase invoice evidence from a PDF or image

Parameters

source_path

Path to the invoice PDF or image Argument, required.

--supplier

Supplier name Option, optional.

--invoice-number

Supplier invoice number Option, optional.

--invoice-date

Invoice issue date in ISO 8601 (YYYY-MM-DD), e.g. 2026-01-15. Option, optional.

--taxable-base

Invoice taxable base Option, optional.

--iva-rate

Applied IVA rate as a decimal Option, optional.

--iva-amount

Invoice IVA amount Option, optional.

--notes

Internal notes about the evidence Option, optional.

--idempotency-key

Your own key for this attachment. Repeating the command with the same key returns the record it already created instead of adding a second one, and refuses if the document behind the key changed. Without a key the command adds a new record every time, because the same file can legitimately be attached twice. Option, optional.

aeat app ledger evidence attachment-queue

List Drive attachments awaiting invoice review.

aeat app ledger evidence attachment-view

Inspect stored attachment metadata and provenance.

Parameters

attachment_id

Content-addressed attachment identifier. Argument, required.

aeat app ledger evidence batch

Ingest every document in a directory (or each –file) into evidence and a reviewable draft, one typed result row per document.

Parameters

directory

Directory whose files are ingested. Combine with or replace by repeated –file. Argument, optional.

--kind

Invoice kind: issued (a customer owes you) or received (you owe a supplier) Option, required.

--file

One document to ingest. Repeat once per document; combines with a directory. Option, optional.

aeat app ledger evidence confirm

Re-extract evidence on-host and confirm it into a real catalogue Invoice.

Parameters

--kind

Invoice kind: issued (a customer owes you) or received (you owe a supplier) Option, required.

--evidence-id

Purchase invoice evidence record id to extract from. Option, optional.

--attachment-id

Linked attachment id to extract from (alternative to –evidence-id). Option, optional.

--counterparty-nif

Override the extracted supplier tax id. Option, optional.

--counterparty-name

Counterparty display name (no extraction heuristic yet; normally required). Option, optional.

--invoice-number

Override the extracted invoice number. Option, optional.

--invoice-date

Override the extracted invoice date (YYYY-MM-DD). Option, optional.

--taxable-base

Override the extracted taxable base. Option, optional.

--iva-rate

Override the extracted IVA rate (omit to keep the extracted value). Option, optional.

--country-code

Counterparty ISO 3166-1 alpha-2 country code. Required: it routes both informativas, so it is never assumed. Option, required.

--currency

ISO-4217 currency code. Option, optional.

--operation-type

Modelo 349 clave for an entrega intracomunitaria. Required when the document states an intra-community supply: the category cannot say whether it followed an exempt importation. Option, optional.

--supply-nature

State whether the operation is a supply of goods or of services. The place-of-supply rules differ, so a document that does not say leaves the treatment unresolved. Option, optional.

--invoice-class

Declare the invoice class when the document does not state one. A rectificativa is read from the document where it names the invoice it corrects, so this is the override for documents that do not. Option, optional.

--rectifies

Number of the invoice this rectificativa corrects. Required by RD 1619/2012 art. 6.1.a.2 alongside its own series, and read from the document where one is named. Option, optional.

--series

Numbering series the invoice was issued in. RD 1619/2012 art. 6.1.a.2 obliges a rectificativa into its own series, so declaring that class needs one; read from the document where it states one. Option, optional.

--notes

Internal notes about the evidence Option, optional.

--resolve

Answer one blocking finding: <finding-id>=<choose|supply|attest>:<value-or-reason>. For choose, name the reading by its value or by the digest review showed. Repeat once per finding; there is no bulk flag. Option, optional.

aeat app ledger evidence extract

Read an invoice PDF’s fields on-host into a reviewable draft.

Parameters

--evidence-id

Purchase invoice evidence record id to extract from. Option, optional.

--attachment-id

Linked attachment id to extract from (alternative to –evidence-id). Option, optional.

--off-host-provider

Send this document to a hosted model instead of reading it on-host. Option, optional.

--acknowledge-off-host

Acknowledge, for this one read, that the document leaves this machine. Option, optional.

aeat app ledger evidence list

List registered purchase invoice evidence

aeat app ledger evidence pull

Fetch a Drive document link and store its bytes as encrypted evidence on a ledger row.

Parameters

transaction_id

Ledger transaction id. Argument, required.

--source

Link source: gmail, google_drive, or url. Option, required.

--reference

The document link reference. Option, required.

--note

Optional note. Option, optional.

--actor

Operator label. Option, optional.

aeat app ledger evidence pull-all

Bulk-fetch every PDF/image invoice in a Drive folder and store each as encrypted evidence, unlinked to any transaction.

Parameters

--folder

Drive folder URL or bare folder id to bulk-fetch invoice PDFs/images from. Option, required.

--note

Optional note recorded on every fetched attachment. Option, optional.

aeat app ledger evidence remove

Delete purchase invoice evidence

Parameters

evidence_id

Evidence id (exact match) Argument, required.

--yes

Confirm deleting the evidence Option, optional.

aeat app ledger evidence review list

List pending extraction drafts awaiting human review.

Parameters

--reason

Show only drafts blocked for this reason. Option, optional.

--finding

Show only drafts whose document failed this deterministic check. Option, optional.

--advisory

Show only drafts carrying this non-blocking advisory. These stop nothing, so they are otherwise met only by opening each document. Option, optional.

--blocking

Show only drafts that cannot be confirmed until a finding is answered. Option, optional.

aeat app ledger evidence review view

Show every reviewable field of a pending draft, along with its blocking findings.

Parameters

reference

Evidence or attachment reference the pending draft was read from. Argument, required.

aeat app ledger evidence update

Update purchase invoice evidence details

Parameters

evidence_id

Evidence id (exact match) Argument, required.

--supplier

No description. Option, optional.

--invoice-number

No description. Option, optional.

--invoice-date

No description. Option, optional.

--taxable-base

No description. Option, optional.

--iva-rate

No description. Option, optional.

--iva-amount

No description. Option, optional.

--notes

No description. Option, optional.

aeat app ledger evidence view

Show purchase invoice evidence

Parameters

evidence_id

Evidence id (exact match) Argument, required.

aeat app ledger exclude

Mark one reviewed ledger transaction as deliberately excluded from filing.

Parameters

transaction_id

Ledger transaction id. Argument, required.

--reason

Optional note recording why the row is excluded. Option, optional.

--yes

Confirm the reviewed-excluded decision. Option, optional.

--actor

Operator label. Option, optional.

aeat app ledger export

Export canonical ledger rows from the active profile

Parameters

--output

Path to write the exported ledger file Option, required.

--export-format

Export serialization format Option, optional.

--include-inactive

Include archived and stashed ledger transactions Option, optional.

--period

Filing period as an AEAT token: 1T-4T (quarters), 0A (annual), 01-12 (months). Combine with –year to choose the year. Option, optional.

--year

Filing year for –period (e.g. 2024). Option, optional.

--actor

Operator name recorded on the bucket event Option, optional.

aeat app ledger history

Emit the chronological bucket-event chain for one ledger transaction id

Parameters

transaction_id

Ledger transaction id (or unambiguous hex prefix) to inspect Argument, required.

--include-split-siblings

Expand the chain to include events for every split sibling that shares a split_group_id with this transaction Option, optional.

aeat app ledger import

Import bank statements or records into the accounting ledger

Parameters

--file

Path to the bank statement file or directory Option, required.

--provider

Statement format provider. Option, required.

--dry-run

Run the import in dry-run mode (without saving) Option, optional.

--verify

Verify entries after import Option, optional.

--verify-source

Original file used to verify imported rows. Option, optional.

--verbose

Show detailed information during import Option, optional.

--period

Filing period as an AEAT token: 1T-4T (quarters), 0A (annual), 01-12 (months). Combine with –year to choose the year. Option, optional.

--year

Filing year for –period (e.g. 2024). Option, optional.

aeat app ledger inventory closing-authority-record

Atomically record evidenced inventory closing authority

Parameters

actividad_id

Economic activity identifier Argument, required.

--year

Tax year Option, required.

--file

Read the complete closing-authority JSON document from a file. Option, required.

aeat app ledger inventory create

Create an inventory ledger for one activity and tax year

Parameters

actividad_id

Economic activity identifier Argument, required.

--year

Tax year Option, required.

--valuation-method

Valuation method (fifo or pmp) Option, required.

--opening-stock

Opening stock value Option, optional.

aeat app ledger inventory list

List inventory ledgers in the active profile

aeat app ledger inventory movement add

Add a purchase, sale, or adjustment movement to the ledger

Parameters

--actividad-id

Economic activity identifier Option, required.

--year

Tax year Option, required.

--movement-id

Movement id within the ledger Option, required.

--date

Movement date (YYYY-MM-DD) Option, required.

--kind

Movement kind (opening, purchase, cogs or count) Option, required.

--quantity

Movement quantity, positive or negative Option, required.

--unit-cost

Unit cost for purchase movements Option, optional.

--taxable-base

Taxable base linked to the movement Option, optional.

--acquisition-cost-stdin

Read the complete acquisition-cost JSON object from stdin Option, optional.

aeat app ledger inventory valuation preview

Preview closing stock and cost of sales

Parameters

--actividad-id

Economic activity identifier Option, required.

--year

Tax year Option, required.

aeat app ledger invoice add

Create a linkable reconciliation invoice in the catalogue.

Parameters

--kind

Invoice kind: issued (a customer owes you) or received (you owe a supplier) Option, required.

--counterparty-name

No description. Option, required.

--invoice-number

No description. Option, required.

--invoice-date

Invoice issue date in ISO 8601 (YYYY-MM-DD), e.g. 2026-01-15. Option, required.

--taxable-base

No description. Option, required.

--country-code

Counterparty ISO 3166-1 alpha-2 country code. Required: it routes both informativas, so it is never assumed. Option, required.

--iva-rate

No description. Option, optional.

--currency

No description. Option, optional.

--operation-type

M349 operation key: E supplies of goods, M supplies after an exempt import, H the same via a fiscal representative, A acquisitions of goods, T triangular supplies, S services supplied, I services acquired, R call-off-stock transfers, D call-off-stock returns, C call-off-stock substitutions Option, optional.

--operation-date

Date the entrega or prestacion took place (YYYY-MM-DD). This is the LIVA art. 75 devengo date that decides which period declares the cuota; without it the invoice date stands in for it. Option, optional.

--retention-rate

RIRPF art. 95.1 retención fraction withheld by the payer (0.15 for the general 15%, or 0.07 during the inicio-de-actividad window). Requires –retention-amount; a rate alone is refused. Option, optional.

--retention-amount

Amount of IRPF retención withheld by the payer, in euros. May be supplied alone, or alongside –retention-rate. Option, optional.

--invoice-class

Invoice class. A rectificativa also requires –rectifies-invoice-number naming the invoice it corrects. Option, optional.

--counterparty-nif

No description. Option, optional.

--series

Invoice numbering series, when the issuer uses one. Option, optional.

--rectifies-invoice-number

Number of the invoice this rectificativa corrects. Option, optional.

--recargo

Recargo de equivalencia charged on top of the cuota (LIVA art. 161). It rides inside the invoice total, unlike a retencion. Option, optional.

--iva-category

IVA treatment of the operation. Required for a renta income calculation to ground it. Option, optional.

--notes

No description. Option, optional.

aeat app ledger invoice import

Bulk-create catalogue invoices from a CSV or XLSX file.

Parameters

--file

Path to a CSV or XLSX file of invoice rows (counterparty_nif, counterparty_name, invoice_number, invoice_date, taxable_base, and optional iva_rate/retencion_amount/retencion_rate/currency/country_code/notes). A retencion_rate is accepted only beside its retencion_amount. Option, required.

--kind

Invoice kind: issued (a customer owes you) or received (you owe a supplier) Option, required.

--country

Counterparty country (ISO 3166-1 alpha-2) for the whole import. Required only when the file carries no country_code column; ignored for rows that state their own. It asserts this country for EVERY such row, so a book mixing domestic and foreign counterparties needs the column instead. Option, optional.

aeat app ledger invoice list

List reconciliation catalogue invoices.

Parameters

--kind

Invoice kind: issued (a customer owes you) or received (you owe a supplier) Option, optional.

aeat app ledger invoice remove

Delete one reconciliation catalogue invoice.

Parameters

invoice_id

Catalogue invoice id (or unambiguous prefix). Argument, required.

--yes

Confirm deleting the invoice Option, optional.

aeat app ledger invoice update

Update business invoice details

Parameters

invoice_id

Catalogue invoice id (or unambiguous prefix). Argument, required.

--counterparty-name

No description. Option, optional.

--counterparty-country

No description. Option, optional.

--notes

No description. Option, optional.

--iva-category

IVA treatment of the operation. Required for a renta income calculation to ground it. Option, optional.

--operation-type

M349 operation key: E supplies of goods, M supplies after an exempt import, H the same via a fiscal representative, A acquisitions of goods, T triangular supplies, S services supplied, I services acquired, R call-off-stock transfers, D call-off-stock returns, C call-off-stock substitutions Option, optional.

--operation-date

Date the entrega or prestacion took place (YYYY-MM-DD). This is the LIVA art. 75 devengo date that decides which period declares the cuota; without it the invoice date stands in for it. Option, optional.

--retention-rate

RIRPF art. 95.1 retención fraction withheld by the payer (0.15 for the general 15%, or 0.07 during the inicio-de-actividad window). Requires –retention-amount; a rate alone is refused. Option, optional.

--retention-amount

Amount of IRPF retención withheld by the payer, in euros. May be supplied alone, or alongside –retention-rate. Option, optional.

--invoice-class

Invoice class. A rectificativa also requires –rectifies-invoice-number naming the invoice it corrects. Option, optional.

--series

Invoice numbering series, when the issuer uses one. Option, optional.

--rectifies-invoice-number

Number of the invoice this rectificativa corrects. Option, optional.

aeat app ledger invoice view

Show one reconciliation catalogue invoice by id or unambiguous prefix.

Parameters

invoice_id

Catalogue invoice id (or unambiguous prefix). Argument, required.

aeat app ledger invoice wizard

Guided, non-interactive manual entry when extraction is unavailable.

Parameters

--kind

Invoice kind: issued (a customer owes you) or received (you owe a supplier) Option, required.

--counterparty-nif

No description. Option, required.

--counterparty-name

No description. Option, required.

--invoice-number

No description. Option, required.

--invoice-date

Invoice issue date in ISO 8601 (YYYY-MM-DD), e.g. 2026-01-15. Option, required.

--taxable-base

No description. Option, required.

--country-code

Counterparty ISO 3166-1 alpha-2 country code. Required: it routes both informativas, so it is never assumed. Option, required.

--iva-rate

No description. Option, optional.

--currency

No description. Option, optional.

--operation-type

M349 operation key: E supplies of goods, M supplies after an exempt import, H the same via a fiscal representative, A acquisitions of goods, T triangular supplies, S services supplied, I services acquired, R call-off-stock transfers, D call-off-stock returns, C call-off-stock substitutions Option, optional.

--operation-date

Date the entrega or prestacion took place (YYYY-MM-DD). This is the LIVA art. 75 devengo date that decides which period declares the cuota; without it the invoice date stands in for it. Option, optional.

--retention-rate

RIRPF art. 95.1 retención fraction withheld by the payer (0.15 for the general 15%, or 0.07 during the inicio-de-actividad window). Requires –retention-amount; a rate alone is refused. Option, optional.

--retention-amount

Amount of IRPF retención withheld by the payer, in euros. May be supplied alone, or alongside –retention-rate. Option, optional.

--invoice-class

Invoice class. A rectificativa also requires –rectifies-invoice-number naming the invoice it corrects. Option, optional.

--series

Invoice numbering series, when the issuer uses one. Option, optional.

--rectifies-invoice-number

Number of the invoice this rectificativa corrects. Option, optional.

--recargo

Recargo de equivalencia charged on top of the cuota (LIVA art. 161). It rides inside the invoice total, unlike a retencion. Option, optional.

--iva-category

IVA treatment of the operation. Required for a renta income calculation to ground it. Option, optional.

--notes

No description. Option, optional.

aeat app ledger list

List ledger transactions in the active profile

Parameters

--filter

Filter rows by status, period (a bare AEAT token, e.g. period=1T) plus year (e.g. year=2026), classification, issue, import, direction (ingreso/gasto), or text. To filter by organisational group label use the separate –group option. Option, optional.

--period

Filing period as an AEAT token: 1T-4T (quarters), 0A (annual), 01-12 (months). Combine with –year to choose the year. Option, optional.

--year

Filing year for –period (e.g. 2024). Option, optional.

--limit

Maximum rows to show (default: all rows). Option, optional.

--offset

Skip this many rows before listing (default: 0). Option, optional.

--group

Show only rows in this group label. Option, optional.

--by-group

Section the listing by group label. Option, optional.

--sort-by

Sort the listed rows by this field (date, amount, description, created_at, modified_at, …). Option, optional.

--sort-order

Sort order: asc (ascending) or desc (descending). Option, optional.

--hide-llm-rejected

Hide rows whose most recent LLM suggestion was rejected (a reviewed-and-declined row drops out of the pending queue). Option, optional.

aeat app ledger llm-diagnostics

Report existing LLM usage, cost, and classification-confidence metrics.

Parameters

--since

Inclusive lower ISO date (YYYY-MM-DD) bound on usage records. Option, optional.

--until

Inclusive upper ISO date (YYYY-MM-DD) bound on usage records. Option, optional.

--low-confidence-below

Confidence floor below which a classification counts as low-confidence. Option, optional.

aeat app ledger merge

Re-merge a complete cohort of split children into a fresh transaction

Parameters

--child-id

One child id (or unambiguous prefix) to merge. Repeat for every sibling in the cohort; partial merges are refused. Option, optional.

--reason

Reason recorded in the bucket-event payload and lifecycle history Option, optional.

--yes

Confirm the merge (archives every child and the parent, persists a fresh content-addressed merged transaction) Option, optional.

--actor

Operator name recorded on the LEDGER_TRANSACTION_MERGED event Option, optional.

aeat app ledger participation rebuild

Rebuild the participation index for the active bucket.

aeat app ledger preflight

Report missing ledger facts (category, taxable base, IVA amount/rate, currency, proportionality reference) for the active profile’s transactions in a given period. Local-only; never contacts AEAT.

Parameters

--period

Filing period as an AEAT token: 1T-4T (quarters), 0A (annual), 01-12 (months). Combine with –year to choose the year. Option, required.

--year

Filing year (e.g. 2024). Option, required.

aeat app ledger prorrata declare-sector

Declare one differentiated sector (LIVA arts. 9.1.c / 101): the operator’s art. 9.1.c partition, never inferred from the ledger.

Parameters

--sector-id

Stable sector id the register entries and ledger rows reference. Option, required.

--letra

LIVA art. 9.1.c letra (a/b/c/d) that makes this sector differentiated. Option, required.

--activity-code

CNAE / IAE activity code grouped into this sector (repeatable, at least one). Option, optional.

aeat app ledger prorrata elect-especial

Elect prorrata especial for an ejercicio (LIVA art. 103.Dos.1): per-input deduction routes by –input-classification on each ledger row.

Parameters

--ejercicio

Filing year the election covers. Option, required.

--percentage

Common-use deduction percentage 0-100 (LIVA art. 106.Uno regla 3.a / art. 104.Dos). Option, required.

--evidence-reference

Operator-held evidence for an option exercised in this ejercicio; omit to record an explicit continuation of the regime already in force. Option, optional.

--provenance

LIVA art. 105 source of the provisional percentage. Option, optional.

--reference

AEAT authorisation (art. 105.Dos) or inicio proposal (art. 105.Tres) reference. Option, optional.

--sector

Differentiated-sector id this entry covers; omit for the whole-entity entry. Option, optional.

aeat app ledger prorrata elect-general

Elect prorrata general for an ejercicio (LIVA art. 104): one deduction percentage applies to every deducible cuota.

Parameters

--ejercicio

Filing year the election covers. Option, required.

--percentage

Provisional deduction percentage 0-100 (LIVA art. 104.Uno + 105.Uno). Option, required.

--provenance

LIVA art. 105 source of the provisional percentage. Option, optional.

--reference

AEAT authorisation (art. 105.Dos) or inicio proposal (art. 105.Tres) reference. Option, optional.

--sector

Differentiated-sector id this entry covers; omit for the whole-entity entry. Option, optional.

aeat app ledger prorrata list

List every register entry and declared differentiated sector on the active profile.

aeat app ledger prorrata revoke-especial

Revoke prorrata especial for an ejercicio after a prior-year especial state (LIVA art. 103.Dos.1).

Parameters

--ejercicio

Filing year the election covers. Option, required.

--evidence-reference

Evidence reference for the current-period prorrata-especial option or revocation. Option, required.

--percentage

Provisional deduction percentage 0-100 (LIVA art. 104.Uno + 105.Uno). Option, required.

--provenance

LIVA art. 105 source of the provisional percentage. Option, optional.

--reference

AEAT authorisation (art. 105.Dos) or inicio proposal (art. 105.Tres) reference. Option, optional.

--sector

Differentiated-sector id this entry covers; omit for the whole-entity entry. Option, optional.

aeat app ledger prorrata seed

Seed the ejercicio’s provisional prorrata from the prior year’s definitive percentage (LIVA art. 105.Uno), read from the stamped prior Modelo 303 settlement observation.

Parameters

--ejercicio

Filing year whose provisional percentage is being seeded or settled. Option, required.

--sector

Differentiated-sector id this entry covers; omit for the whole-entity entry. Option, optional.

aeat app ledger prorrata seed-sector

Seed one differentiated sector’s provisional prorrata from that sector’s own prior-year definitive held in the register (LIVA arts. 101.Uno / 105.Uno).

Parameters

--ejercicio

Filing year whose provisional percentage is being seeded or settled. Option, required.

--sector-id

Stable sector id the register entries and ledger rows reference. Option, required.

aeat app ledger prorrata settle-sector

Settle one differentiated sector’s year-end definitive prorrata from that sector’s own annual operation volumes (LIVA art. 105.Cuatro).

Parameters

--ejercicio

Filing year whose provisional percentage is being seeded or settled. Option, required.

--sector-id

Stable sector id the register entries and ledger rows reference. Option, required.

--con-derecho-volume

The sector’s annual volume of operations with a right to deduct (LIVA art. 104, art. 104.Tres exclusions already applied). Option, required.

--sin-derecho-volume

The sector’s annual volume of operations with no right to deduct (LIVA art. 104, art. 104.Tres exclusions already applied). Option, required.

aeat app ledger ratios eligible

List categories that accept a specific ratio

Parameters

--year

Filing year whose category profiles supply the statutory ratios. Defaults to the current year. Option, optional.

–output-language / –language

Output language for the response text (es, en, ca, hu). Option, optional.

aeat app ledger ratios list

List category ratios in the active profile

Parameters

--year

Filing year whose category profiles supply the statutory ratios. Defaults to the current year. Option, optional.

–output-language / –language

Output language for the response text (es, en, ca, hu). Option, optional.

aeat app ledger ratios set

Set or replace the ratio for a category

Parameters

--year

Filing year whose category profiles supply the statutory ratios. Defaults to the current year. Option, optional.

category

Spending category id (e.g. vehiculo_combustible) Argument, required.

ratio

Applicable ratio between 0 and 1 Argument, required.

–output-language / –language

Output language for the response text (es, en, ca, hu). Option, optional.

aeat app ledger ratios unset

Remove the specific ratio for a category

Parameters

category

Category id whose ratio you want to clear Argument, required.

–output-language / –language

Output language for the response text (es, en, ca, hu). Option, optional.

aeat app ledger ratios validate

Validate ratios against eligible categories and bounds

Parameters

–output-language / –language

Output language for the response text (es, en, ca, hu). Option, optional.

aeat app ledger remove

Remove one ledger transaction from the active profile

Parameters

transaction_id

Ledger transaction id to remove Argument, required.

--reason

Reason recorded in removal history Option, optional.

--dry-run

Report removal effects without deleting the ledger transaction Option, optional.

--yes

Confirm deletion of the ledger transaction Option, optional.

--actor

Operator name recorded on the bucket event Option, optional.

aeat app ledger reset

Reset the active profile’s ledger catalogue

Parameters

--reason

Reason recorded in reset history Option, optional.

--dry-run

Report reset effects without clearing the ledger catalogue Option, optional.

--yes

Confirm clearing the active ledger catalogue Option, optional.

--actor

Operator name recorded on the bucket event Option, optional.

aeat app ledger restore

Restore one stashed or archived ledger transaction to active

Parameters

transaction_id

Ledger transaction id to restore to active Argument, required.

--reason

Reason recorded in lifecycle history Option, optional.

--yes

Confirm restoring the ledger transaction to active Option, optional.

--actor

Operator name recorded on the bucket event Option, optional.

aeat app ledger review

Interactive review and validation of ledger entries

Parameters

record_id

Ledger transaction id (or unambiguous hex prefix) Argument, optional.

--filter

Filter rows by status, period (a bare AEAT token, e.g. period=1T) plus year (e.g. year=2026), issue, import, classification, text, or direction Option, optional.

--verbose

Show detailed information during review Option, optional.

aeat app ledger rule add

Add a classification rule that auto-classifies matching transactions.

Parameters

--description-pattern

Regex pattern matched (case-insensitive) against transaction description. Option, required.

--classification

Target classification for matching transactions. Option, required.

--category-id

Optional spending category to apply. Option, optional.

--priority

Numeric priority; lower value is evaluated first (default 100). Option, optional.

--actor

Operator identifier recorded in the rule provenance. Option, optional.

aeat app ledger rule apply

Apply stored classification rules to unclassified ACTIVE transactions.

Parameters

--reaffirm

Also re-classify transactions that were manually classified. Option, optional.

--dry-run

Show what would be classified without persisting changes. Option, optional.

--actor

Operator identifier recorded in the rule provenance. Option, optional.

aeat app ledger rule list

List stored classification rules ordered by priority.

aeat app ledger split

Redistribute one parent transaction into N child transactions whose amounts sum to the parent amount exactly

Parameters

transaction_id

Parent transaction id (or unambiguous hex prefix) to split Argument, required.

--child-amount

One child amount as a non-negative magnitude in the parent’s currency. Repeat once per child; the count must match –child-description. Option, optional.

--child-description

One child narrative. Repeat once per child; the count must match –child-amount. Option, optional.

--llm

Propose an evidence-driven N-way split with the given LLM provider. Option, optional.

--apply

Persist the proposed –llm split (requires –yes); without it the proposal is previewed only. Option, optional.

--read-evidence

Read the transaction’s attached invoice on-host and feed it to the –llm split proposer. Option, optional.

--vision-model

Override the local Ollama vision model for an image/scanned-invoice read (e.g. qwen2.5vl:7b); defaults to the configured model. Option, optional.

--reason

Reason recorded in the bucket-event payload and lifecycle history Option, optional.

--yes

Confirm the split (transitions the parent to SPLIT and persists N child transactions) Option, optional.

--actor

Operator name recorded on the LEDGER_TRANSACTION_SPLIT event Option, optional.

aeat app ledger stash

Stash one ledger transaction in the active profile

Parameters

transaction_id

Ledger transaction id to stash Argument, required.

--reason

Reason recorded in lifecycle history Option, optional.

--yes

Confirm stashing the ledger transaction Option, optional.

--actor

Operator name recorded on the bucket event Option, optional.

aeat app ledger status

Summarize ledger state and calculation readiness for the active profile

Parameters

--period

Filing period as an AEAT token: 1T-4T (quarters), 0A (annual), 01-12 (months). Combine with –year to choose the year. Option, optional.

--year

Filing year for –period (e.g. 2024). Option, optional.

aeat app ledger track

Show the event lineage for one ledger transaction

Parameters

transaction_id

Ledger transaction id to inspect Argument, required.

aeat app ledger update

Update one ledger transaction with full-replace field semantics

Parameters

transaction_id

Ledger transaction id (or unambiguous hex prefix) to update Argument, required.

--date

New booked date (YYYY-MM-DD) Option, optional.

--value-date

New value date (YYYY-MM-DD) Option, optional.

--amount

New non-negative amount magnitude (full replace) Option, optional.

--direction

New transaction direction Option, optional.

--currency

New three-letter ISO 4217 currency code Option, optional.

--counterparty

New counterparty descriptor Option, optional.

--description

New narrative Option, optional.

--taxable-base

New IVA-exclusive base amount Option, optional.

--iva-rate

New IVA rate as a decimal fraction Option, optional.

--iva-amount

New IVA amount Option, optional.

--irpf-category

New IRPF-specific category key Option, optional.

--notes

New operator notes Option, optional.

--group

Assign an organisational group label (pass an empty string to clear). Option, optional.

--actor

Operator name recorded on the bucket event Option, optional.

aeat app ledger view

View one ledger transaction in the active profile

Parameters

transaction_id

Ledger transaction id (or unambiguous hex prefix) Argument, required.