> For the complete documentation index, see [llms.txt](https://docs.kick.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kick.co/ai/cli/cli-use-case-library/daily-ops.md).

# Daily Ops

Kick CLI scripts for everyday review: export uncategorized transactions, send a daily alert, and find transactions missing a memo or duplicated.

Use these scripts to find transactions that need attention before they pile up. All of them only read from Kick; the alert also posts to Slack.

Each script includes `find_all_transactions`, which reads every page of matching transactions 100 rows at a time, so counts and exports cover the whole date range.

→ [Page through results](https://docs.kick.co/ai/cli/cli-reference.md#page-through-results)

<details>

<summary><strong>Export uncategorized transactions for review</strong> (read)</summary>

To pull transactions that still need a category before you close a period, fetch JSON for the date range and filter client-side. The CLI does not support a `category=null` filter flag. A transaction without a category comes back with `"category": "Uncategorized"`.

**The Script**

```bash
#!/bin/bash
# export-uncategorized.sh
set -euo pipefail

WORKSPACE_ID="<workspace-id>"
SINCE="2026-01-01"
UNTIL="2026-01-31"
OUTPUT_FILE="uncategorized-$(date +%Y%m%d).json"

find_all_transactions() {
  local page=1 rows all="[]"
  while true; do
    rows=$(kick --workspace "$WORKSPACE_ID" transactions find "$@" \
      --limit 100 --cursor "$page" --output json) || return 1
    all=$(printf '%s\n%s\n' "$all" "$rows" | jq -s 'add')
    if [ "$(printf '%s' "$rows" | jq 'length')" -lt 100 ]; then
      break
    fi
    page=$((page + 1))
  done
  printf '%s\n' "$all"
}

find_all_transactions \
  --since "$SINCE" \
  --until "$UNTIL" \
  --fields id,date,amount,counterparty,category,bank_description \
  | jq '[.[] | select(.category == null or .category == "Uncategorized")]' \
  > "$OUTPUT_FILE"

count=$(jq 'length' "$OUTPUT_FILE")

echo "Exported $count uncategorized transactions to $OUTPUT_FILE"

if [ "$count" -gt 0 ]; then
  echo "Review and update categories in Kick before closing the period"
fi
```

**How to Customize**

* Pipe to CSV with `jq -r` if your team reviews in a spreadsheet
* Tighten the filter to large amounts: `select((.category == null or .category == "Uncategorized") and (.amount | fabs) > 1000)`

**What It Outputs**

* JSON array of uncategorized transactions
* Console message with the count

</details>

<details>

<summary><strong>Daily uncategorized transaction alert</strong> (read)</summary>

To get a Slack message when transactions still lack a category, count uncategorized rows and post a summary.

**The Script**

```bash
#!/bin/bash
# daily-uncategorized-alert.sh
set -euo pipefail

WORKSPACE_ID="<workspace-id>"
WEBHOOK_URL="https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK"
SINCE="$(date -v-30d +%Y-%m-%d 2>/dev/null || date -d '30 days ago' +%Y-%m-%d)"

find_all_transactions() {
  local page=1 rows all="[]"
  while true; do
    rows=$(kick --workspace "$WORKSPACE_ID" transactions find "$@" \
      --limit 100 --cursor "$page" --output json) || return 1
    all=$(printf '%s\n%s\n' "$all" "$rows" | jq -s 'add')
    if [ "$(printf '%s' "$rows" | jq 'length')" -lt 100 ]; then
      break
    fi
    page=$((page + 1))
  done
  printf '%s\n' "$all"
}

rows=$(find_all_transactions \
  --since "$SINCE" \
  --fields id,date,category \
  | jq '[.[] | select(.category == null or .category == "Uncategorized")]')

count=$(echo "$rows" | jq 'length')

if [ "$count" -gt 0 ]; then
  oldest=$(echo "$rows" | jq -r 'sort_by(.date) | .[0].date')
  message="*$count uncategorized transactions in the last 30 days*\nOldest: $oldest\n<https://use.kick.co/transactions?workspaceId=$WORKSPACE_ID|Review in Kick>"

  curl -X POST "$WEBHOOK_URL" \
    -H 'Content-Type: application/json' \
    -d "{\"text\":\"$message\"}"

  echo "Alert sent: $count uncategorized transactions"
else
  echo "No uncategorized transactions in range"
fi
```

**How to Customize**

* Change `SINCE` to match your firm's review window
* Add a threshold: only alert when `count` exceeds 10
* Schedule with cron to run each morning

**What It Outputs**

```
Alert sent: 23 uncategorized transactions
```

</details>

<details>

<summary><strong>Find transactions missing a memo</strong> (read)</summary>

To export transactions that still need a memo before close, filter JSON output client-side.

**The Script**

```bash
#!/bin/bash
# find-missing-memos.sh
set -euo pipefail

WORKSPACE_ID="<workspace-id>"
SINCE="2026-01-01"
UNTIL="2026-01-31"
OUTPUT_FILE="missing-memos.csv"

find_all_transactions() {
  local page=1 rows all="[]"
  while true; do
    rows=$(kick --workspace "$WORKSPACE_ID" transactions find "$@" \
      --limit 100 --cursor "$page" --output json) || return 1
    all=$(printf '%s\n%s\n' "$all" "$rows" | jq -s 'add')
    if [ "$(printf '%s' "$rows" | jq 'length')" -lt 100 ]; then
      break
    fi
    page=$((page + 1))
  done
  printf '%s\n' "$all"
}

echo "date,amount,counterparty,id" > "$OUTPUT_FILE"

find_all_transactions \
  --since "$SINCE" \
  --until "$UNTIL" \
  --fields id,date,amount,counterparty,memo | \
jq -r '.[] | select(.memo == null or .memo == "") | [.date, .amount, .counterparty, .id] | @csv' >> "$OUTPUT_FILE"

count=$(tail -n +2 "$OUTPUT_FILE" | wc -l | tr -d ' ')

echo "Found $count transactions without a memo"
echo "Exported to $OUTPUT_FILE"
```

**How to Customize**

* Also flag uncategorized transactions: add `category` to `--fields`, then use `select(.memo == null or .memo == "" or .category == "Uncategorized")`

**What It Outputs**

```
Found 15 transactions without a memo
Exported to missing-memos.csv
```

</details>

<details>

<summary><strong>Find duplicate transactions</strong> (read)</summary>

To flag likely duplicates in a period, group transactions by date, amount, and counterparty.

**The Script**

```bash
#!/bin/bash
# find-duplicates.sh
set -euo pipefail

WORKSPACE_ID="<workspace-id>"
SINCE="2026-01-01"
UNTIL="2026-01-31"

find_all_transactions() {
  local page=1 rows all="[]"
  while true; do
    rows=$(kick --workspace "$WORKSPACE_ID" transactions find "$@" \
      --limit 100 --cursor "$page" --output json) || return 1
    all=$(printf '%s\n%s\n' "$all" "$rows" | jq -s 'add')
    if [ "$(printf '%s' "$rows" | jq 'length')" -lt 100 ]; then
      break
    fi
    page=$((page + 1))
  done
  printf '%s\n' "$all"
}

echo "Finding potential duplicates..."

find_all_transactions \
  --since "$SINCE" \
  --until "$UNTIL" \
  --fields id,date,amount,counterparty | \
jq -r '
  group_by([.date, .amount, .counterparty]) |
  map(select(length > 1)) |
  .[] |
  "Potential duplicates:\n" +
  (map("  ID: \(.id) | \(.date) | \(.amount) | \(.counterparty)") | join("\n")) +
  "\n"
'
```

**How to Customize**

* For stricter matching, add `bank_description` to `--fields` and to the `group_by` key
* Export matches to CSV for your reconciliation worksheet

**What It Outputs**

```
Potential duplicates:
  ID: 123 | 2026-01-15 | -500.00 | Amazon
  ID: 456 | 2026-01-15 | -500.00 | Amazon
```

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kick.co/ai/cli/cli-use-case-library/daily-ops.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
