aboutsummaryrefslogtreecommitdiffstats
path: root/agents/dev/tools.sh
diff options
context:
space:
mode:
authorLeonard Kugis <leonard@kug.is>2026-04-09 19:22:02 +0200
committerLeonard Kugis <leonard@kug.is>2026-04-09 19:22:02 +0200
commit204d82d3d5b67c0b0aacf4193540e1c3c2eb95f1 (patch)
treee1ab833f80fe161887155ea802830263fb146ad0 /agents/dev/tools.sh
parent99d82aa5b73bb4f5a09f347860aa408dd2b5cc9e (diff)
downloadllm-functions-docker-204d82d3d5b67c0b0aacf4193540e1c3c2eb95f1.tar.gz
Introduced dev agent
Diffstat (limited to 'agents/dev/tools.sh')
-rwxr-xr-xagents/dev/tools.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/agents/dev/tools.sh b/agents/dev/tools.sh
new file mode 100755
index 0000000..5dc1519
--- /dev/null
+++ b/agents/dev/tools.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+set -e
+
+# @env LLM_OUTPUT=/dev/stdout The output path
+
+ROOT_DIR="${LLM_ROOT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}"
+
+# @cmd Create a new file at the specified path with contents.
+# @option --path! The path where the file should be created
+# @option --contents! The contents of the file
+fs_create() {
+ "$ROOT_DIR/utils/guard_path.sh" "$argc_path" "Create '$argc_path'?"
+ mkdir -p "$(dirname "$argc_path")"
+ printf "%s" "$argc_contents" > "$argc_path"
+ echo "File created: $argc_path" >> "$LLM_OUTPUT"
+}
+
+# See more details at https://github.com/sigoden/argc
+eval "$(argc --argc-eval "$0" "$@")"