MCPcopy Index your code
hub / github.com/sosedoff/pgweb

github.com/sosedoff/pgweb @v0.17.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.17.0 ↗
559 symbols 1,844 edges 67 files 79 documented · 14%
README

pgweb

Simple web-based and cross platform PostgreSQL database explorer.

Release Linux Build Go Report Card GoDoc Docker Pulls

Overview

Pgweb is a web-based database explorer for PostgreSQL, written in Go, and works on Mac, Linux and Windows machines. Distributed as a simple binary with zero dependencies. Very easy to use and packs just the right amount of features.

See application screenshots

Features

  • Cross-platform: Mac/Linux/Windows (64bit).
  • Simple installation (distributed as a single binary).
  • Zero dependencies.
  • Works with PostgreSQL 9.1+.
  • Supports native SSH tunnels.
  • Multiple database sessions.
  • Execute and analyze custom SQL queries.
  • Table and query data export to CSV/JSON/XML.
  • Query history.
  • Server bookmarks.

Visit WIKI for more details.

Demo

Visit https://pgweb-demo.fly.dev/ to see Pgweb in action.

Installation

Usage

Start server:

pgweb

You can also provide connection flags:

pgweb --host localhost --user myuser --db mydb

Connection URL scheme is also supported:

pgweb --url postgres://user:password@host:port/database?sslmode=[mode]
pgweb --url "postgres:///database?host=/absolute/path/to/unix/socket/dir"

Multiple database sessions

To enable multiple database sessions in pgweb, start the server with:

pgweb --sessions

Or set environment variable:

PGWEB_SESSIONS=1 pgweb

Testing

Before running tests, make sure you have PostgreSQL server running on localhost:5432 interface. Also, you must have postgres user that could create new databases in your local environment. Pgweb server should not be running at the same time.

Execute test suite:

make test

If you're using Docker locally, you might also run pgweb test suite against all supported PostgreSQL version with a single command:

make test-all

Contribute

  • Fork this repository
  • Create a new feature branch for a new functionality or bugfix
  • Commit your changes
  • Execute test suite
  • Push your code and open a new pull request
  • Use issues for any questions
  • Check wiki for extra documentation

License

The MIT License (MIT). See LICENSE file for more details.

Core symbols most depended-on inside this repo

$
called by 378
static/js/ace.js
e
called by 270
static/js/ace.js
o
called by 124
static/js/ace.js
exec
called by 62
pkg/client/client.go
a
called by 49
static/js/ace.js
badRequest
called by 47
pkg/api/helpers.go
n
called by 44
static/js/jquery.js
e
called by 33
static/js/ext-language_tools.js

Shape

Function 455
Method 74
Struct 29
TypeAlias 1

Languages

Go58%
TypeScript42%

Modules by API surface

static/js/app.js92 symbols
static/js/jquery.js63 symbols
static/js/ace.js48 symbols
pkg/client/client.go41 symbols
pkg/client/client_test.go40 symbols
pkg/api/api.go34 symbols
static/js/ext-language_tools.js16 symbols
pkg/client/tunnel.go14 symbols
pkg/cli/cli.go14 symbols
pkg/api/helpers.go14 symbols
pkg/client/result.go12 symbols
pkg/api/session_manager.go12 symbols

Dependencies from manifests, versioned

github.com/ScaleFT/sshkeysv0.0.0-2020032717312 · 1×
github.com/beorn7/perksv1.0.1 · 1×
github.com/cespare/xxhash/v2v2.2.0 · 1×
github.com/chenzhuoyu/base64xv0.0.0-2022111506244 · 1×
github.com/dchest/bcrypt_pbkdfv0.0.0-2015020518454 · 1×
github.com/gin-contrib/ssev0.1.0 · 1×
github.com/go-playground/localesv0.14.1 · 1×

Datastores touched

dbnameDatabase · 1 repos
dbDatabase · 1 repos
db1Database · 1 repos
db2Database · 1 repos
db3Database · 1 repos
barDatabase · 1 repos
foobar2Database · 1 repos
pgwebDatabase · 1 repos

For agents

$ claude mcp add pgweb \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact