Files
fn_registry/bash/functions/infra/discover_git_repos.md
T
egutierrez fc4180cbb3 chore: auto-commit (129 archivos)
- .claude/agents/fn-analizador/SKILL.md
- .claude/agents/fn-constructor/SKILL.md
- .claude/agents/fn-executor/SKILL.md
- .claude/agents/fn-mejorador/SKILL.md
- .claude/agents/fn-orquestador/SKILL.md
- .claude/agents/fn-recopilador/SKILL.md
- .claude/commands/app.md
- .claude/commands/compile.md
- .claude/commands/cpp-app.md
- .claude/commands/create_functions.md
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 22:23:12 +02:00

1.5 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports params output tested tests test_file_path file_path
discover_git_repos function bash infra 1.0.0 impure discover_git_repos(root_dir: string) -> stdout: newline-separated paths Encuentra todos los repos git dentro de root_dir. Devuelve paths absolutos (sin /.git) en stdout, uno por linea, ordenados. Incluye el propio root_dir si tiene .git. Excluye node_modules, .venv, cpp/vendor, cpp/build, sources, temp, subrepos e interior de .git.
git
repo
discover
find
infra
false error_go_core
name desc
root_dir directorio raiz a escanear (absoluto o relativo); default '.'
paths absolutos newline-separated por stdout, uno por linea, ordenados alfabeticamente; el propio root_dir aparece primero si tiene .git false
bash/functions/infra/discover_git_repos.sh

Ejemplo

source bash/functions/infra/discover_git_repos.sh

# Listar todos los repos bajo fn_registry
discover_git_repos $HOME/fn_registry

# Contar repos
discover_git_repos $HOME/fn_registry | wc -l

# Iterar
while IFS= read -r repo; do
    echo "Repo: $repo"
done < <(discover_git_repos $HOME/fn_registry)

Notas

Usa find con -mindepth 2 para subdirectorios (el root se comprueba por separado). Los resultados se emiten ordenados alfabeticamente. La funcion es impura porque lee el sistema de archivos. Sale con exit code 1 si root_dir no existe.