Skip to content

Instantly share code, notes, and snippets.

Executes a given bash command with optional timeout. Working directory persists between commands; shell state (everything else) does not. The shell environment is initialized from the user's profile (bash or zsh).
IMPORTANT: This tool is for terminal operations like git, npm, docker, etc. DO NOT use it for file operations (reading, writing, editing, searching, finding files) - use the specialized tools for this instead.
Before executing the command, please follow these steps:
Directory Verification:
If the command will create new directories or files, first use ls to verify the parent directory exists and is the correct location
For example, before running "mkdir foo/bar", first use ls foo to check that "foo" exists and is the intended parent directory
@sullyo
sullyo / collect_code.sh
Created September 22, 2024 18:49
Clones a github repo and puts all the code into a single text file perfect for LLMs
#!/bin/bash
# Check if a GitHub URL is provided as an argument
if [ -z "$1" ]; then
echo "Usage: $0 <github_url>"
exit 1
fi
# Store the GitHub URL
GIT_URL="$1"