Skip to content

Commit 9d74d98

Browse files
Added README
1 parent dd6b3ab commit 9d74d98

1 file changed

Lines changed: 110 additions & 0 deletions

File tree

README.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# ComputerUseAgent
2+
3+
A sophisticated Deno-based CLI tool that provides AI-powered file editing and bash command execution capabilities using Claude 3 API.
4+
5+
## Features
6+
7+
- **Dual Mode Operation**:
8+
- Editor mode for AI-assisted text file manipulation
9+
- Bash mode for intelligent command execution
10+
- **Memory Management**
11+
- **Comprehensive Logging**
12+
- **Token Usage Tracking**
13+
- **Cost Calculation**
14+
15+
## Prerequisites
16+
17+
- [Deno](https://deno.land/) installed
18+
- [Anthropic API Key](https://www.anthropic.com/api)
19+
20+
## Setup
21+
22+
1. Clone the repository:
23+
```sh
24+
git clone <repository-url>
25+
cd ComputerUseAgent
26+
```
27+
28+
2. Set up your environment:
29+
```sh
30+
# Set your Anthropic API key
31+
export ANTHROPIC_API_KEY="your-api-key"
32+
```
33+
34+
3. Build the project:
35+
```sh
36+
deno task build
37+
```
38+
39+
## Usage
40+
41+
### Direct Execution
42+
43+
```sh
44+
# Editor mode
45+
deno run -A src/main.ts --mode=editor "your prompt"
46+
47+
# Bash mode
48+
deno run -A src/main.ts --mode=bash "your command"
49+
50+
# Bash mode with mock execution
51+
deno run -A src/main.ts --mode=bash --no-agi "your command"
52+
```
53+
54+
### Using Built Binary
55+
56+
```sh
57+
# After building
58+
./build/ComputerUseAgent --mode=editor "your prompt"
59+
./build/ComputerUseAgent --mode=bash "your command"
60+
```
61+
62+
## Project Structure
63+
64+
- `src/`: Source code directory
65+
- `config/`: Configuration files
66+
- `modules/`: Core functionality modules
67+
- `bash/`: Bash command execution
68+
- `editor/`: Text editor operations
69+
- `memory/`: Memory management
70+
- `types/`: TypeScript interfaces
71+
- `utils/`: Utility functions
72+
73+
## Configuration
74+
75+
Key configuration files:
76+
77+
- [`src/config/constants.ts`](src/config/constants.ts): System-wide constants and API settings
78+
- [`src/config/logging.ts`](src/config/logging.ts): Logging configuration
79+
- [`deno.json`](deno.json): Deno project configuration
80+
81+
## Development
82+
83+
```sh
84+
# Run in development mode with file watching
85+
deno task dev
86+
87+
# Build for local use
88+
deno task buildLocal
89+
```
90+
91+
## Logging
92+
93+
Logs are stored in `app.log` with both console and file output. The logging system tracks:
94+
- User inputs
95+
- API usage
96+
- Command execution
97+
- Errors
98+
- Token usage and costs
99+
100+
## Contributing
101+
102+
1. Fork the repository
103+
2. Create your feature branch
104+
3. Commit your changes
105+
4. Push to the branch
106+
5. Create a new Pull Request
107+
108+
## License
109+
110+
See [LICENSE](LICENSE) file.

0 commit comments

Comments
 (0)