Skip to main content

CLI Based AI Agent

Project description

Code-Edith (code-edith)

Beginner Friendly Guide


  1. What is Code-Edith?

Code-Edith is a CLI (Command Line Interface) AI assistant written in Python.

After installation, you start it using:

code-edith

It runs in your terminal and allows you to chat with an AI model. It supports tools like:

  • Web search (DuckDuckGo via ddgs)
  • Read file
  • List directory
  • OS information
  • Date and time

  1. Requirements

Before installing, make sure you have:

  • Python 3.10 or newer
  • pip (Python package manager)
  • Internet connection
  • An OpenAI-compatible API key

Dependencies used internally:

  • openai==2.24.0
  • python-dotenv
  • rich
  • ddgs

  1. Installation

If you have the project folder:

Step 1: Go inside the project folder

cd Edith-Code

Step 2: Install the package

pip install .

After successful installation, you can run:

code-edith

  1. Environment Setup (.env file)

Code-Edith requires a .env file in your HOME directory.

Location of .env:

Linux / Termux: ~/.env

Windows: C:\Users\YourName.env

Create the file:

touch ~/.env

Inside ~/.env, add:

EDITH_API=your_api_key_here
EDITH_MODEL=gpt-4o-mini
EDITH_URL=https://api.openai.com/v1

Minimum required:

EDITH_API
EDITH_MODEL

Alternative: You can use OPENAI_API_KEY instead of EDITH_API.

Example minimal config:

EDITH_API=sk-xxxxxxxxxxxxxxxx
EDITH_MODEL=gpt-4o-mini

If EDITH_API or EDITH_MODEL is missing, the app will stop with:

[Error] Missing EDITH_API or EDITH_MODEL in ~/.env

  1. Running Code-Edith

Start the application:

code-edith

You will see a banner. Then you can start typing prompts.

Example:

> explain python decorators
> list files in current directory
> search latest AI news

  1. Built-in Commands

Inside the CLI:

/help Show help menu
/clear Clear session memory
/exit Exit the application

You can also type:

exit
quit
clear
help

  1. How Session Memory Works

  • The app stores conversation history in memory during the session.

  • When you use /clear, it resets memory.

  • When you exit, memory is lost.

  • Command history is saved in:

    ~/.edith_history


  1. Tools Available

The system includes tool support such as:

  • web_search
  • read_file
  • list_dir
  • get_os_info
  • data_time

The AI decides when to call these tools automatically.


  1. Limitations

  1. Requires Internet
    It depends on external API and web search.

  2. No Offline Mode
    It cannot run local models without modifying the code.

  3. No GUI
    Terminal only.

  4. No Persistent Memory
    Memory resets after exit.

  5. Depends on API Stability
    If your API key is invalid or rate-limited, it will fail.

  6. Tool Security
    File reading and directory listing depend on OS permissions.


  1. Common Errors

[Auth Error]

  • Invalid API key
  • Wrong EDITH_URL

Missing EDITH_API or EDITH_MODEL

  • Your ~/.env file is not configured correctly

  1. Uninstall

To remove:

pip uninstall code-edith

  1. Developer Notes

Entry point:

code-edith = index:main

Main file:

index.py

All Rights Reserved

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

code_edith-1.0.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

code_edith-1.0.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file code_edith-1.0.1.tar.gz.

File metadata

  • Download URL: code_edith-1.0.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for code_edith-1.0.1.tar.gz
Algorithm Hash digest
SHA256 18aaa55aec0cf2641405af1946205f214ad1bf865e87be04a6a1b73ad5aa2c96
MD5 5c0645858032c96af0128986353a3740
BLAKE2b-256 b619354cc51f86f90e8bf2fce86962143d2c0095e6f8d3b6549054c000c1aed0

See more details on using hashes here.

Provenance

The following attestation bundles were made for code_edith-1.0.1.tar.gz:

Publisher: python-publish.yml on anthroberc/code-edith

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file code_edith-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: code_edith-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for code_edith-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a9ec350a63a21bf71be0fcdeef4e76928830794a5cb8d8069b91d456a5e07746
MD5 c9142e90297841237e4152dc87af3460
BLAKE2b-256 74d9a52e87cb20c5af3473dcd88bfe53a9d15327912cf28cd4ce61e93ede979b

See more details on using hashes here.

Provenance

The following attestation bundles were made for code_edith-1.0.1-py3-none-any.whl:

Publisher: python-publish.yml on anthroberc/code-edith

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page