wcgw 1.3.0__py3-none-any.whl → 1.5.0__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.

@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: wcgw
3
- Version: 1.3.0
3
+ Version: 1.5.0
4
4
  Summary: What could go wrong giving full shell access to chatgpt?
5
5
  Project-URL: Homepage, https://github.com/rusiaaman/wcgw
6
6
  Author-email: Aman Rusia <gapypi@arcfu.com>
7
- Requires-Python: <3.13,>=3.10
7
+ Requires-Python: <3.13,>=3.11
8
8
  Requires-Dist: anthropic>=0.39.0
9
9
  Requires-Dist: fastapi>=0.115.0
10
+ Requires-Dist: mcp>=1.0.0
10
11
  Requires-Dist: mypy>=1.11.2
11
12
  Requires-Dist: nltk>=3.9.1
12
13
  Requires-Dist: openai>=1.46.0
@@ -26,82 +27,124 @@ Requires-Dist: uvicorn>=0.31.0
26
27
  Requires-Dist: websockets>=13.1
27
28
  Description-Content-Type: text/markdown
28
29
 
29
- # Enable shell access on chatgpt.com
30
- A custom gpt on chatgpt web app to interact with your local shell.
30
+ # Shell and Coding agent on Chatgpt and Claude desktop apps
31
+
32
+ A custom gpt on chatgpt web/desktop apps to interact with your local shell, edit files, run code, etc.
31
33
 
