Add perf testing aliases, knowledgebase sync, and ignore .claude dir

- Add yalp:perf and yalp:perf:stop aliases for YALP Core perf testing
- Add sync-knowledgebases function and kb-sync alias
- Add .claude/ to .gitignore
This commit is contained in:
Eric Wagoner
2026-03-24 09:21:11 -04:00
parent b40b7ffbc3
commit cc7b21b1f3
2 changed files with 22 additions and 0 deletions
+1
View File
@@ -1,2 +1,3 @@
# Local Natera config with account IDs, IPs, and internal paths (never commit) # Local Natera config with account IDs, IPs, and internal paths (never commit)
zshrc-natera.private zshrc-natera.private
.claude/
+21
View File
@@ -37,6 +37,27 @@ alias yalp:api='core && make local_run_api'
alias yalp:psql='core && docker exec -it yalp-core-postgres psql -U postgres -d yalp_core_db' alias yalp:psql='core && docker exec -it yalp-core-postgres psql -U postgres -d yalp_core_db'
alias yalp:start='core && make local_db_start && make local_run_api' alias yalp:start='core && make local_db_start && make local_run_api'
# YALP Core perf testing — close all boring tunnels, kill stale API, start perf DB + API (backgrounded)
alias yalp:perf='core && boring list 2>/dev/null | tail -n +2 | awk "{print \$2}" | while read -r t; do boring close "$t" 2>/dev/null; done; lsof -ti :9258 | xargs kill 2>/dev/null; make local_container_db && make local_perf_db_start && make local_perf_run_api &>/dev/null & echo "YALP Core perf API starting on :9258 (pid $!)"'
alias yalp:perf:stop='lsof -ti :9258 | xargs kill 2>/dev/null && echo "YALP Core perf API stopped" || echo "No process on :9258"'
# Sync knowledgebase docs from all ~/work projects into ~/work/knowledgebases
sync-knowledgebases() {
local src_base="$HOME/work"
local dest_base="$HOME/work/knowledgebases"
mkdir -p "$dest_base"
for dir in "$src_base"/*/docs/knowledgebase; do
[[ -d "$dir" ]] || continue
local project="${dir%/docs/knowledgebase}"
project="${project##*/}"
echo "Syncing $project..."
rm -rf "$dest_base/$project"
cp -R "$dir" "$dest_base/$project"
done
echo "Done."
}
alias kb-sync='sync-knowledgebases'
# Natera repos use master as primary; rewrite "git switch main" to "git switch master" # Natera repos use master as primary; rewrite "git switch main" to "git switch master"
git() { git() {
if [[ "$1" == "switch" && "${2:-}" == "main" ]]; then if [[ "$1" == "switch" && "${2:-}" == "main" ]]; then