Skip to content

Instantly share code, notes, and snippets.

@kleneway
Last active March 13, 2025 08:02
Show Gist options
  • Save kleneway/5860bb574630313826ca34d1af608b0d to your computer and use it in GitHub Desktop.
Save kleneway/5860bb574630313826ca34d1af608b0d to your computer and use it in GitHub Desktop.
script to add today's date to your .cursor-updates file
#!/bin/bash
# Path to the .cursor-updates file (update this with your own .cursor-updates file)
CURSOR_FILE="/full/path/to/your/.cursor-updates"
# Get today's date in YYYY-MM-DD format
TODAY=$(date +%Y-%m-%d)
# Create a temporary file
TMP_FILE=$(mktemp)
# Write the new date line
echo "## ${TODAY}" > "$TMP_FILE"
# Append the rest of the file starting from line 4 (skipping the header and old date)
tail -n +4 "$CURSOR_FILE" >> "$TMP_FILE"
# Add the header back with today's date
(
echo "# Cursor Updates"
echo ""
echo "This file tracks significant changes made to the codebase through Cursor agent interactions. Today's date is: ${TODAY}"
cat "$TMP_FILE"
) > "$CURSOR_FILE"
# Clean up
rm "$TMP_FILE"
@damianesteban
Copy link

Where is this file? I cannot find it anywhere.

@mathivhahy
Copy link

Where is this file? I cannot find it anywhere.

I think you have to create it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment