Skip to content

Instantly share code, notes, and snippets.

@wilsonsilva
Created March 30, 2023 13:04
Show Gist options
  • Select an option

  • Save wilsonsilva/789eb82d3e778fb4c52faa2b769e6cc9 to your computer and use it in GitHub Desktop.

Select an option

Save wilsonsilva/789eb82d3e778fb4c52faa2b769e6cc9 to your computer and use it in GitHub Desktop.
Describe code to ChatGPT
#!/bin/bash
# This script will describe the code of a Flutter app
# Get the path to the Flutter app
app_path=$(pwd)/lib
# Navigate to the app directory
cd $app_path
# Describe the app code
find . -name '*.dart' | while read filename; do
echo "---------------------------------------------------"
echo "File: $filename"
echo "---------------------------------------------------"
cat $filename
done | (echo "I am building a Flutter app. I'm going to describe the code inside the lib folder. If you understand, say just 'OK'." && cat) | pbcopy
# Done
echo "Code description complete. Output has been copied to clipboard."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment