Skip to content

sapirrior/code-edith

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Edith

A lightweight, terminal-based AI coding agent. Connects to any OpenAI-compatible API endpoint — hosted providers or self-hosted models both work.

License Python


Requirements

  • Python 3.10 or higher
  • An OpenAI-compatible API endpoint (e.g. OpenAI, Anthropic via proxy, Ollama, LM Studio)
  • A .env file in your home directory (~/.env) — see Configuration

Installation

From PyPI (stable):

pip install code-edith

From GitHub (latest):

pip install git+https://github.com/sapirrior/code-edith

Configuration

Create a .env file in your home directory (~/.env) with the following variables:

EDITH_API_KEY=your_api_key
EDITH_BASE_URL=https://api.openai.com/v1
EDITH_MODEL_NAME=gpt-4o
Variable Description
EDITH_API_KEY API key from your provider
EDITH_BASE_URL Base URL of the OpenAI-compatible endpoint
EDITH_MODEL_NAME Model identifier (e.g. gpt-4o, claude-3-5-sonnet, llama3)

The config is read from ~/.env at startup. Edith does not touch your project files during configuration.


Usage

Navigate to the folder you want to work in, then launch Edith:

cd your-project
edith

Trust prompt. The first time you run Edith in a folder, it will ask whether you trust it. Answering y creates a .edith/TRUST marker file in the current directory. Subsequent launches in the same folder skip this step. If you answer n, Edith exits immediately without doing anything.

Once running, type your request at the >> prompt and press Enter.


Tools

Edith has four built-in tools it can invoke autonomously to complete tasks:

Tool What it does Requires confirmation
WebSearch Searches the web using DuckDuckGo No
ReadFile Reads a local file and returns its contents No
WriteFile Creates or overwrites a file with new content Yes
ShellCommand Runs a bash command in the current directory Yes

For WriteFile and ShellCommand, Edith will always pause and show you exactly what it is about to do before asking Allow? (y/n). Typing anything other than y or yes cancels the action. The model is instructed not to retry a denied action.


Commands

Type these at the prompt at any time:

Command Description
/clear Clear the terminal and redraw the banner
/copy Copy the last response to the clipboard
/reset Wipe the conversation history (model forgets the session)
/exit Exit Edith cleanly
/help Show the command list

Reporting Issues

Open an issue on the GitHub repository.


License

Apache-2.0. See LICENSE for details.

About

Your own CLI Agent.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages