{"id":14968766,"url":"https://github.com/supabase/setup-cli","last_synced_at":"2025-05-16T13:07:10.393Z","repository":{"id":53765207,"uuid":"520893105","full_name":"supabase/setup-cli","owner":"supabase","description":"A GitHub action for interacting with your Supabase projects using the CLI.","archived":false,"fork":false,"pushed_at":"2025-04-22T06:48:17.000Z","size":816,"stargazers_count":139,"open_issues_count":18,"forks_count":18,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-05-08T09:23:44.406Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/supabase.png","metadata":{"funding":{"github":["supabase"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-03T13:31:58.000Z","updated_at":"2025-05-04T14:09:25.000Z","dependencies_parsed_at":"2025-01-20T12:01:59.091Z","dependency_job_id":"7c4bbe6b-ff87-4bcf-bd97-6fe3bbc889ed","html_url":"https://github.com/supabase/setup-cli","commit_stats":{"total_commits":240,"total_committers":10,"mean_commits":24.0,"dds":0.1958333333333333,"last_synced_commit":"7c6d72a8c2fea26067db1b32c7fc301ae189f493"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fsetup-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fsetup-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fsetup-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fsetup-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supabase","download_url":"https://codeload.github.com/supabase/setup-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253805983,"owners_count":21967078,"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":[],"created_at":"2024-09-24T13:40:30.983Z","updated_at":"2025-05-16T13:07:10.363Z","avatar_url":"https://github.com/supabase.png","language":"TypeScript","funding_links":["https://github.com/sponsors/supabase"],"categories":["TypeScript"],"sub_categories":[],"readme":"# :gear: Supabase CLI Action\n\n![](https://github.com/supabase/setup-cli/workflows/build-test/badge.svg)\n![](https://github.com/supabase/setup-cli/workflows/CodeQL/badge.svg)\n\n## About\n\nThis action sets up the Supabase CLI, [`supabase`](https://github.com/supabase/cli), on GitHub's hosted Actions runners. Other CI runners like [BitBucket](https://bitbucket.org/supabase-cli/setup-cli/src/master/bitbucket-pipelines.yml) and [GitLab](https://gitlab.com/sweatybridge/setup-cli/-/blob/main/.gitlab-ci.yml) are supported via their respective pipelines.\n\nThis action can be run on `ubuntu-latest`, `windows-latest`, and `macos-latest` GitHub Actions runners, and will install and expose a specified version of the `supabase` CLI on the runner environment.\n\n## Usage\n\nSetup the `supabase` CLI:\n\n```yaml\nsteps:\n  - uses: supabase/setup-cli@v1\n```\n\nA specific version of the `supabase` CLI can be installed:\n\n```yaml\nsteps:\n  - uses: supabase/setup-cli@v1\n    with:\n      version: 2.20.3\n```\n\nRun `supabase db start` to execute all migrations on a fresh database:\n\n```yaml\nsteps:\n  - uses: supabase/setup-cli@v1\n    with:\n      version: latest\n  - run: supabase init\n  - run: supabase db start\n```\n\nSince Supabase CLI relies on Docker Engine API, additional setup may be required on Windows and macOS runners.\n\n## Inputs\n\nThe actions supports the following inputs:\n\n| Name      | Type   | Description                        | Default  | Required |\n| --------- | ------ | ---------------------------------- | -------- | -------- |\n| `version` | String | Supabase CLI version (or `latest`) | `2.20.3` | false    |\n\n## Advanced Usage\n\nCheck generated TypeScript types are up-to-date with Postgres schema:\n\n```yaml\nsteps:\n  - uses: supabase/setup-cli@v1\n  - run: supabase init\n  - run: supabase db start\n  - name: Verify generated types match Postgres schema\n    run: |\n      supabase gen types typescript --local \u003e schema.gen.ts\n      if ! git diff --ignore-space-at-eol --exit-code --quiet schema.gen.ts; then\n        echo \"Detected uncommitted changes after build. See status below:\"\n        git diff\n        exit 1\n      fi\n```\n\nRelease job to push schema changes to a Supabase project:\n\n```yaml\nenv:\n  SUPABASE_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}\n  SUPABASE_DB_PASSWORD: ${{ secrets.DB_PASSWORD }}\n  # Retrieve \u003cproject-id\u003e from dashboard url: https://app.supabase.com/project/\u003cproject-id\u003e\n  PROJECT_ID: \u003cproject-id\u003e\n\n steps:\n   - uses: supabase/setup-cli@v1\n   - run: supabase link --project-ref $PROJECT_ID\n   - run: supabase db push\n```\n\n## Develop\n\n\u003e Requires `node \u003e= 16`\n\nInstall the dependencies\n\n```bash\n$ npm install\n```\n\nBuild the typescript and package it for distribution\n\n```bash\n$ npm run build \u0026\u0026 npm run package\n```\n\nRun the tests :heavy_check_mark:\n\n```bash\n$ npm test\n\n PASS  __tests__/main.test.ts\n  ✓ gets download url to binary (3 ms)\n  ✓ test runs (891 ms)\n\n...\n```\n\n## Publish to a distribution branch\n\nActions are run from GitHub repos so we will checkin the packed dist folder.\n\n1. Create a new GitHub release\n2. Rebase `v1` branch on `main`\n\nYour action is now published! :rocket:\n\nSee the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)\n\n## Validate\n\nYou can now validate the action by referencing `./` in a workflow in your repo (see [test.yml](.github/workflows/test.yml))\n\n```yaml\nuses: ./\nwith:\n  version: latest\n```\n\nSee the [actions tab](https://github.com/actions/typescript-action/actions) for runs of this action! :rocket:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase%2Fsetup-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupabase%2Fsetup-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase%2Fsetup-cli/lists"}