{"id":27111813,"url":"https://github.com/crgimenes/dbv","last_synced_at":"2026-04-13T06:06:45.332Z","repository":{"id":285300868,"uuid":"957079021","full_name":"crgimenes/dbv","owner":"crgimenes","description":"Terminal-based PostgreSQL viewer and editor designed for fast browsing, quick edits, and easy data handling.","archived":false,"fork":false,"pushed_at":"2025-04-06T22:28:30.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"trunk","last_synced_at":"2025-04-06T23:24:21.960Z","etag":null,"topics":["cli","database","editor","go","json","lua","postgresql","sql","terminal","viewer"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crgimenes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-29T14:02:48.000Z","updated_at":"2025-04-06T22:25:44.000Z","dependencies_parsed_at":"2025-04-06T23:20:45.489Z","dependency_job_id":null,"html_url":"https://github.com/crgimenes/dbv","commit_stats":null,"previous_names":["crgimenes/dbv"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crgimenes%2Fdbv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crgimenes%2Fdbv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crgimenes%2Fdbv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crgimenes%2Fdbv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crgimenes","download_url":"https://codeload.github.com/crgimenes/dbv/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247575503,"owners_count":20960785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","database","editor","go","json","lua","postgresql","sql","terminal","viewer"],"created_at":"2025-04-07T01:24:53.867Z","updated_at":"2026-04-13T06:06:45.325Z","avatar_url":"https://github.com/crgimenes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dbv – Terminal-Based Database Viewer\n\n⚠️ This software is currently under active development. Until version 1.0 is released, significant changes may occur, and features may be altered or removed without prior notice. Use in production environments with caution.\n\n**dbv** is a fast and user-friendly terminal database viewer and editor that connects to SQL databases (with a focus on PostgreSQL). It provides a text-based interface for listing tables, browsing records, editing cells, generating SQL INSERT statements, creating Go struct definitions, exporting data to JSON, and more.\n\n## Features\n\n- **List Tables \u0026 Views**: Displays tables, views, and materialized views along with primary keys and approximate sizes.\n- **Data Browsing**: Scroll through table records with built-in pagination.\n- **Cell Editing**: Edit cell values directly with automatic conversions for timestamps and numeric types.\n- **Insert Statement Generation**: Create template SQL INSERT statements that include default values and respect primary key order.\n- **Go Struct Generation**: Generate Go struct definitions based on table columns (mapping PostgreSQL types to Go types).\n- **JSON Export**: Convert table rows into JSON structures.\n- **Lua Configuration**: Configure database connections using Lua scripts (e.g., `init.lua`).\n- **Keyboard Shortcuts**: Navigate, filter, and execute commands with quick key bindings.\n\n## Requirements\n\n- **Go 1.23** or later\n\n## Installation\n\n### 1. Building from Source\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/crgimenes/dbv.git\n   cd dbv\n   ```\n2. Build the binary:\n   ```bash\n   go build -o dbv\n   ```\n3. Move the binary to a directory in your PATH (for example, `/usr/local/bin`):\n   ```bash\n   mv dbv /usr/local/bin/\n   ```\n4. Run the application by simply typing:\n   ```bash\n   dbv\n   ```\n\n### 2. Installing via GitHub Releases\n\nYou can also download the pre-built binaries from the [GitHub Releases](https://github.com/crgimenes/dbv/releases) page. After downloading the appropriate binary for your operating system, place it in a directory that's in your PATH.\n\n## Configuration\n\nBy default, dbv loads database connections from a Lua file named `init.lua`. Place this file in either `~/.config/dbv/init.lua` or in the current directory. For example:\n\n```lua\nDataBases = {\n    {\n        title = \"LocalDB\",\n        url   = \"postgres://username:password@localhost:5432/mydb?sslmode=disable\"\n    },\n    {\n        title = \"OtherDB\",\n        url   = \"postgres://user:pass@server:5432/otherdb?sslmode=disable\"\n    }\n}\n```\n\n## Usage\n\n### Launching dbv\n\nAfter installing, simply run:\n```bash\ndbv\n```\n\n### Functionality\n\n- **Table Listing \u0026 Filtering**: Easily navigate and filter available tables.\n- **Data Viewing \u0026 Editing**: Scroll through records, edit cells, and generate SQL/struct/JSON using quick commands.\n- **Commands**: Use `:where`, `:insert`, `:struct`, and `:json` to interact with data.\n\n### Keyboard Shortcuts\n\n- `h`, `j`, `k`, `l`: Navigation\n- `e`, `v`, `p`: Edit/view the current cell\n- `:`: Open the command prompt\n- `q` or `Esc`: Exit\n\n## Examples\n\n### Building from Source\n\n```bash\ngit clone https://github.com/crgimenes/dbv.git\ncd dbv\ngo build -o dbv\nmv dbv /usr/local/bin/\nmkdir -p ~/.config/dbv\ncat \u003c\u003cEOF \u003e ~/.config/dbv/init.lua\nDataBases = {\n    {\n        title = \"LocalTest\",\n        url   = \"postgres://postgres:mysecret@localhost:5432/mytestdb?sslmode=disable\"\n    }\n}\nEOF\ndbv\n```\n\n### Using GitHub Releases\n\n1. Download the appropriate binary from the [GitHub Releases](https://github.com/crgimenes/dbv/releases) page.\n2. Place the binary in a directory that is in your PATH.\n3. Run the application by typing:\n   ```bash\n   dbv\n   ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrgimenes%2Fdbv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrgimenes%2Fdbv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrgimenes%2Fdbv/lists"}