Data Analysis
Top Expense Categories This Quarter
The Script
#!/bin/bash
# top-expense-categories.sh
QUARTER_START="2026-01-01"
QUARTER_END="2026-03-31"
echo "Top Expense Categories: $QUARTER_START to $QUARTER_END"
echo ""
kick transactions list \
--from="$QUARTER_START" \
--to="$QUARTER_END" \
--filter="amount<0" \
--format=json | \
jq -r '
group_by(.category) |
map({
category: .[0].category // "Uncategorized",
total: (map(.amount) | add),
count: length
}) |
sort_by(.total) |
.[] |
"\(.category): $\(.total | fabs) (\(.count) transactions)"
'How to Customize
Change to revenue categories
Group by counterparty instead
Add percentage of total
What It Outputs
Cloud Infrastructure: $12,500.00 (36 transactions)
Payroll: $75,000.00 (3 transactions)Cash Flow Trend Analysis
The Script
#!/bin/bash
# cash-flow-trends.sh
START_DATE="2026-01-01"
END_DATE="2026-03-31"
echo "Week Starting,Inflows,Outflows,Net"
kick transactions list \
--from="$START_DATE" \
--to="$END_DATE" \
--format=json | \
jq -r '
group_by(.date[0:10] | strptime("%Y-%m-%d") | strftime("%Y-W%U")) |
map({
week: (.[0].date[0:10] | strptime("%Y-%m-%d") | strftime("%Y-%m-%d")),
inflows: (map(select(.amount > 0) | .amount) | add // 0),
outflows: (map(select(.amount < 0) | .amount | fabs) | add // 0)
}) |
map("\(.week),\(.inflows),\(.outflows),\(.inflows - .outflows)") |
.[]
'How to Customize
Change to monthly instead of weekly
Add rolling averages
Export to CSV for charting
What It Outputs
Week Starting,Inflows,Outflows,Net
2026-01-06,25000.00,18500.00,6500.00Last updated
Was this helpful?
