shithub: oai

Download patch

ref: 3d4c4ee5d639d10ae577561ce0f932cf5b2df7d8
parent: 90671e4fafe7c674b2e46f60cf8fa82b782105b8
author: sirjofri <sirjofri@sirjofri.de>
date: Tue Feb 24 17:44:21 EST 2026

more details in readme

--- a/README
+++ b/README
@@ -17,7 +17,7 @@
 
 USAGE:
 
-oai [-q] [-k apikey] [-m model] [-u baseurl] [-s sysprompt]
+oai [-q] [-bb] [-k apikey] [-m model] [-u baseurl] [-s sysprompt]
 ocomplete [-d] [-k apikey] [-m model] [-u baseurl]
 
 baseurl is the http url without the v1/... stuff, with llama-server this is usually just http://server:8080.
@@ -24,13 +24,34 @@
 
 The apikey and the baseurl are optional if you set them as environment variables ($oaikey and $oaiurl).
 
--d adds debugging output: request and response (fd2)
+-d adds debugging output: request and response (fd2).
 
+-bb blindly trusts tool calls. By default, the user will be prompted to verify calls.
+
 After that, you get a user: prompt for your user messages.
 
 Ocomplete: Call the program from within an acme window with some selected text. The whole window contents as well as the filename from the tag will be sent to the API as context, and the LLM response will replace the selected text (or inserted at the cursor location).
 
 Oai: -q does not output any prompts, only LLM responses. -s sets the sysprompt.
+
+
+Oai now supports a "meta shell". You can access it by sending a field separator (Ctrl+\). On that shell:
+
+- commands will be executed in rc.
+- prepend commands with a ! to forward the command output to the chat. This will end the meta shell mode.
+- send another field separator to drop back to the normal chat.
+
+
+Oai now supports tool calling with the following functions:
+
+- list_files <folder>: ls $folder
+- read_file <file>: cat $file
+- lookman <keyword>: lookman $keyword
+- man <section> <name>: man $section $name
+
+Note that there is not a lot of verification happening. It is possible to call read_file on folders or non-existing items, and it's possible to attempt to read a non-existing man page.
+
+By default, any tool call will ask for a user permission. This can be turned off by using the -bb flags (two 'b') to fall into trusted mode.
 
 
 LIBRARY:
--