Tunnel
graft host tunnel forwards a remote container’s port to your local machine, letting you connect to any running service as if it were local.
graft host tunnel <container> :<localport>
Section titled “graft host tunnel <container> :<localport>”graft host tunnel backend :8080 # tunnel backend APIgraft host tunnel frontend :3000 # tunnel frontend dev servergraft host tunnel worker :9090 # tunnel any servicegraft -r azure tunnel backend :8080 # via registryWhat it does:
- Connects to the remote server over SSH.
- Auto-detects the container’s exposed port. If multiple ports are exposed, prompts you to pick one.
- Forwards the remote port to
localhost:<localport>.
If :<localport> is omitted, uses the same port as the container.
# Omit local port — uses container's exposed portgraft host tunnel graft-postgresUse with any local tool — database GUIs, API clients, browsers, or your app’s dev config pointing at localhost.
graft db <name> serve
Section titled “graft db <name> serve”For Postgres databases created with graft db init, the db serve command is a shortcut that also prints credentials from .graft/secrets.env.