wcgw 2.0.2__py3-none-any.whl → 2.0.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of wcgw might be problematic. Click here for more details.

@@ -262,6 +262,7 @@ def loop(
262
262
  - Interact with the linux os on docker using mouse.
263
263
  - Uses xdotool
264
264
  - About left_click_drag: the current mouse position will be used as the starting point, click and drag to the given x, y coordinates. Useful in things like sliders, moving things around, etc.
265
+ - The output of this command has the screenshot after doing this action. Use this to verify if the action was successful.
265
266
  """,
266
267
  ),
267
268
  ToolParam(
@@ -272,6 +273,8 @@ def loop(
272
273
  - Emulate keyboard input to the screen
273
274
  - Uses xdootool to send keyboard input, keys like Return, BackSpace, Escape, Page_Up, etc. can be used.
274
275
  - Do not use it to interact with Bash tool.
276
+ - Make sure you've selected a text area or an editable element before sending text.
277
+ - The output of this command has the screenshot after doing this action. Use this to verify if the action was successful.
275
278
  """,
276
279
  ),
277
280
  ]
@@ -178,6 +178,7 @@ async def handle_list_tools() -> list[types.Tool]:
178
178
  - Interact with the linux os on docker using mouse.
179
179
  - Uses xdotool
180
180
  - About left_click_drag: the current mouse position will be used as the starting point, click and drag to the given x, y coordinates. Useful in things like sliders, moving things around, etc.
181
+ - The output of this command has the screenshot after doing this action. Use this to verify if the action was successful.
181
182
  """,
182
183
  ),
183
184
  ToolParam(
@@ -189,6 +190,7 @@ async def handle_list_tools() -> list[types.Tool]:
189
190
  - Uses xdootool to send keyboard input, keys like Return, BackSpace, Escape, Page_Up, etc. can be used.
190
191
  - Do not use it to interact with Bash tool.
191
192
  - Make sure you've selected a text area or an editable element before sending text.
193
+ - The output of this command has the screenshot after doing this action. Use this to verify if the action was successful.
192
194
  """,
193
195
  ),
194
196
  ]
wcgw/client/tools.py CHANGED
@@ -106,13 +106,27 @@ PROMPT = PROMPT_CONST
106
106
 
107
107
 
108
108
  def start_shell() -> pexpect.spawn: # type: ignore
109
- SHELL = pexpect.spawn(
110
- "/bin/bash --noprofile --norc",
111
- env={**os.environ, **{"PS1": PROMPT}}, # type: ignore[arg-type]
112
- echo=False,
113
- encoding="utf-8",
114
- timeout=TIMEOUT,
115
- )
109
+ try:
110
+ SHELL = pexpect.spawn(
111
+ "/bin/bash",
112
+ env={**os.environ, **{"PS1": PROMPT}}, # type: ignore[arg-type]
113
+ echo=False,
114
+ encoding="utf-8",
115
+ timeout=TIMEOUT,
116
+ )
117
+ SHELL.sendline(f"export PS1={PROMPT}")
118
+ except Exception as e:
119
+ traceback.print_exc()
120
+ console.log(f"Error starting shell: {e}. Retrying without rc ...")
121
+
122
+ SHELL = pexpect.spawn(
123
+ "/bin/bash --noprofile --norc",
124
+ env={**os.environ, **{"PS1": PROMPT}}, # type: ignore[arg-type]
125
+ echo=False,
126
+ encoding="utf-8",
127
+ timeout=TIMEOUT,
128
+ )
129
+
116
130
  SHELL.expect(PROMPT, timeout=TIMEOUT)
117
131
  SHELL.sendline("stty -icanon -echo")
118
132
  SHELL.expect(PROMPT, timeout=TIMEOUT)
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: wcgw
3
- Version: 2.0.2
4
- Summary: What could go wrong giving full shell access to chatgpt?
3
+ Version: 2.0.4
4
+ Summary: Shell and coding agent on claude and chatgpt
5
5
  Project-URL: Homepage, https://github.com/rusiaaman/wcgw
