Skip to content

Strawberry-Computer/femtoagent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FemtoAgent: Minimal CLI AI Coding Assistant

A lightweight bash-based AI coding agent that uses the OpenRouter API to generate and execute bash scripts.

How It Works

  1. Takes user input as task descriptions in natural language
  2. Maintains conversation history in history.txt (latest 500 lines)
  3. Structures context with XML-like tags:
    • - Start of history
    • - Recent conversation
    • - Last command output
    • - Current user request
  4. Makes API call to OpenRouter using Claude Sonnet 4
  5. Extracts bash script from AI response
  6. Allows user to review and execute generated script
  7. Captures command output in result.txt

Usage

  1. Set your OpenRouter API key:
export OPENROUTER_API_KEY="your-key"
  1. Run the agent:
bash agent.sh
  1. Describe what you want to do in plain English
  2. Review and confirm script execution with y/n

Requirements

  • curl
  • jq
  • coreutils

Configuration

Environment variables:

About

CLI AI Coding Agent using OpenRouter API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages