Last active
March 13, 2025 08:02
-
-
Save kleneway/5860bb574630313826ca34d1af608b0d to your computer and use it in GitHub Desktop.
script to add today's date to your .cursor-updates file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
Where is this file? I cannot find it anywhere.
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
For macOS, to set this up to run every day at 1am (or when you next turn on your machine) you need a plist file. Ask o1 to create it or customize this:
Then run a command that looks like this:
You might need to set the shell script as executable using chmod. For PC / Linux users, ask o1 to generate the step by step instructions