Pp zoho expense

From mvanhorn/printing-press-library · View interactive version

Pp zoho expense is an AI agent skill from the GitHub repository mvanhorn/printing-press-library. Upload receipts, auto-tag expenses from learned merchant memory Trigger phrases: `ingest invoices into zoho`, `upload my expenses to zoho`, `tag this zoho expense`, `close my zoho expenses for the month`, `submit my zoho expense report`, `use zoho-expense-pp-cli`, `run zoho expense`.

How to use this skill

Skill file

<!-- GENERATED FILE — DO NOT EDIT.

This file is a verbatim mirror of library/productivity/zoho-expense/SKILL.md,

regenerated post-merge by tools/generate-skills/. Hand-edits here are

silently overwritten on the next regen. Edit the library/ source instead.

See the repository agent guide, section "Generated artifacts: registry.json, cli-skills/". -->

Zoho Expense — Printing Press CLI

Prerequisites: Install the CLI

This skill drives the zoho-expense-pp-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:

  1. Install via the Printing Press installer. It defaults binaries to $HOME/.local/bin on macOS/Linux and %LOCALAPPDATA%\Programs\PrintingPress\bin on Windows:

```bash

npx -y @mvanhorn/printing-press-library install zoho-expense --cli-only

```

  1. Verify: zoho-expense-pp-cli --version
  2. Ensure the reported install directory is on $PATH for the agent/runtime that will invoke this skill.

If the npx install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.6 or newer):

go install github.com/mvanhorn/printing-press-library/library/productivity/zoho-expense/cmd/zoho-expense-pp-cli@latest

If --version reports "command not found" after install, the runtime cannot see the binary directory on $PATH. Do not proceed with skill commands until verification succeeds.

When to Use This CLI

Reach for this CLI when an AI agent needs to ingest invoices from email (or any source) and post them to Zoho Expense on a recurring cadence. It's also the right tool for monthly close automation — bundling expenses into a report and submitting in one command — and for India-specific GST splitting that the Zoho web UI doesn't expose. Not the right tool for occasional one-off expense editing through the UI (Zoho's web app is fine for that).

Unique Capabilities

These capabilities aren't available in any other tool for this API.

Hermes-first ingestion

_Agents that ingest invoices on a cadence need one command that handles dedup, autoscan, and tagging — not three._

```bash

zoho-expense-pp-cli invoice ingest ~/Downloads/october-invoices --auto-tag --agent

```

_Idempotent receipt upload — safe to re-run on a folder agents have already processed._

```bash

zoho-expense-pp-cli receipt upload ~/Downloads/uber-receipt.pdf --auto-tag

```

_One command turns 30 untagged scanned receipts into 30 tagged ones, using the user's own historical mapping._

```bash

zoho-expense-pp-cli expense-untagged --auto-fix --agent

```

Local intelligence

_Solves Zoho's 'first-time merchant is always uncategorized' limitation with zero API calls._

```bash

zoho-expense-pp-cli merchant list --agent --select merchant_name,category_name,seen_count

```

_Lets the user (or agent) explicitly seed the auto-tag map without waiting for sync history to learn it._

```bash

zoho-expense-pp-cli merchant map 'AWS' --category Software --project Engineering

```

Monthly automation

_The natural end of every monthly agent workflow — turn raw expenses into a submitted report without leaving the terminal._

```bash

zoho-expense-pp-cli close --month 2026-10 --auto-submit --agent

```

India tax workflow

_Turns a monthly export into something a CA can directly file, without the user re-doing the math by hand._

```bash

zoho-expense-pp-cli gst-split exp_1234567890 --emit-csv

```

Command Reference

currencies — Currencies and exchange rates

customers — Customers (contacts) expenses can be billed to

expense_categories — Expense categories used to classify expenses

expense_reports — Expense reports — bundles of expenses submitted for approval and reimbursement

expenses — Expenses — the primary entity for an expense management CLI

organizations — Zoho Expense organizations you have access to

projects — Projects expenses can be associated with

receipts — Upload receipts for autoscan

reporting_tags — Reporting tags (custom tagging schema for expenses, e.g. cost center, billable, GST treatment)

taxes — Taxes (GST in India) applied to expenses

trips — Business trips that group related expenses

users — Manage users in the organization

Freshness Contract

This printed CLI owns bounded freshness only for registered store-backed read command paths. In --data-source auto mode, those paths check sync_state and may run a bounded refresh before reading local data. --data-source local never refreshes. --data-source live reads the API and does not mutate the local store. Set ZOHO_EXPENSE_NO_AUTO_REFRESH=1 to skip the freshness hook without changing source selection.

Covered paths:

When JSON output uses the generated provenance envelope, freshness metadata appears at meta.freshness. Treat it as current-cache freshness for the covered command path, not a guarantee of complete historical backfill or API-specific enrichment.

Finding the right command

When you know what you want to do but not which command does it, ask the CLI directly:

zoho-expense-pp-cli which "<capability in your own words>"

which resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code 0 means at least one match; exit code 2 means no confident match — fall back to --help or use a narrower query.

Hand-written Extensions

These commands are declared by the spec author and require separate hand-written wiring; the generator does not emit Cobra registration for them. They are listed here for discoverability and are intentionally outside ## Command Reference so the verify-skill unknown-command check does not treat them as generator-owned paths.

Recipes

Monthly Hermes flow

zoho-expense-pp-cli invoice ingest ~/Inbox/expenses --auto-tag --agent | tee /tmp/this-month.json && zoho-expense-pp-cli close --month $(date +%Y-%m) --auto-submit

Ingest every saved invoice with hash dedup + auto-tagging, then bundle the month and submit. The pattern Hermes runs end-of-month.

Audit untagged expenses

zoho-expense-pp-cli expense-untagged --agent --select expense_id,merchant_name,amount,expense_date | jq '.[] | select(.amount > 1000)'

Find untagged expenses over ₹1000 — the ones most worth manually tagging when auto-fix can't help.

Train the merchant memory

zoho-expense-pp-cli merchant list --agent --select merchant_name,category_name,seen_count | jq '.[] | select(.category_name == null)' | head -5

Find the top 5 merchants the local memory hasn't classified yet — feed them into merchant map to bootstrap the auto-tag map.

Search synced expenses

zoho-expense-pp-cli search 'AWS' --agent --select expense_date,amount,merchant_name,description

Full-text search across synced expenses — instant local query, no API call.

GST report for the CA

for id in $(zoho-expense-pp-cli expense list --month=2026-10 --json | jq -r '.[].expense_id'); do zoho-expense-pp-cli gst-split "$id" --emit-csv; done > october-gst.csv

Generate a CGST/SGST/IGST breakdown CSV for the month's expenses, ready to hand to a chartered accountant.

Auth Setup

Zoho Expense uses OAuth 2.0 with a self-client authorization-code flow. Create a self-client at https://api-console.zoho.in/, generate a 10-minute authorization code, then run zoho-expense-pp-cli auth login --client-id <id> --client-secret <secret>. The CLI exchanges the code for a long-lived refresh token (stored at ~/.config/zoho-expense-pp-cli/config.toml) and refreshes access tokens transparently. Tokens use the literal Zoho-oauthtoken Authorization prefix (not Bearer).

Run zoho-expense-pp-cli doctor to verify setup.

Agent Mode

Add --agent to any command. Expands to: --json --compact --no-input --no-color --yes.

```bash

zoho-expense-pp-cli currencies list --agent --select id,name,status

```

Response envelope

Commands that read from the local store or the API wrap output in a provenance envelope:

{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}

Parse .results for data and .meta.source to know whether it's live or local. A human-readable N results (live) summary is printed to stderr only when stdout is a terminal AND no machine-format flag (--json, --csv, --compact, --quiet, --plain, --select) is set — piped/agent consumers and explicit-format runs get pure JSON on stdout.

Agent Feedback

When you (or the agent) notice something off about this CLI, record it:

zoho-expense-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
zoho-expense-pp-cli feedback --stdin < notes.txt
zoho-expense-pp-cli feedback list --json --limit 10

Entries are stored locally at ~/.zoho-expense-pp-cli/feedback.jsonl. They are never POSTed unless ZOHO_EXPENSE_FEEDBACK_ENDPOINT is set AND either --send is passed or ZOHO_EXPENSE_FEEDBACK_AUTO_SEND=true. Default behavior is local-only.

Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.

Output Delivery

Every command accepts --deliver <sink>. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:

| Sink | Effect |

|------|--------|

| stdout | Default; write to stdout only |

| file:<path> | Atomically write output to <path> (tmp + rename) |

| webhook:<url> | POST the output body to the URL (application/json or application/x-ndjson when --compact) |

Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.

Named Profiles

A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.

zoho-expense-pp-cli profile save briefing --json
zoho-expense-pp-cli --profile briefing currencies list
zoho-expense-pp-cli profile list --json
zoho-expense-pp-cli profile show briefing
zoho-expense-pp-cli profile delete briefing --yes

Explicit flags always win over profile values; profile values win over defaults. agent-context lists all available profiles under available_profiles so introspecting agents discover them at runtime.

Exit Codes

| Code | Meaning |

|------|---------|

| 0 | Success |

| 2 | Usage error (wrong arguments) |

| 3 | Resource not found |

| 4 | Authentication required |

| 5 | API error (upstream issue) |

| 7 | Rate limited (wait and retry) |

| 10 | Config error |

Argument Parsing

Parse $ARGUMENTS:

  1. Empty, help, or --help → show zoho-expense-pp-cli --help output
  2. Starts with install → ends with mcp → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with --agent)

MCP Server Installation

  1. Install the MCP server:

```bash

go install github.com/mvanhorn/printing-press-library/library/productivity/zoho-expense/cmd/zoho-expense-pp-mcp@latest

```

  1. Register with Claude Code:

```bash

claude mcp add zoho-expense-pp-mcp -- zoho-expense-pp-mcp

```

  1. Verify: claude mcp list

Direct Use

  1. Check if installed: which zoho-expense-pp-cli

If not found, offer to install (see Prerequisites at the top of this skill).

  1. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  2. Execute with the --agent flag:

```bash

zoho-expense-pp-cli <command> [subcommand] [args] --agent

```

  1. If ambiguous, drill into subcommand help: zoho-expense-pp-cli <command> --help.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.