@nestica/cli
v0.10.0
Published
Command-line client for the Nestica REST API
Maintainers
Readme
nestica
Command-line client for the Nestica REST API: full CRUD over profiles,
accounts, contacts, transactions and yields, plus session
management (login, logout, whoami, set-profile).
Install
npm install -g @nestica/cli
yarn global add @nestica/cli # for yarn users
pnpm add -g @nestica/cli # for pnpm usersZero runtime dependencies — everything is bundled into the nestica
binary. Requires Node.js >= 22.12. The CLI talks to the deployed API
by default.
Sessions
nestica login --email [email protected] # prompts for the password
nestica login --google # in the browser (uses the built-in OAuth client)
nestica whoami
nestica set-profile
nestica logoutThe session (connection settings, Firebase tokens, default profile)
lives in one JSON file with owner-only permissions:
${XDG_CONFIG_HOME:-~/.config}/nestica/config.json.
set-profile lists the profiles and asks which one to make the
default; nestica set-profile <uuid> stores a specific one and
--clear removes it. Without a stored default the API uses the user's
default profile — the first one created, created automatically on the
first scoped request if none exists. logout deletes the session
file; running login while already signed in just reports the current
session — logout first to switch accounts.
Commands
nestica <resource> list [--page <n>] [--page-size <n>] [--profile <uuid>]
nestica <resource> get <id>
nestica <resource> create [field flags] [--data <json|->]
nestica <resource> update <id> [field flags] [--data <json|->]
nestica <resource> delete <id><resource> is profiles | accounts | contacts | transactions |
yields. Scoped resources send the stored default profile (or an
explicit --profile) as the profileId query parameter; with neither
set the parameter is omitted and the API selects (or creates) the
default profile. transactions
list also takes --type expense|income.
Global flags: --profile, -F/--format pretty|json|table (default
pretty), --no-color (or NO_COLOR; color is also off when stdout
is not a TTY).
Field flags
Create/update bodies come from typed flags — identical rules to the
API, validated locally before the request is sent — plus --data (or
--json) to merge a raw JSON body over them (- reads stdin):
nestica profiles create --name Gary --country CO --timezone America/Bogota \
--currency COP --currency USD --default-currency COP
nestica accounts create --name Bancolombia --label bank
nestica transactions create --type expense --amount 42.5 --currency COP \
--date 2026-08-22T12:00:00Z --status settled --label groceries \
--foreign-amount '{"amount": 10, "currency": "USD"}'
nestica transactions update <id> --amount 50See nestica <resource> create --help for every flag; --label,
--currency (profiles) and other list flags are repeatable
(--label a --label b).
Output
--format pretty(default): colorized, indented JSON.--format json: compact single-line JSON for shell pipelines (nestica accounts list --format json | jq -r '.data[0].id').--format table: column table for lists, key/value listing for single records; the list summary goes to stderr so stdout stays parseable.
Delete confirmations also go to stderr; with --format json deletes
print nothing at all.
Exit codes
0 success · 1 API/runtime errors · 2 usage errors.
