pgweb/README.md

110 lines
3.1 KiB
Markdown
Raw Normal View History

2014-10-08 21:29:43 -05:00
# pgweb
2023-02-15 22:04:37 -06:00
Simple web-based and cross platform PostgreSQL database explorer.
2014-10-08 21:29:43 -05:00
2015-05-18 16:28:05 -05:00
[![Release](https://img.shields.io/github/release/sosedoff/pgweb.svg?label=Release)](https://github.com/sosedoff/pgweb/releases)
2021-12-25 11:41:30 -06:00
[![Linux Build](https://github.com/sosedoff/pgweb/actions/workflows/checks.yml/badge.svg)](https://github.com/sosedoff/pgweb/actions?query=branch%3Amaster)
[![Go Report Card](https://goreportcard.com/badge/github.com/sosedoff/pgweb)](https://goreportcard.com/report/github.com/sosedoff/pgweb)
[![GoDoc](https://godoc.org/github.com/sosedoff/pgweb?status.svg)](https://godoc.org/github.com/sosedoff/pgweb)
2018-11-19 18:18:29 -06:00
[![Docker Pulls](https://img.shields.io/docker/pulls/sosedoff/pgweb.svg)](https://hub.docker.com/r/sosedoff/pgweb/)
2014-10-27 22:12:56 -05:00
2014-10-13 21:02:04 -05:00
## Overview
2023-02-15 22:04:37 -06:00
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.
2014-10-13 21:02:04 -05:00
2015-06-03 20:33:01 -05:00
[See application screenshots](SCREENS.md)
2014-10-14 11:34:22 -05:00
2014-12-29 20:03:35 -06:00
## Features
2014-10-23 09:11:40 -06:00
2023-02-15 22:04:37 -06:00
- 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.
2014-10-23 09:11:40 -06:00
2023-02-15 22:04:37 -06:00
Visit [WIKI](https://github.com/sosedoff/pgweb/wiki) for more details.
2018-12-12 21:08:34 -06:00
2016-01-10 15:41:07 -06:00
## Demo
2023-02-15 22:04:37 -06:00
Visit https://pgweb-demo.fly.dev/ to see Pgweb in action.
2016-01-10 15:41:07 -06:00
2014-12-10 23:41:45 -06:00
## Installation
2014-10-29 11:58:32 -07:00
2023-02-15 22:04:37 -06:00
- [Precompiled binaries](https://github.com/sosedoff/pgweb/releases) for supported operating systems are available.
2020-10-18 10:14:04 -05:00
- [More installation options](https://github.com/sosedoff/pgweb/wiki/Installation)
2014-12-10 23:43:17 -06:00
2014-10-08 21:29:43 -05:00
## Usage
2014-10-13 21:03:42 -05:00
Start server:
2014-11-07 18:12:08 -06:00
```
pgweb
```
You can also provide connection flags:
2014-10-13 21:03:42 -05:00
```
2014-10-14 10:52:40 -05:00
pgweb --host localhost --user myuser --db mydb
2014-10-13 21:03:42 -05:00
```
2014-11-07 18:12:08 -06:00
Connection URL scheme is also supported:
2014-10-13 21:02:04 -05:00
```
2014-11-07 18:12:08 -06:00
pgweb --url postgres://user:password@host:port/database?sslmode=[mode]
pgweb --url "postgres:///database?host=/absolute/path/to/unix/socket/dir"
2014-10-13 21:02:04 -05:00
```
2016-01-10 15:41:07 -06:00
### Multiple database sessions
To enable multiple database sessions in pgweb, start the server with:
```
pgweb --sessions
```
Or set environment variable:
```
2023-02-15 22:04:37 -06:00
PGWEB_SESSIONS=1 pgweb
2016-01-10 15:41:07 -06:00
```
## Testing
2015-06-03 20:43:22 -05:00
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
```
2016-01-21 20:01:53 -06:00
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
```
2014-12-29 20:03:35 -06:00
## Contribute
2014-11-07 18:12:08 -06:00
2015-06-03 20:43:22 -05:00
- 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](https://github.com/sosedoff/pgweb/issues) for any questions
- Check [wiki](https://github.com/sosedoff/pgweb/wiki) for extra documentation
2014-11-03 14:35:56 +08:00
2014-10-13 21:02:04 -05:00
## License
The MIT License (MIT). See [LICENSE](LICENSE) file for more details.