-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgit-tools.lisp
More file actions
26 lines (24 loc) · 1.18 KB
/
git-tools.lisp
File metadata and controls
26 lines (24 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
;;; -*- Lisp -*-
(in-package "GEMINI")
(defun git-tools-and-handlers ()
"Return a list of git-related functions and their handlers."
(list
(cons
(function-declaration
:name "git"
:description "Runs a git command and returns the output as a string. Use this command to interact with git repositories. You can read and write files, create branches, commit changes, and push to remote repositories as needed."
:behavior :blocking
:parameters (schema :type :object
:properties (object :arguments
(schema :type :array
:items (schema :type :string)
:description "The arguments to pass to the git command."))
:required (vector :arguments))
:response (schema :type :string
:description "The standard output of the command, or an error message if the command failed."))
(lambda (&key arguments)
(uiop:run-program
(cons "git" (coerce arguments 'list))
:output :string
:error-output :string
:ignore-error-status t)))))