Skip to content

Commit

Permalink
Merge pull request #9 from rusiaaman/feat/runningSinceInfo
Browse files Browse the repository at this point in the history
Feat/running since info and bug fixes
  • Loading branch information
rusiaaman authored Dec 8, 2024
2 parents 93671bb + 1722ad8 commit 5e684a7
Show file tree
Hide file tree
Showing 7 changed files with 168 additions and 101 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
-**REPL support**: [beta] Supports python/node and other REPL execution.

## Top use cases examples

- Solve problem X using python, create and run test cases and fix any issues. Do it in a temporary directory
- Find instances of code with X behavior in my repository
- Git clone https://github.com/my/repo in my home directory, then understand the project, set up the environment and build
Expand Down Expand Up @@ -63,6 +64,13 @@ Then update `claude_desktop_config.json` (~/Library/Application Support/Claude/c

Then restart claude app.

_If there's an error in setting up_

- Make sure `uv` in the system PATH by running `uv --version` and also ensure `uv tool run wcgw --version` works globally.
Otherwise, re-install uv and follow instructions to add it into your .zshrc or .bashrc
- If there's still an issue, check that `uv tool run --from wcgw@latest --python 3.12 wcgw_mcp` runs in your terminal. It should have no output and shouldn't exit.
- Debug the mcp server using `npx @modelcontextprotocol/[email protected] uv tool run --from wcgw@latest --python 3.12 wcgw_mcp`

### [Optional] Computer use support using desktop on docker

Computer use is disabled by default. Add `--computer-use` to enable it. This will add necessary tools to Claude including ScreenShot, Mouse and Keyboard control.
Expand Down Expand Up @@ -99,6 +107,12 @@ Then ask claude desktop app to control the docker os. It'll connect to the docke

Connect to `http://localhost:6080/vnc.html` for desktop view (VNC) of the system running in the docker.

The following requirements should be installed and working in the linux docker image:

1. Needs `xdotool` to execute commands on the desktop.
2. Needs `scrot` to take screenshots.
3. Needs `convert` from imagemagick to convert images.

## Usage

Wait for a few seconds. You should be able to see this icon if everything goes right.
Expand All @@ -112,7 +126,6 @@ Then ask claude to execute shell commands, read files, edit files, run your code

If you've run the docker for LLM to access, you can ask it to control the "docker os". If you don't provide the docker container id to it, it'll try to search for available docker using `docker ps` command.


## Chatgpt Setup

Read here: https://github.com/rusiaaman/wcgw/blob/main/openai.md
Expand All @@ -127,7 +140,6 @@ Read here: https://github.com/rusiaaman/wcgw/blob/main/openai.md

![example](https://github.com/rusiaaman/wcgw/blob/main/static/example.jpg?raw=true)


## [Optional] Local shell access with openai API key or anthropic API key

### Openai
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
authors = [{ name = "Aman Rusia", email = "[email protected]" }]
name = "wcgw"
version = "2.0.4"
version = "2.1.0"
description = "Shell and coding agent on claude and chatgpt"
readme = "README.md"
requires-python = ">=3.11, <3.13"
Expand All @@ -26,6 +26,7 @@ dependencies = [
"nltk>=3.9.1",
"anthropic>=0.39.0",
"mcp",
"humanize>=4.11.0",
]

[project.urls]
Expand Down
2 changes: 0 additions & 2 deletions src/wcgw/client/anthropic_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
from .tools import (
DoneFlag,
get_tool_output,
SHELL,
start_shell,
which_tool_name,
)
import tiktoken
Expand Down
1 change: 0 additions & 1 deletion src/wcgw/client/computer_use.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ class ComputerTool:
"""

name: Literal["computer"] = "computer"
api_type: Literal["computer_20241022"] = "computer_20241022"
width: Optional[int]
height: Optional[int]
display_num: Optional[int]
Expand Down
2 changes: 0 additions & 2 deletions src/wcgw/client/openai_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
from .tools import (
DoneFlag,
get_tool_output,
SHELL,
start_shell,
which_tool,
)
import tiktoken
Expand Down
Loading

0 comments on commit 5e684a7

Please sign in to comment.