Skip to content

dvdbits/leaf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leaf

Leaf is a tiny Swift CLI that lets you save shell command aliases and run them on demand, or communicate with an LLM to generate commands.

Installation

git clone https://github.com/dvdbits/leaf.git
cd leaf
swift build -c release

The executable will be in .build/release/leaf (or .build/*/release/leaf.exe on Windows). Add it to your PATH.

AI Configuration

The AI configuration structure:

{
  "model": "string",
  "temperature": 0.0,
  "endpoint": "string",
  "apiKey": "string"
}

HTTP Request Body

The HTTP call body structure sent to the LLM endpoint:

{
  "model": "string",
  "options": {
    "temperature": 0.0
  },
  "stream": false,
  "prompt": "string"
}

Caveats

Commands are run using execvp, so only one command can be run per alias.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages