{"id":14968836,"url":"https://github.com/nedpals/supabase-go","last_synced_at":"2025-04-14T08:57:55.401Z","repository":{"id":57607010,"uuid":"369544492","full_name":"nedpals/supabase-go","owner":"nedpals","description":"Unofficial Supabase client library for Go.","archived":false,"fork":false,"pushed_at":"2024-12-16T05:47:26.000Z","size":58,"stargazers_count":411,"open_issues_count":25,"forks_count":75,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-07T02:08:19.049Z","etag":null,"topics":["api","golang","postgrest","supabase","supabase-client"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/nedpals/supabase-go","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/nedpals.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"FUNDING.yml","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},"funding":{"github":["nedpals"]}},"created_at":"2021-05-21T13:28:52.000Z","updated_at":"2025-04-01T19:05:01.000Z","dependencies_parsed_at":"2023-10-24T00:26:35.368Z","dependency_job_id":"ce33708b-eca7-47eb-b844-31285c4a617f","html_url":"https://github.com/nedpals/supabase-go","commit_stats":{"total_commits":41,"total_committers":20,"mean_commits":2.05,"dds":0.5121951219512195,"last_synced_commit":"c68284a5335a529c70ed6331aa543d655f379e05"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nedpals%2Fsupabase-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nedpals%2Fsupabase-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nedpals%2Fsupabase-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nedpals%2Fsupabase-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nedpals","download_url":"https://codeload.github.com/nedpals/supabase-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852124,"owners_count":21171839,"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":["api","golang","postgrest","supabase","supabase-client"],"created_at":"2024-09-24T13:40:39.798Z","updated_at":"2025-04-14T08:57:55.366Z","avatar_url":"https://github.com/nedpals.png","language":"Go","funding_links":["https://github.com/sponsors/nedpals"],"categories":[],"sub_categories":[],"readme":"\u003e **This project is looking for a new home.**  See the [issue](https://github.com/nedpals/supabase-go/issues/67) for details.\n\n# supabase-go\n\nUnofficial [Supabase](https://supabase.io) client for Go. It is an amalgamation of all the libraries similar to the [official Supabase client](https://supabase.io/docs/reference/javascript/supabase-client).\n\n## Installation\n\n```\ngo get github.com/nedpals/supabase-go\n```\n\n## Usage\n\nReplace the `\u003cSUPABASE-URL\u003e` and `\u003cSUPABASE-KEY\u003e` placeholders with values from `https://supabase.com/dashboard/project/YOUR_PROJECT/settings/api`\n\n### Authenticate\n\n```go\npackage main\nimport (\n    supa \"github.com/nedpals/supabase-go\"\n    \"fmt\"\n    \"context\"\n)\n\nfunc main() {\n  supabaseUrl := \"\u003cSUPABASE-URL\u003e\"\n  supabaseKey := \"\u003cSUPABASE-KEY\u003e\"\n  supabase := supa.CreateClient(supabaseUrl, supabaseKey)\n\n  ctx := context.Background()\n  user, err := supabase.Auth.SignUp(ctx, supa.UserCredentials{\n    Email:    \"example@example.com\",\n    Password: \"password\",\n  })\n  if err != nil {\n    panic(err)\n  }\n\n  fmt.Println(user)\n}\n```\n\n### Sign-In\n\n```go\npackage main\nimport (\n    supa \"github.com/nedpals/supabase-go\"\n    \"fmt\"\n    \"context\"\n)\n\nfunc main() {\n  supabaseUrl := \"\u003cSUPABASE-URL\u003e\"\n  supabaseKey := \"\u003cSUPABASE-KEY\u003e\"\n  supabase := supa.CreateClient(supabaseUrl, supabaseKey)\n\n  ctx := context.Background()\n  user, err := supabase.Auth.SignIn(ctx, supa.UserCredentials{\n    Email:    \"example@example.com\",\n    Password: \"password\",\n  })\n  if err != nil {\n    panic(err)\n  }\n\n  fmt.Println(user)\n}\n```\n\n### Insert\n\n```go\npackage main\nimport (\n    supa \"github.com/nedpals/supabase-go\"\n    \"fmt\"\n)\n\ntype Country struct {\n  ID      int    `json:\"id\"`\n  Name    string `json:\"name\"`\n  Capital string `json:\"capital\"`\n}\n\nfunc main() {\n  supabaseUrl := \"\u003cSUPABASE-URL\u003e\"\n  supabaseKey := \"\u003cSUPABASE-KEY\u003e\"\n  supabase := supa.CreateClient(supabaseUrl, supabaseKey)\n\n  row := Country{\n    ID:      5,\n    Name:    \"Germany\",\n    Capital: \"Berlin\",\n  }\n\n  var results []Country\n  err := supabase.DB.From(\"countries\").Insert(row).Execute(\u0026results)\n  if err != nil {\n    panic(err)\n  }\n\n  fmt.Println(results) // Inserted rows\n}\n```\n\n### Select\n\n```go\npackage main\nimport (\n    supa \"github.com/nedpals/supabase-go\"\n    \"fmt\"\n)\n\nfunc main() {\n  supabaseUrl := \"\u003cSUPABASE-URL\u003e\"\n  supabaseKey := \"\u003cSUPABASE-KEY\u003e\"\n  supabase := supa.CreateClient(supabaseUrl, supabaseKey)\n\n  var results map[string]interface{}\n  err := supabase.DB.From(\"countries\").Select(\"*\").Single().Execute(\u0026results)\n  if err != nil {\n    panic(err)\n  }\n\n  fmt.Println(results) // Selected rows\n}\n```\n\n### Update\n\n```go\npackage main\nimport (\n    supa \"github.com/nedpals/supabase-go\"\n    \"fmt\"\n)\n\ntype Country struct {\n  Name    string `json:\"name\"`\n  Capital string `json:\"capital\"`\n}\n\nfunc main() {\n  supabaseUrl := \"\u003cSUPABASE-URL\u003e\"\n  supabaseKey := \"\u003cSUPABASE-KEY\u003e\"\n  supabase := supa.CreateClient(supabaseUrl, supabaseKey)\n\n  row := Country{\n    Name:    \"France\",\n    Capital: \"Paris\",\n  }\n\n  var results map[string]interface{}\n  err := supabase.DB.From(\"countries\").Update(row).Eq(\"id\", \"5\").Execute(\u0026results)\n  if err != nil {\n    panic(err)\n  }\n\n  fmt.Println(results) // Updated rows\n}\n```\n\n### Delete\n\n```go\npackage main\nimport (\n    supa \"github.com/nedpals/supabase-go\"\n    \"fmt\"\n)\n\nfunc main() {\n  supabaseUrl := \"\u003cSUPABASE-URL\u003e\"\n  supabaseKey := \"\u003cSUPABASE-KEY\u003e\"\n  supabase := supa.CreateClient(supabaseUrl, supabaseKey)\n\n  var results map[string]interface{}\n  err := supabase.DB.From(\"countries\").Delete().Eq(\"name\", \"France\").Execute(\u0026results)\n  if err != nil {\n    panic(err)\n  }\n\n  fmt.Println(results) // Empty - nothing returned from delete\n}\n```\n\n### Invite user by email\n\n```go\npackage main\nimport (\n    supa \"github.com/nedpals/supabase-go\"\n    \"fmt\"\n    \"context\"\n)\n\nfunc main() {\n  supabaseUrl := \"\u003cSUPABASE-URL\u003e\"\n  supabaseKey := \"\u003cSUPABASE-KEY\u003e\"\n  supabase := supa.CreateClient(supabaseUrl, supabaseKey)\n\n  ctx := context.Background()\n  user, err := supabase.Auth.InviteUserByEmail(ctx, email)\n  if err != nil {\n    panic(err)\n  }\n\n  // or if you want to setup some metadata\n  data := map[string]interface{}{ \"invitedBy\": \"someone\" }\n  redirectTo := \"https://your_very_successful_app.com/signup\"\n  user, err = supabase.Auth.InviteUserByEmailWithData(ctx, email, data, redirectTo)\n  if err != nil {\n    panic(err)\n  }\n\n  fmt.Println(user)\n}\n```\n\n## Roadmap\n\n- [x] Auth support (1)\n- [x] DB support (2)\n- [ ] Realtime\n- [x] Storage\n- [ ] Testing\n\n(1) - Thin API wrapper. Does not rely on the GoTrue library for simplicity\n(2) - Through `postgrest-go`\n\nI just implemented features which I actually needed for my project for now. If you like to implement these features, feel free to submit a pull request as stated in the [Contributing](#contributing) section below.\n\n## Design Goals\n\nIt tries to mimick as much as possible the official Javascript client library in terms of ease-of-use and in setup process.\n\n# Contributing\n\n## Submitting a pull request\n\n- Fork it (https://github.com/nedpals/supabase-go/fork)\n- Create your feature branch (git checkout -b my-new-feature)\n- Commit your changes (git commit -am 'Add some feature')\n- Push to the branch (git push origin my-new-feature)\n- Create a new Pull Request\n\n# Contributors\n\n- [nedpals](https://github.com/nedpals) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnedpals%2Fsupabase-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnedpals%2Fsupabase-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnedpals%2Fsupabase-go/lists"}