1.3 KiB
1.3 KiB
description
| description |
|---|
| Reset all spending tracking data |
Reset Spending Data
Reset all spending tracking data (daily, weekly, and hourly). This operation is destructive and cannot be undone.
Arguments
Input: $ARGUMENTS
Instructions
-
Parse arguments:
- Check if
--confirmor-fflag is present in$ARGUMENTS
- Check if
-
Ask for confirmation (UNLESS
--confirmor-fflag is present):- Warn user: "⚠️ This will delete ALL spending tracking data (daily, weekly, and hourly). This cannot be undone."
- Show affected files:
${CLAUDE_PLUGIN_ROOT}/spending_data/daily.json${CLAUDE_PLUGIN_ROOT}/spending_data/weekly.json${CLAUDE_PLUGIN_ROOT}/spending_data/hourly.json${CLAUDE_PLUGIN_ROOT}/spending_data/session_state.json
- Ask: "Are you sure you want to proceed? (yes/no)"
- If user responds "no" or anything other than "yes", abort
- If user responds "yes", proceed
-
Execute reset:
- Run:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/track_spending.py --data-dir ${CLAUDE_PLUGIN_ROOT}/spending_data reset --confirm - Display success message
- Run:
Example Usage
/spending-reset
/spending-reset --confirm
/spending-reset -f
Notes
- ALWAYS ask for confirmation unless
--confirmor-fis provided - This operation is irreversible
- Session state will also be cleared