6
6
  Author-email: Aman Rusia <gapypi@arcfu.com>
7
7
  Requires-Python: <3.13,>=3.11
@@ -29,8 +29,8 @@ Description-Content-Type: text/markdown
29
29
 
30
30
  # Shell and Coding agent for Claude and Chatgpt
31
31
 
32
- - Claude - An MCP server on claude desktop for autonomous shell, coding and desktop control agent.
33
- - Chatgpt - Allows custom gpt to talk to your shell via a relay server.
32
+ - Claude - An MCP server on claude desktop for autonomous shell, coding and desktop control agent. (mac only)
33
+ - Chatgpt - Allows custom gpt to talk to your shell via a relay server. (linux or mac)
34
34
 
35
35
  [![Tests](https://github.com/rusiaaman/wcgw/actions/workflows/python-tests.yml/badge.svg?branch=main)](https://github.com/rusiaaman/wcgw/actions/workflows/python-tests.yml)
36
36
  [![Mypy strict](https://github.com/rusiaaman/wcgw/actions/workflows/python-types.yml/badge.svg?branch=main)](https://github.com/rusiaaman/wcgw/actions/workflows/python-types.yml)
@@ -47,12 +47,29 @@ Description-Content-Type: text/markdown
47
47
  - ⚡ **Full Shell Access**: No restrictions, complete control.
48
48
  - ⚡ **Desktop control on Claude**: Screen capture, mouse control, keyboard control on claude desktop (on mac with docker linux)
49
49
  - ⚡ **Create, Execute, Iterate**: Ask claude to keep running compiler checks till all errors are fixed, or ask it to keep checking for the status of a long running command till it's done.
50
+ - ⚡ **Large file edit**: Supports large file incremental edits to avoid token limit issues. Faster than full file write.
50
51
  - ⚡ **Interactive Command Handling**: Supports interactive commands using arrow keys, interrupt, and ansi escape sequences.
51
52
  - ⚡ **REPL support**: [beta] Supports python/node and other REPL execution.
52
53
 
54
+ ## Top use cases examples
55
+ - Solve problem X using python, create and run test cases and fix any issues. Do it in a temporary directory
56
+ - Find instances of code with X behavior in my repository
57
+ - Git clone https://github.com/my/repo in my home directory, then understand the project, set up the environment and build
58
+ - Create a golang htmx tailwind webapp, then open browser to see if it works (use with puppeteer mcp)
59
+ - Edit or update a large file
60
+ - In a separate branch create feature Y, then use github cli to create a PR to original branch
61
+ - Command X is failing in Y directory, please run and fix issues
62
+ - Using X virtual environment run Y command
63
+ - Using cli tools, create build and test an android app. Finally run it using emulator for me to use
64
+ - Fix all mypy issues in my repo at X path.
65
+ - Using 'screen' run my server in background instead, then run another api server in bg, finally run the frontend build. Keep checking logs for any issues in all three
66
+ - Create repo wide unittest cases. Keep iterating through files and creating cases. Also keep running the tests after each update. Do not modify original code.
67
+
53
68
  ## Claude Setup
54
69
 
55
- Update `claude_desktop_config.json` (~/Library/Application Support/Claude/claude_desktop_config.json)
70
+ First install `uv` https://docs.astral.sh/uv/getting-started/installation/#installation-methods
71
+
72
+ Then update `claude_desktop_config.json` (~/Library/Application Support/Claude/claude_desktop_config.json)
56
73
 
57
74
  ```json
58
75
  {
@@ -2,7 +2,7 @@ wcgw/__init__.py,sha256=9K2QW7QuSLhMTVbKbBYd9UUp-ZyrfBrxcjuD_xk458k,118
2
2
  wcgw/types_.py,sha256=rDz4olJS2zvYC13jzeOppA2tci-tVDyWAqeA5BesAaU,1773
3
3
  wcgw/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  wcgw/client/__main__.py,sha256=wcCrL4PjG51r5wVKqJhcoJPTLfHW0wNbD31DrUN0MWI,28
5
- wcgw/client/anthropic_client.py,sha256=yhFavV51c7zl2AqWQS2i-4KtLh4BRI-odFlppg5sIDY,19965
5
+ wcgw/client/anthropic_client.py,sha256=G5bUSKndI-rXIPhzRg-P3YVU5OiJLX24Ks4FswkD-m4,20293
6
6
  wcgw/client/cli.py,sha256=-z0kpDAW3mzfQrQeZfaVJhBCAQY3HXnt9GdgQ8s-u0Y,1003
7
7
  wcgw/client/common.py,sha256=grH-yV_4tnTQZ29xExn4YicGLxEq98z-HkEZwH0ReSg,1410
8
8
  wcgw/client/computer_use.py,sha256=vogD9DDgEJAEJ6VSVRB1cAYcj4UXpSu2qqyaVXddMlQ,15312
@@ -10,13 +10,13 @@ wcgw/client/diff-instructions.txt,sha256=s5AJKG23JsjwRYhFZFQVvwDpF67vElawrmdXwvu
10
10
  wcgw/client/openai_client.py,sha256=F5TEv5DhU9twsywSZGtuVkPo6xVaaoaEjvIh88FnIUQ,17780
11
11
  wcgw/client/openai_utils.py,sha256=YNwCsA-Wqq7jWrxP0rfQmBTb1dI0s7dWXzQqyTzOZT4,2629
12
12
  wcgw/client/sys_utils.py,sha256=GajPntKhaTUMn6EOmopENWZNR2G_BJyuVbuot0x6veI,1376
13
- wcgw/client/tools.py,sha256=T97lOO58UP_2ohfvXQNCVJgLLtEWlcVT9iBSkSwuVW8,33140
13
+ wcgw/client/tools.py,sha256=M_XgVYTnUWUEQHJbwLF-aHi1Q02hUUhOnt8A5n_jDIo,33584
14
14
  wcgw/client/mcp_server/Readme.md,sha256=I8N4dHkTUVGNQ63BQkBMBhCCBTgqGOSF_pUR6iOEiUk,2495
15
15
  wcgw/client/mcp_server/__init__.py,sha256=hyPPwO9cabAJsOMWhKyat9yl7OlSmIobaoAZKHu3DMc,381
16
- wcgw/client/mcp_server/server.py,sha256=M9pJ3DktGsxf6cufXbZ0xxs0HIKNLGc75O_biV2UKYA,10571
16
+ wcgw/client/mcp_server/server.py,sha256=XWZCMlL5HOpvRQjY1qoZnmFAe9x_rpRb_udZz9k8ks4,10815
17
17
  wcgw/relay/serve.py,sha256=RUcUeyL4Xt0EEo12Ul6VQjb4tRle4uIdsa85v7XXxEw,8771
18
18
  wcgw/relay/static/privacy.txt,sha256=s9qBdbx2SexCpC_z33sg16TptmAwDEehMCLz4L50JLc,529
19
- wcgw-2.0.2.dist-info/METADATA,sha256=qMZuMfGrqgLa_vsnfDrrsQW0rMEiSeqib-NX87WyDH4,5249
20
- wcgw-2.0.2.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
21
- wcgw-2.0.2.dist-info/entry_points.txt,sha256=eKo1omwbAggWlQ0l7GKoR7uV1-j16nk9tK0BhC2Oz_E,120
22
- wcgw-2.0.2.dist-info/RECORD,,
19
+ wcgw-2.0.4.dist-info/METADATA,sha256=HKWb21XbpSRKLzdv8NEDMc_SEEp5qCcGwdvT1QY9C-s,6613
20
+ wcgw-2.0.4.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
21
+ wcgw-2.0.4.dist-info/entry_points.txt,sha256=eKo1omwbAggWlQ0l7GKoR7uV1-j16nk9tK0BhC2Oz_E,120
22
+ wcgw-2.0.4.dist-info/RECORD,,
File without changes