Skip to content

jacob-sauve/leafcutter-lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

leafcutter lite ๐Ÿ๐Ÿœ......


Note: this project has the same root as leafcutter, except does not involve the participation of Claude Code, which seemingly brought the old repository to a near-unsalvageable state of disrepair.


"Yet you, my creator, detest and spurn me, thy creature, to whom thou art bound by ties only dissoluble by the annihilation of one of us." -Mary Shelley, Frankenstein


What if you could have Claude CLI without Internet access or API tokens?

This is the question that leafcutter aims to answer: like the eponymous ants, our software aims to multiply the power of tiny, local models to pick up this heavy mantle, except now for free and open source! Claude has officially helped build its own successor.

Concept

leafcutter
  1. The user starts by sending a message to the LLM, which the system injects into a premade prompt to encourage said LLM to perform tool calls when relevant.
  2. The LLM produces grammar-constrained JSON output, potentially containing tool call information if relevant.
  3. The JSON is parsed by the system, which then runs tool calls if present.
  4. The system displays output to the user, summarising performed tool calls and showing any message provided by the LLM.

Installation

Install ollama, e.g. on Brew

brew install ollama

Clone this repo

git clone github.com/jacob-sauve/leafcutter-lite

Make a venv

python3 -m venv .venv/

Install the dependencies

pip3 install -r requirements.txt

And run it!

python3 main.py

Functionality

โš ๏ธCURRENTLY NO SAFEGUARDS TO FUNCTION CALLING; USER BEWAREโš ๏ธ

leafcutter agents can currently:

  • list files in a directory
  • write to files in a directory
  • append to files in a directory
  • or chat normally! Just ask the agent to do something, it should probably happen!

About

helping tiny llms bite off more than they can chew; no vibes just code

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages