Files
Amr Gharbeia c9cc874e53 tools: add repl-block, check-tangle; move existing tools into memex
New tools (projects/<tool>/ — standalone, git-committed):
- repl-block: extract and pipe lisp blocks from org files to the REPL
- check-tangle: tangle + compile in one step, reports errors

Existing tools moved from ~/.opencode/bin/ into memex (survives reinstalls):
- repl, tangle, org-eval, verify-repl

AGENTS.md updated:
- Tool reference table with all 7 tools
- Package reference table for passepartout and cl-tty
- Updated tangle command to use project-local tools

.opencode/commands/ added: check-parens, repl-block, check-tangle commands
2026-05-13 12:54:38 -04:00

28 lines
533 B
Bash
Executable File

#!/usr/bin/env bash
# Tangle an org file using Emacs batch mode
# Usage: tangle <org-file>
set -e
if [ $# -ne 1 ]; then
echo "Usage: tangle <org-file>"
echo " Tangles all src blocks with :tangle directives to their targets"
exit 1
fi
ORG_FILE="$1"
if [ ! -f "$ORG_FILE" ]; then
echo "Error: File not found: $ORG_FILE"
exit 1
fi
echo "Tangling: $ORG_FILE"
emacs --batch \
--load org \
--eval "(setq org-confirm-babel-evaluate nil)" \
--eval "(org-babel-tangle-file \"$ORG_FILE\")"
echo "Done."