8000 GitHub - jmcampanini/xero-cli · GitHub
[go: up one dir, main page]

Skip to content
jmcampaniniPublic

About

No description or website provided.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

xero

xero reads organisation settings, accounts, tracking categories, financial reports, bank transactions, bank transfers, manual journals, contacts, and document attachments from the Xero Accounting API. Each Custom Connection is bound to a verified organisation ID, secrets stay in protected files, tokens are never stored, and the CLI never prompts. The api command also accepts explicit write requests.

Install

Versioned releases provide prebuilt binaries for Linux and macOS on amd64 and arm64.

Install and upgrade with mise:

mise use -g github:jmcampanini/xero-cli
mise upgrade github:jmcampanini/xero-cli

For release archives, download your platform's archive and use tar to install or upgrade into ~/.local/bin on your PATH, replacing VERSION, OS (linux or darwin), and ARCH (amd64 or arm64):

tar -xzf xero_VERSION_OS_ARCH.tar.gz
if [ "$(uname -s)" = Darwin ] && xattr -p com.apple.quarantine xero >/dev/null 2>&1; then
  xattr -d com.apple.quarantine xero
fi
install -d ~/.local/bin
install ./xero ~/.local/bin/xero

To build from source, use Git and mise to clone and build the repository, then install into ~/.local/bin, which must be on your PATH:

git clone https://github.com/jmcampanini/xero-cli
cd xero-cli
mise trust
mise install
mise run build
install -d ~/.local/bin
install ./build/xero ~/.local/bin/xero

Representative commands

Start with xero orgs and xero auth status to confirm which organisation is selected and that its credentials work, then read that organisation's accounts, reports, and listings.

Command Result
xero orgs Configured organisations and the current selection
xero auth status Credential, identity, scope, and access diagnostics
xero account show 200 --date 2025-12-31 Account details for code 200 and its trial-balance amount
xero account transactions 429 --month 2025-12 --tracking Region=North --csv Matching cash movements as CSV, without account balances
xero report profit-and-loss --month 2025-12 --basis cash Native cash-basis profit and loss
xero report trial-balance --date 2025-12-31 --json Debit and credit columns as decimal strings
xero bank-transactions list --account 'Example Bank' --month 2025-12 Saved transactions for the bank account and month, excluding deleted records
xero contacts list --search Example Contact names, roles, statuses, and IDs
xero contacts list --jsonl --output-file contacts.jsonl Save native contact records without replacing an existing file
xero api Organisation The raw Accounting API response

xero --help, each command's --help, and xero help exit-codes are the canonical reference.

Configuration

The CLI discovers $XDG_CONFIG_HOME/xero/config.toml, falling back to ~/.config/xero/config.toml. See xero config --help for the TOML shape, precedence, path resolution, and identity discovery.

default_org = "acme"

[orgs.acme]
client_id = "00000000000000000000000000000000"
secret_file = "~/.config/xero/secrets/acme"
organisation_id = "00000000-0000-0000-0000-000000000000"

About

No description or website provided.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0