32
34
  [![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)
33
35
  [![Build](https://github.com/rusiaaman/wcgw/actions/workflows/python-publish.yml/badge.svg)](https://github.com/rusiaaman/wcgw/actions/workflows/python-publish.yml)
34
36
 
37
+ [New feature] [26-Nov-2024] Claude desktop support for shell, computer-control, coding agent.
38
+ [src/wcgw/client/mcp_server/Readme.md](src/wcgw/client/mcp_server/Readme.md)
39
+
35
40
  ### 🚀 Highlights
41
+
36
42
  - ⚡ **Full Shell Access**: No restrictions, complete control.
37
43
  - ⚡ **Create, Execute, Iterate**: Ask the gpt 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.
38
- - ⚡ **Interactive Command Handling**: Supports interactive commands using arrow keys, interrupt, and ansi escape sequences.
44
+ - ⚡ **Interactive Command Handling**: Supports interactive commands using arrow keys, interrupt, and ansi escape sequences.
39
45
  - ⚡ **REPL support**: [beta] Supports python/node and other REPL execution.
40
46
 
41
- ### 🪜 Steps:
47
+ ## Claude
48
+ Full readme [src/wcgw/client/mcp_server/Readme.md](src/wcgw/client/mcp_server/Readme.md)
49
+ ### Setup
50
+
51
+ Update `claude_desktop_config.json`
52
+
53
+ ```json
54
+ {
55
+ "mcpServers": {
56
+ "wcgw": {
57
+ "command": "uvx",
58
+ "args": ["--from", "wcgw@latest", "wcgw_mcp"]
59
+ }
60
+ }
61
+ }
62
+ ```
63
+
64
+ Then restart claude app.
65
+ You can then ask claude to execute shell commands, read files, edit files, run your code, etc.
66
+
67
+ ## ChatGPT
68
+
69
+ ### 🪜 Steps:
70
+
42
71
  1. Run the [cli client](https://github.com/rusiaaman/wcgw?tab=readme-ov-file#client) in any directory of choice.
43
72
  2. Share the generated id with this GPT: `https://chatgpt.com/g/g-Us0AAXkRh-wcgw-giving-shell-access`
44
73
  3. The custom GPT can now run any command on your cli
45
74
 
75
+ ### Client
46
76
 
47
- ## Client
48
77
  You need to keep running this client for GPT to access your shell. Run it in a version controlled project's root.
49
78
 
50
- ### Option 1: using uv [Recommended]
79
+ #### Option 1: using uv [Recommended]
80
+
51
81
  ```sh
52
82
  $ curl -LsSf https://astral.sh/uv/install.sh | sh
53
- $ uv tool run --python 3.12 wcgw@latest
83
+ $ uvx wcgw@latest
54
84
  ```
55
85
 
56
- ### Option 2: using pip
86
+ #### Option 2: using pip
87
+
57
88
  Supports python >=3.10 and <3.13
89
+
58
90
  ```sh
59
91
  $ pip3 install wcgw
60
92
  $ wcgw
61
93
  ```
62
94
 
63
-
64
95
  This will print a UUID that you need to share with the gpt.
65
96
 
97
+ ### Chat
66
98
 
67
- ## Chat
68
99
  Open the following link or search the "wcgw" custom gpt using "Explore GPTs" on chatgpt.com
69
100
 
70
101
  https://chatgpt.com/g/g-Us0AAXkRh-wcgw-giving-shell-access
71
102
 
72
103
  Finally, let the chatgpt know your user id in any format. E.g., "user_id=<your uuid>" followed by rest of your instructions.
73
104
 
74
- NOTE: you can resume a broken connection
105
+ NOTE: you can resume a broken connection
75
106
  `wcgw --client-uuid $previous_uuid`
76
107
 
77
- # How it works
108
+ ### How it works on chatgpt app?
109
+
78
110
  Your commands are relayed through a server to the terminal client. [You could host the server on your own](https://github.com/rusiaaman/wcgw?tab=readme-ov-file#creating-your-own-custom-gpt-and-the-relay-server). For public convenience I've hosted one at https://wcgw.arcfu.com thanks to the gcloud free tier plan.
79
111
 
80
112
  Chatgpt sends a request to the relay server using the user id that you share with it. The relay server holds a websocket with the terminal client against the user id and acts as a proxy to pass the request.
81
113
 
82
- It's secure in both the directions. Either a malicious actor or a malicious Chatgpt has to correctly guess your UUID for any security breach.
114
+ It's secure in both the directions. Either a malicious actor or a malicious Chatgpt has to correctly guess your UUID for any security breach.
83
115
 
84
116
  # Showcase
85
117
 
86
- ## Unit tests and github actions
118
+ ## Claude desktop
119
+
120
+ ### Resize image and move it to a new dir
121
+
122
+ ![example](https://github.com/rusiaaman/wcgw/blob/main/static/example.jpg?raw=true)
123
+
124
+ ## Chatgpt app
125
+
126
+ ### Unit tests and github actions
127
+
87
128
  [The first version of unit tests and github workflow to test on multiple python versions were written by the custom chatgpt](https://chatgpt.com/share/6717f922-8998-8005-b825-45d4b348b4dd)
88
129
 
89
- ## Create a todo app using react + typescript + vite
90
- ![Screenshot](https://github.com/rusiaaman/wcgw/blob/main/static/ss1.png?raw=true)
130
+ ### Create a todo app using react + typescript + vite
91
131
 
132
+ ![Screenshot](https://github.com/rusiaaman/wcgw/blob/main/static/ss1.png?raw=true)
92
133
 
93
134
  # Privacy
135
+
94
136
  The relay server doesn't store any data. I can't access any information passing through it and only secure channels are used to communicate.
95
137
 
96
138
  You may host the server on your own and create a custom gpt using the following section.
97
139
 
98
140
  # Creating your own custom gpt and the relay server.
141
+
99
142
  I've used the following instructions and action json schema to create the custom GPT. (Replace wcgw.arcfu.com with the address to your server)
100
143
 
101
144
  https://github.com/rusiaaman/wcgw/blob/main/gpt_instructions.txt
102
145
  https://github.com/rusiaaman/wcgw/blob/main/gpt_action_json_schema.json
103
146
 
104
- Run the server
147
+ Run the server
105
148
  `gunicorn --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:443 src.wcgw.relay.serve:app --certfile fullchain.pem --keyfile privkey.pem`
106
149
 
107
150
  If you don't have public ip and domain name, you can use `ngrok` or similar services to get a https address to the api.
@@ -109,16 +152,24 @@ If you don't have public ip and domain name, you can use `ngrok` or similar serv
109
152
  The specify the server url in the `wcgw` command like so
110
153
  `wcgw --server-url https://your-url/v1/register`
111
154
 
112
- # [Optional] Local shell access with openai API key
155
+ # [Optional] Local shell access with openai API key or anthropic API key
156
+
157
+ ## Openai
113
158
 
114
159
  Add `OPENAI_API_KEY` and `OPENAI_ORG_ID` env variables.
115
160
 
116
- Clone the repo and run to install `wcgw_local` command
161
+ Then run
162
+
163
+ `uvx --from wcgw@latest wcgw_local --limit 0.1` # Cost limit $0.1
164
+
165
+ You can now directly write messages or press enter key to open vim for multiline message and text pasting.
166
+
167
+ ## Anthropic
117
168
 
118
- `pip install .`
169
+ Add `ANTHROPIC_API_KEY` env variable.
119
170
 
120
- Then run
171
+ Then run
121
172
 
122
- `wcgw_local --limit 0.1` # Cost limit $0.1
173
+ `uvx --from wcgw@latest wcgw_local --claude`
123
174
 
124
175
  You can now directly write messages or press enter key to open vim for multiline message and text pasting.
@@ -0,0 +1,22 @@
1
+ wcgw/__init__.py,sha256=9K2QW7QuSLhMTVbKbBYd9UUp-ZyrfBrxcjuD_xk458k,118
2
+ wcgw/types_.py,sha256=STKGeVdQNK_k8mcmAXpKZJY9YUpU7-mbJcFpXfzBuys,1732
3
+ wcgw/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ wcgw/client/__main__.py,sha256=wcCrL4PjG51r5wVKqJhcoJPTLfHW0wNbD31DrUN0MWI,28
5
+ wcgw/client/anthropic_client.py,sha256=owR-nIxQVGgw_ned8JOQ-QmmCBQvZSqgD08kYpU_Rbg,17730
6
+ wcgw/client/cli.py,sha256=Oja42CHkVO8puqOXflko9NeephYCMa85aBmQTEjBZtI,932
7
+ wcgw/client/common.py,sha256=grH-yV_4tnTQZ29xExn4YicGLxEq98z-HkEZwH0ReSg,1410
8
+ wcgw/client/computer_use.py,sha256=jZCw4p7qfHEmhv9eqc1zyPyLTUyb54Ipw5UnRqzRWqc,14399
9
+ wcgw/client/diff-instructions.txt,sha256=s5AJKG23JsjwRYhFZFQVvwDpF67vElawrmdXwvukR1A,1683
10
+ wcgw/client/openai_client.py,sha256=L61ajFVQW2QPS3C0n1YsjgF4vQKfMIZHmp6iFBHutX8,17748
11
+ wcgw/client/openai_utils.py,sha256=YNwCsA-Wqq7jWrxP0rfQmBTb1dI0s7dWXzQqyTzOZT4,2629
12
+ wcgw/client/sys_utils.py,sha256=7_7o1Au33OkZUsW5nKW55xW_YRYZlvUpY6tHVLIILm8,1254
13
+ wcgw/client/tools.py,sha256=PbS1YBELqibShPrpKCGq3KeXLS4t6AhTTkB5pQMgX-g,32476
14
+ wcgw/client/mcp_server/Readme.md,sha256=dK9NqFQ0_tblLOgPI6DjWrSYs2UWKEJkvgnLW3T-EZk,1944
15
+ wcgw/client/mcp_server/__init__.py,sha256=cQ7PUrEmXUpio8x0SEoGWP5hCRPd7z2bAkNCbYbtTys,236
16
+ wcgw/client/mcp_server/server.py,sha256=EzO4VNuSfcIMTue3sCsCqTTMku_AmsgJctBuPQfEQ8w,10160
17
+ wcgw/relay/serve.py,sha256=RUcUeyL4Xt0EEo12Ul6VQjb4tRle4uIdsa85v7XXxEw,8771
18
+ wcgw/relay/static/privacy.txt,sha256=s9qBdbx2SexCpC_z33sg16TptmAwDEehMCLz4L50JLc,529
19
+ wcgw-1.5.0.dist-info/METADATA,sha256=_bTBKk1cMtbqt7dgM-wge3LuNCTe4s1CDzdSyR7P3WU,6292
20
+ wcgw-1.5.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
21
+ wcgw-1.5.0.dist-info/entry_points.txt,sha256=eKo1omwbAggWlQ0l7GKoR7uV1-j16nk9tK0BhC2Oz_E,120
22
+ wcgw-1.5.0.dist-info/RECORD,,
@@ -1,4 +1,5 @@
1
1
  [console_scripts]
2
2
  wcgw = wcgw:listen
3
3
  wcgw_local = wcgw:app
4
+ wcgw_mcp = wcgw:mcp_server
4
5
  wcgw_relay = wcgw.relay.serve:run
@@ -1,17 +0,0 @@
1
- wcgw/__init__.py,sha256=PNWvBvjUKA3aj4bHOtIqBKCAtOW88pr0hAXZ7RylVr8,68
2
- wcgw/types_.py,sha256=k6YhW9ePQ1oFbsPe7nQKndzJTzhulEdufvnFI3qg9vY,1124
3
- wcgw/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- wcgw/client/__main__.py,sha256=ngI_vBcLAv7fJgmS4w4U7tuWtalGB8c7W5qebuT6Z6o,30
5
- wcgw/client/anthropic_client.py,sha256=yLBygok_z8Tpzedi28fpEP084wNth4qeiivZejFWRGY,15610
6
- wcgw/client/cli.py,sha256=Oja42CHkVO8puqOXflko9NeephYCMa85aBmQTEjBZtI,932
7
- wcgw/client/common.py,sha256=grH-yV_4tnTQZ29xExn4YicGLxEq98z-HkEZwH0ReSg,1410
8
- wcgw/client/diff-instructions.txt,sha256=s5AJKG23JsjwRYhFZFQVvwDpF67vElawrmdXwvukR1A,1683
9
- wcgw/client/openai_client.py,sha256=xuLsu9KHG9wssPOjTrQ6rFi3FtWufZ5RtK29Yb_j5O4,17718
10
- wcgw/client/openai_utils.py,sha256=YNwCsA-Wqq7jWrxP0rfQmBTb1dI0s7dWXzQqyTzOZT4,2629
11
- wcgw/client/tools.py,sha256=Q5qxpCjsz43aBzqpuMQ25cke_pUh3EKYeO8WC9pPpls,28225
12
- wcgw/relay/serve.py,sha256=ArDnLVUAtcSVxyKTzmFN-Rx09zJXRlszmNBXGrH9JtU,8863
13
- wcgw/relay/static/privacy.txt,sha256=s9qBdbx2SexCpC_z33sg16TptmAwDEehMCLz4L50JLc,529
14
- wcgw-1.3.0.dist-info/METADATA,sha256=c7_mF4ki8YX5-OBM606mcK7ZUo4YgAVF-FFeYCMIrhY,5255
15
- wcgw-1.3.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
16
- wcgw-1.3.0.dist-info/entry_points.txt,sha256=WlIB825-Vm9ZtNzgENQsbHj4DRMkbpVR7uSkQyBlaPA,93
17
- wcgw-1.3.0.dist-info/RECORD,,
File without changes