Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

DevSpace + ChatGPT Setup

DevSpace lets ChatGPT connect to folders on your computer. Once connected, ChatGPT can inspect code, edit files, run commands, and help work inside the folders you allow.

Repo: https://github.com/Waishnav/devspace

You can use either:

  • Temporary tunnel: easiest, URL changes after restart.
  • Permanent tunnel: best setup, same URL every time, needs a Cloudflare account and domain.

1. Install DevSpace

Install DevSpace globally:

npm install -g @waishnav/devspace

Check that it works:

devspace doctor

If doctor reports SQLite/native dependency as okay, you are good.

2. Install Cloudflare Tunnel

Windows PowerShell:

winget install --id Cloudflare.cloudflared --accept-package-agreements --accept-source-agreements

macOS:

brew install cloudflared

Check:

cloudflared --version

On Windows, if cloudflared is not found, use:

"C:\Program Files (x86)\cloudflared\cloudflared.exe" --version

3. Configure DevSpace

Run:

devspace init

Answer the prompts:

  • Project folders: choose the folders ChatGPT may access.
  • Port: use 7676.
  • Public URL: use your tunnel URL. If you do not have one yet, use a placeholder and update it later.

Example allowed folders:

C:\Users\you\Desktop
D:\Projects
/Users/you/Projects

Important: ChatGPT can only open folders inside allowedRoots.

4. DevSpace Files

DevSpace stores settings here:

Windows:

C:\Users\<you>\.devspace\config.json
C:\Users\<you>\.devspace\auth.json

macOS/Linux:

~/.devspace/config.json
~/.devspace/auth.json

config.json controls allowed folders and public URL:

{
  "host": "127.0.0.1",
  "port": 7676,
  "allowedRoots": [
    "C:\\Users\\you\\Desktop",
    "D:\\Projects"
  ],
  "publicBaseUrl": "https://devspace.yourdomain.com"
}

auth.json stores the Owner password:

{
  "ownerToken": "keep-this-private"
}

Use this Owner password when ChatGPT asks for approval.

5A. Temporary Tunnel

Use this for quick testing.

Start the tunnel:

cloudflared tunnel --url http://127.0.0.1:7676 --no-autoupdate

If cloudflared is not found:

& "C:\Program Files (x86)\cloudflared\cloudflared.exe" tunnel --url http://127.0.0.1:7676 --no-autoupdate

Copy the URL it prints, for example:

https://abc.trycloudflare.com

Update DevSpace with the URL Cloudflare printed. Replace the example URL with your real one:

devspace config set publicBaseUrl https://abc.trycloudflare.com

Start DevSpace in another terminal:

devspace serve

ChatGPT MCP URL:

https://abc.trycloudflare.com/mcp

Note: temporary tunnel URLs change when restarted.

5B. Permanent Tunnel

Use this if you have a domain on Cloudflare.

Login:

cloudflared tunnel login

If cloudflared is not found:

& "C:\Program Files (x86)\cloudflared\cloudflared.exe" tunnel login

Create a tunnel:

cloudflared tunnel create devspace

If cloudflared is not found:

& "C:\Program Files (x86)\cloudflared\cloudflared.exe" tunnel create devspace

It prints a credentials JSON path. Keep that path.

Create DNS:

cloudflared tunnel route dns devspace devspace.yourdomain.com

Replace devspace.yourdomain.com with your real subdomain.

If cloudflared is not found:

& "C:\Program Files (x86)\cloudflared\cloudflared.exe" tunnel route dns devspace devspace.yourdomain.com

Create config:

Windows PowerShell:

notepad C:\Users\<you>\.cloudflared\config.yml

macOS/Linux:

nano ~/.cloudflared/config.yml

Paste this and update the domain/path:

tunnel: devspace
credentials-file: C:\Users\<you>\.cloudflared\<tunnel-id>.json

ingress:
  - hostname: devspace.yourdomain.com
    service: http://127.0.0.1:7676
  - service: http_status:404

Update DevSpace with your permanent public URL:

devspace config set publicBaseUrl https://devspace.yourdomain.com

Run the tunnel:

cloudflared tunnel run devspace

If cloudflared is not found:

& "C:\Program Files (x86)\cloudflared\cloudflared.exe" tunnel run devspace

Start DevSpace in another terminal:

devspace serve

ChatGPT MCP URL:

https://devspace.yourdomain.com/mcp

6. Add To ChatGPT

In ChatGPT:

  1. Open Settings.
  2. Go to Apps.
  3. Create a custom MCP app.
  4. Name it DevSpace.
  5. Server URL:
https://your-public-url/mcp
  1. Authentication: OAuth.
  2. Accept the warning.
  3. Click Connect.
  4. Enter the Owner password from auth.json.

7. Daily Use

After restarting your computer, open two terminals.

Terminal 1:

cloudflared tunnel run devspace

If needed:

& "C:\Program Files (x86)\cloudflared\cloudflared.exe" tunnel run devspace

Terminal 2:

devspace serve

Keep both open while using ChatGPT.

For temporary tunnels, start the temporary tunnel command instead and update ChatGPT if the URL changed.

8. Prompts For ChatGPT

Open a workspace:

Use DevSpace. Open workspace C:\Users\you\Desktop.
List the folders you can see.

Open a project:

Use DevSpace. Open workspace C:\Users\you\Desktop\my-project.
Inspect it and tell me how to run it.

Make code changes:

Use DevSpace. Open workspace C:\Users\you\Desktop\my-project.
Make the requested change, run tests or build, and summarize what changed.

9. Stop DevSpace

Close both terminal windows.

Or on Windows PowerShell:

Stop-Process -Name cloudflared -Force -ErrorAction SilentlyContinue
Stop-Process -Name node -Force -ErrorAction SilentlyContinue

10. Quick Troubleshooting

Check DevSpace:

devspace doctor

Check your public MCP URL in a browser:

https://your-public-url/mcp

Seeing 401 is normal. It means the server is reachable and protected by auth.

If ChatGPT cannot access files:

  • Make sure cloudflared tunnel run devspace is running.
  • Make sure devspace serve is running.
  • Make sure the ChatGPT URL ends with /mcp.
  • Make sure DevSpace is enabled in the chat.
  • Make sure the folder is inside allowedRoots.

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors