{"id":51100747,"url":"https://github.com/primitivedotdev/setup-primitive","last_synced_at":"2026-06-24T10:30:33.035Z","repository":{"id":363790620,"uuid":"1260617255","full_name":"primitivedotdev/setup-primitive","owner":"primitivedotdev","description":"Set up the primitive.dev CLI in a GitHub Actions workflow","archived":false,"fork":false,"pushed_at":"2026-06-05T17:29:39.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-10T11:33:54.526Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://primitive.dev","language":null,"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/primitivedotdev.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-05T17:27:43.000Z","updated_at":"2026-06-05T17:29:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/primitivedotdev/setup-primitive","commit_stats":null,"previous_names":["primitivedotdev/setup-primitive"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/primitivedotdev/setup-primitive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primitivedotdev%2Fsetup-primitive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primitivedotdev%2Fsetup-primitive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primitivedotdev%2Fsetup-primitive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primitivedotdev%2Fsetup-primitive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/primitivedotdev","download_url":"https://codeload.github.com/primitivedotdev/setup-primitive/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primitivedotdev%2Fsetup-primitive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34726584,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"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":[],"created_at":"2026-06-24T10:30:31.133Z","updated_at":"2026-06-24T10:30:33.021Z","avatar_url":"https://github.com/primitivedotdev.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Setup Primitive CLI\n\nGitHub Action that installs the [primitive.dev](https://primitive.dev) CLI (`@primitivedotdev/cli`) and configures auth, so subsequent steps can run `primitive …` (or `prim …`) directly. The companion to [`deploy-function`](https://github.com/primitivedotdev/deploy-function) and [`send-email`](https://github.com/primitivedotdev/send-email): one setup step unlocks the **whole** CLI surface in CI — no per-command Action needed.\n\nRequires Node.js on the runner (GitHub-hosted runners have it by default; otherwise run `actions/setup-node` first).\n\n## Quick start\n\n```yaml\n- uses: primitivedotdev/setup-primitive@v0\n  with:\n    api-key: ${{ secrets.PRIMITIVE_API_KEY }}\n\n# Any later step can now use the CLI — it reads PRIMITIVE_API_KEY from the env:\n- run: primitive emails-wait --to inbox@yourdomain.com --timeout 60\n- run: primitive send --from ci@yourdomain.com --to you@example.com --subject hi --text \"done\"\n```\n\n## Inputs\n\n| Input | Required | Default | Description |\n|---|---|---|---|\n| `api-key` | no | — | Org-scoped Primitive API key. Masked and exported as `PRIMITIVE_API_KEY` for subsequent steps. Pass via `${{ secrets.* }}`. Omit only if a later step supplies auth another way. |\n| `api-base-url` | no | `https://api.primitive.dev/v1` | Exported as `PRIMITIVE_API_BASE_URL`. Override only for a non-production environment. |\n| `version` | no | `latest` | npm version spec of `@primitivedotdev/cli` — `1` (latest 1.x), `1.0.1` (exact), or `latest`. **Pin for reproducible CI.** |\n| `verify` | no | `true` | Run `primitive whoami` after install to fail fast on a bad/expired key and populate the outputs. Requires `api-key`. |\n\n## Outputs\n\n| Output | Description |\n|---|---|\n| `cli-version` | The installed CLI version string. |\n| `org-id` | Account/org id of the authenticated key (set only when `verify` ran). |\n| `email` | Account email of the authenticated key (set only when `verify` ran). |\n\n## What it does\n\n1. `npm install -g @primitivedotdev/cli@\u003cversion\u003e`.\n2. Masks `api-key` and exports `PRIMITIVE_API_KEY` (+ `PRIMITIVE_API_BASE_URL`) to `$GITHUB_ENV`, so every later step in the job sees them — the CLI reads `PRIMITIVE_API_KEY` automatically.\n3. (When `verify` is on and a key is set) runs `primitive whoami` to confirm the key works before your real steps run, and exposes `org-id` / `email`.\n\n## Examples\n\n### Pin a version + use the org-id output\n\n```yaml\n- uses: primitivedotdev/setup-primitive@v0\n  id: primitive\n  with:\n    api-key: ${{ secrets.PRIMITIVE_API_KEY }}\n    version: \"1\"\n- run: echo \"Using primitive CLI ${{ steps.primitive.outputs.cli-version }} as org ${{ steps.primitive.outputs.org-id }}\"\n```\n\n### Install only (auth handled elsewhere)\n\n```yaml\n- uses: primitivedotdev/setup-primitive@v0\n  with:\n    verify: 'false'   # no api-key → just install the CLI\n- run: primitive login   # or set PRIMITIVE_API_KEY yourself before CLI calls\n```\n\n## Why a setup Action (vs. one Action per command)\n\n`deploy-function` and `send-email` are typed Node Actions for the two most common CI jobs-to-be-done. `setup-primitive` is the foundation: rather than publishing a thin Action per CLI verb, install the CLI once and run any `primitive …` command in plain `run:` steps. It also scales for free — new CLI commands are usable in CI the moment they ship, with no new Action release. Same model as `actions/setup-node` + raw `node`.\n\n## Security\n\n- `api-key` is masked. Pass it as a GitHub secret (`${{ secrets.* }}`) — never hard-code.\n- All inputs are passed to the shell via `env:` (not inline interpolation), so a crafted input can't inject shell commands.\n\n## Versioning\n\n- Floating major tag `v0` tracks the latest 0.x. Pin `v0.1.0` for reproducible runs.\n\n## Source\n\nAuthored in [primitivedotdev/primitive-mono-repo](https://github.com/primitivedotdev/primitive-mono-repo) under `tools/actions/setup-primitive/` and mirrored here on release tags. See [RELEASING.md](./RELEASING.md).\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimitivedotdev%2Fsetup-primitive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprimitivedotdev%2Fsetup-primitive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimitivedotdev%2Fsetup-primitive/lists"}