{"id":30956085,"url":"https://github.com/martiinii/local-sql","last_synced_at":"2025-09-11T12:07:08.430Z","repository":{"id":297513506,"uuid":"996393349","full_name":"martiinii/local-sql","owner":"martiinii","description":"A Database GUI in your browser straight from your CLI. It currently supports connecting to Postgres.","archived":false,"fork":false,"pushed_at":"2025-08-03T11:35:14.000Z","size":540,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-07T21:59:52.023Z","etag":null,"topics":["database-management","gui"],"latest_commit_sha":null,"homepage":"https://localsql.dev","language":"TypeScript","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/martiinii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2025-06-04T22:19:24.000Z","updated_at":"2025-08-29T22:22:03.000Z","dependencies_parsed_at":"2025-06-22T12:21:27.454Z","dependency_job_id":"9bf08754-a970-48a6-bcd1-daf3e7c21c5a","html_url":"https://github.com/martiinii/local-sql","commit_stats":null,"previous_names":["martiinii/local-sql"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/martiinii/local-sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martiinii%2Flocal-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martiinii%2Flocal-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martiinii%2Flocal-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martiinii%2Flocal-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martiinii","download_url":"https://codeload.github.com/martiinii/local-sql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martiinii%2Flocal-sql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274632631,"owners_count":25321251,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["database-management","gui"],"created_at":"2025-09-11T12:03:55.833Z","updated_at":"2025-09-11T12:07:08.413Z","avatar_url":"https://github.com/martiinii.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"![Local SQL](https://raw.githubusercontent.com/martiinii/local-sql/main/assets/github.svg)\n\n\u003cdiv align=\"center\"\u003e\n\n[![Release](https://github.com/martiinii/local-sql/actions/workflows/release.yml/badge.svg)](https://github.com/martiinii/local-sql/actions/workflows/release.yml)\n[![NPM Version](https://img.shields.io/npm/v/local-sql)](https://www.npmjs.com/package/local-sql)\n[![GitHub License](https://img.shields.io/github/license/martiinii/local-sql)](https://github.com/martiinii/local-sql/blob/main/LICENSE.md)\n\u003c/div\u003e\n\n---\n\nLocal SQL is a web based, local-first modern database browser.\nVisit [localsql.dev](https://localsql.dev), add connection and start browsing your tables.\n\n\u003e [!IMPORTANT]\n\u003e This project is under heavy development, check TODO section for current progress. Some things can be broken, some are missing\n\n## Features\n\n- **Privacy-Focused** Your database connection details are stored exclusively in SQLite database on your computer. No sensitive data is ever transmitted to or shared with any external services - only your locally running server.\n- **Local Server** A simple command-line tool initiates a local web server, enabling secure communication between your browser and databases. This ensures all database operations are performed locally on your machine.\n- **Secure Gateway** Connect multiple `local-sql` instances together to manage all your databases from a single interface. This is perfect for accessing databases in isolated environments without exposing them publicly.\n- **Built-in Docker Image** Official Images on GHCR and Docker Hub let you containerize Local SQL and connect to non-exposed databases securely.\n- **Token-Based Authentication** Generate `read` or `write` access token to secure public instances of Local-SQL.\n\n## TODO\n\n- [x] Implement data fetching and data viewer\n- [ ] Inserting and updating data\n- [x] Implement pagination\n- [ ] Schema visualizer\n- [ ] Role based access control (per-database, improve permission: read-only, read \u0026 write, admin)\n- [ ] SQL query runner and natural-language support using AI\n- [ ] Add more database adapters\n- [ ] Add documentation\n- [ ] Theming options (tweakcn?)\n- [x] Manage existing servers \u0026 connections\n- [x] Explore different way to save connections (in browser local-storage vs server db with os app data directory)\n- [x] Server key generation (for gateways), permissions\n- [x] Better building process and CLI\n- [x] Docker image for local-sql API\n\n## Get started\n\nTry out Local SQL [online dashboard](https://localsql.dev) or run app locally:\n\n```sh\n# Bun.js\nbunx --bun local-sql@latest\n\n# pnpm\npnpm dlx local-sql@latest\n\n# Node.js\nnpx local-sql@latest\n```\n\n### CLI Options\n\n- `-V, --version`        output the version number  \n- `-p, --port \u003cnumber\u003e`  specify the app port number  \n- `--no-ui`              run API only (no web UI)  \n- `--no-api`             run web UI only (no API)  \n- `--verbose`            enable detailed logs  \n- `-h, --help`           display help for command\n\n## Docker\n\nLocal SQL (API) is also available as a Docker image on:\n\n- Github Container Registry: `ghcr.io/martiinii/local-sql:latest`\n- Docker Hub: `martiinii/local-sql:latest`\n\nUse Docker compose to run:\n\n```yml\nservices:\n  local-sql:\n    image: ghcr.io/martiinii/local-sql:latest\n    container_name: local-sql\n    restart: unless-stopped\n\n    # --- Security best-practice\n    # 1. Start the container WITHOUT REQUIRE_TOKEN to initialize.\n    # 2. Visit https://localsql.dev or start local-sql locally, connect to this instance of local-sql API and generate write token. Then edit server connection and paste generated token.\n    # 3. Uncomment the block below to enforce token authentication:\n\n    # environment:\n    #   REQUIRE_TOKEN: \"true\"\n\n    # 4. Restart the container; all connections will now require your token.\n\n    volumes:\n      - lsql:/app/db\n    ports:\n      - \"57597:57597\"\n\nvolumes:\n  lsql:\n```\n\n## Built with\n- [React](https://react.dev/)\n- [Next.js](https://nextjs.org/)\n- [Elysia](https://elysiajs.com/)\n- [shadcn/ui](https://ui.shadcn.com/)\n- [Radix Primitives](https://www.radix-ui.com/primitives)\n- [Tailwind](https://tailwindcss.com/)\n- [Zustand](https://github.com/pmndrs/zustand)\n- [Turborepo](https://turborepo.com/)\n- [drizzle-orm](https://orm.drizzle.team/)\n- [Bun](https://bun.sh/)\n- [TypeScript](https://www.typescriptlang.org/)\n\nAnd a huge thank you to the creators of the many other open-source dependencies that make this project possible.\n\n## Credits\n\n- [Etienne](https://github.com/etienne-dldc) - for generously providing `local-sql` package name\n- [check-site-meta](https://github.com/alfonsusac/check-site-meta) - inspiration for CLI tool (and Next.js standalone output to npm package)\n- [better-auth](https://www.better-auth.com/) - for awesome CI release workflow\n- [drizzle-orm](https://orm.drizzle.team/) - `drizzle-studio` was my source of inspiration for `local-sql`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartiinii%2Flocal-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartiinii%2Flocal-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartiinii%2Flocal-sql/lists"}