Monthly Reporting
Generate P&L Reports for All Entities
The Script
#!/bin/bash
# monthly-pl-reports.sh
MONTH="2026-01"
OUTPUT_DIR="./reports/$MONTH"
mkdir -p "$OUTPUT_DIR"
entities=$(kick entities list --format=json | jq -r '.[].name')
for entity in $entities; do
echo "Generating P&L for $entity..."
kick reports pl \
--entity="$entity" \
--period="$MONTH" \
--format=pdf \
> "$OUTPUT_DIR/pl-${entity// /-}-${MONTH}.pdf"
echo "✓ Saved to $OUTPUT_DIR/pl-${entity// /-}-${MONTH}.pdf"
done
echo "All reports generated in $OUTPUT_DIR"How to Customize
Change
MONTHto the period you want to report onChange
--format=pdfto--format=jsonor--format=csvAdd filtering:
kick entities list --filter="status=active"
What It Outputs
One PDF file per entity in
./reports/YYYY-MM/Filename format:
pl-Entity-Name-2026-01.pdf
Email Reports to Clients Automatically
The Script
#!/bin/bash
# email-monthly-reports.sh
MONTH="2026-01"
REPORTS_DIR="./reports/$MONTH"
CONTACTS_FILE="./client-contacts.csv"
while IFS=, read -r entity email contact; do
report_file="$REPORTS_DIR/pl-${entity// /-}-${MONTH}.pdf"
if [ -f "$report_file" ]; then
echo "Emailing report for $entity to $email..."
echo "Hi $contact, please find attached your P&L report for $MONTH." | \
mail -s "P&L Report - $entity - $MONTH" \
-a "$report_file" \
"$email"
echo "✓ Sent to $email"
else
echo "⚠️ Report not found for $entity"
fi
done < "$CONTACTS_FILE"How to Customize
Replace
mailcommand with your email serviceAdjust email subject and body text
Add CC/BCC recipients
What It Outputs
Sends one email per entity with PDF attached
Console output shows which emails were sent
Compare Month-Over-Month Revenue
The Script
#!/bin/bash
# mom-revenue-comparison.sh
CURRENT_MONTH="2026-02"
PREVIOUS_MONTH="2026-01"
echo "Entity,Current Month Revenue,Previous Month Revenue,Change %"
for entity in $(kick entities list --format=json | jq -r '.[].name'); do
current=$(kick reports pl \
--entity="$entity" \
--period="$CURRENT_MONTH" \
--format=json | jq -r '.total_revenue')
previous=$(kick reports pl \
--entity="$entity" \
--period="$PREVIOUS_MONTH" \
--format=json | jq -r '.total_revenue')
if [ "$previous" != "0" ]; then
change=$(echo "scale=2; (($current - $previous) / $previous) * 100" | bc)
else
change="N/A"
fi
echo "$entity,$current,$previous,$change%"
doneHow to Customize
Change comparison periods
Add thresholds to flag significant changes
Compare expenses instead of revenue
What It Outputs
Entity,Current Month Revenue,Previous Month Revenue,Change %
ACME Corp,125000.00,110000.00,13.64%Last updated
Was this helpful?
