# Monthly Reporting

<details>

<summary><strong>Generate P&#x26;L Reports for All Entities</strong></summary>

**The Script**

bash

```bash
#!/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 `MONTH` to the period you want to report on
* Change `--format=pdf` to `--format=json` or `--format=csv`
* Add 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`

</details>

<details>

<summary><strong>Email Reports to Clients Automatically</strong></summary>

**The Script**

bash

```bash
#!/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 `mail` command with your email service
* Adjust 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

</details>

<details>

<summary><strong>Compare Month-Over-Month Revenue</strong></summary>

**The Script**

bash

```bash
#!/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%"
done
```

**How 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%
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kick.co/ai/kick-cli/cli-use-case-library/monthly-reporting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
