Skip to content
jarogitPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

devtools

Global developer tools runnable from any project directory.

Claude Code

Runs Claude Code in Docker.

  • Login and all state (credentials, memory, history, cache) persist in claude/var/ on the host, bind-mounted into the container.
  • The container runs as the host user who invokes claude — its uid:gid is resolved at runtime (id -u/id -g). So files Claude writes into your project are owned by you on the host, exactly as if you'd created them yourself.
  • The persisted state in claude/var/ is owned by the user who ran install.sh. Run the installer as the same account that will run claude (e.g. webadmin) so the login persists across runs. Because the login now belongs to that uid, it is not shared with a different host user (e.g. root/console) — that user would get its own login.
  • The host Docker socket (/var/run/docker.sock) is mounted in, and the image ships the Docker CLI + Compose plugin (Docker-out-of-Docker). This lets Claude build images, run compose stacks, and docker exec to test projects from inside the container.

⚠️ Security: mounting the Docker socket grants the container (and therefore Claude) root-equivalent control of the host. Only run this on a machine you're willing to give that access — ideally a throwaway/dev VM, not a production host.

Install:

cd claude
chmod +x install.sh
./install.sh
source ~/.bashrc  # or ~/.zshrc

Usage:

cd ~/any-project
claude

On first run, authenticate with /login inside Claude Code. Every subsequent run — by any host user — reuses that same login.

Update Claude Code:

docker build --no-cache -t claude-code path/to/devtools/claude/

Chrome for Claude in Chrome (/chrome)

A docker compose project with a Chrome desktop viewable from the host browser via noVNC and the Claude in Chrome native messaging host preinstalled. Claude Code drives this browser via /chrome.

How it is wired:

  • The extension talks to Claude Code through Chrome native messaging: Chrome spawns claude --chrome-native-host (the image is built FROM claude-code, so it is the same build), which creates a socket in /tmp/claude-mcp-browser-bridge-<user>/; Claude Code looks for sockets there.
  • Both containers mount the same host dir claude/var/chrome-bridge. Both must run as the same uid (CHROME_UID/CHROME_GID = the user running claude).
  • Both share the host's pid namespace (--pid=host, pid: host): the sockets are named after the native host's pid, so Claude Code must see that process.
  • claude() mounts the Chrome profile chrome/var/home/profile read-only to ~/.config/google-chrome, where Claude Code looks for the extension; otherwise /chrome keeps asking to install it.
  • Per-project settings live in chrome/projects/<project>.yml compose overrides: hostnames (extra_hosts, e.g. host-gateway for a reverse proxy published on the docker host), extra networks, and self-signed certs mounted into /certs/<name>.crt. Certs are accepted by key pinning, not by a global TLS bypass. Enable overrides via COMPOSE_FILE in .env.

Setup:

# adds the bridge mount to claude(); restart running claude sessions afterwards
claude/install.sh
cd chrome
# uid/gid, NOVNC_BIND, COMPOSE_FILE (which projects)
cp .env.dist .env && $EDITOR .env
# Chrome profile; must exist and be owned by you
mkdir -p var/home
docker compose up -d --build

Open http://<vm-ip>:6080/vnc.html?autoconnect=1&resize=scale on the host (the VirtualBox host-only adapter IP, e.g. 192.168.56.x). noVNC has no password, so NOVNC_BIND must be the host-only IP: only the host reaches it (whoever reaches the port controls the browser and its logins). In that Chrome, once:

  1. install the Claude extension and sign in with the same claude.ai account and organization as Claude Code (/status shows it);
  2. in Claude Code run /chrome and enable it (or Reconnect extension).

The Chrome profile (extension, logins) persists in chrome/var/home.

Adding a project: create chrome/projects/<name>.yml, e.g.

services:
  chrome:
    extra_hosts:
      - myapp.local:host-gateway
    volumes:
      - ../../myapp/docker/selfsigned.crt:/certs/myapp.crt:ro

append it to COMPOSE_FILE in .env and run docker compose up -d.

After rebuilding claude-code, run docker compose up -d --build so the native host matches the CLI.

⚠️ The noVNC port is reachable by anyone who can reach the VM and is protected only by the VNC password (first 8 characters); the browser is logged in to your claude.ai account. Keep the VM on a host-only network.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages