Skip to content

Instantly share code, notes, and snippets.

@llk23r
llk23r / treepwd_content
Created February 12, 2025 16:55
Turn your codebase into an llm friendly context. Put this in your .zshrc.
treepwd_content() {
local current_dir=$(pwd)
local output_file="codebase.txt"
echo "Current directory: $current_dir" > "$output_file"
echo "" >> "$output_file"
echo "Directory Structure:" >> "$output_file"
# Updated exclusion pattern to properly handle target directory and its contents
find . -type d \( -name node_modules -o -name venv -o -name .git -o -name .vscode -o -name .next -o -name .mypy_cache -o -name .venv -o -name .DS_Store -o -path '*/target/*' -o -name build -o -name src-tauri/target \) -prune -o -print | sed -e 's;[^/]*/;| ;g;s;| \([^|]\)/;\1;g' >> "$output_file"
@llk23r
llk23r / .iex.exs
Created July 10, 2025 05:15
Ampcode integration in Elixir Livebook
# ~/.iex.exs
# Idiomatic Amp CLI integration for IEx
defmodule AmpIEx do
@moduledoc """
Elixir integration for Amp CLI with proper error handling and functional design.
"""
# Module attributes for constants
@amp_executable "amp"