CLI Based AI Agent
Project description
Code-Edith (code-edith)
Beginner Friendly Guide
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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.
- Limitations
-
Requires Internet
It depends on external API and web search. -
No Offline Mode
It cannot run local models without modifying the code. -
No GUI
Terminal only. -
No Persistent Memory
Memory resets after exit. -
Depends on API Stability
If your API key is invalid or rate-limited, it will fail. -
Tool Security
File reading and directory listing depend on OS permissions.
- Common Errors
[Auth Error]
- Invalid API key
- Wrong EDITH_URL
Missing EDITH_API or EDITH_MODEL
- Your ~/.env file is not configured correctly
- Uninstall
To remove:
pip uninstall code-edith
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18aaa55aec0cf2641405af1946205f214ad1bf865e87be04a6a1b73ad5aa2c96
|
|
| MD5 |
5c0645858032c96af0128986353a3740
|
|
| BLAKE2b-256 |
b619354cc51f86f90e8bf2fce86962143d2c0095e6f8d3b6549054c000c1aed0
|
Provenance
The following attestation bundles were made for code_edith-1.0.1.tar.gz:
Publisher:
python-publish.yml on anthroberc/code-edith
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
code_edith-1.0.1.tar.gz -
Subject digest:
18aaa55aec0cf2641405af1946205f214ad1bf865e87be04a6a1b73ad5aa2c96 - Sigstore transparency entry: 1027299482
- Sigstore integration time:
-
Permalink:
anthroberc/code-edith@4d41cde48fce9763f63e0a39a754ab82fb1a2090 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/anthroberc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4d41cde48fce9763f63e0a39a754ab82fb1a2090 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9ec350a63a21bf71be0fcdeef4e76928830794a5cb8d8069b91d456a5e07746
|
|
| MD5 |
c9142e90297841237e4152dc87af3460
|
|
| BLAKE2b-256 |
74d9a52e87cb20c5af3473dcd88bfe53a9d15327912cf28cd4ce61e93ede979b
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
code_edith-1.0.1-py3-none-any.whl -
Subject digest:
a9ec350a63a21bf71be0fcdeef4e76928830794a5cb8d8069b91d456a5e07746 - Sigstore transparency entry: 1027299565
- Sigstore integration time:
-
Permalink:
anthroberc/code-edith@4d41cde48fce9763f63e0a39a754ab82fb1a2090 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/anthroberc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4d41cde48fce9763f63e0a39a754ab82fb1a2090 -
Trigger Event:
release
-
Statement type: