{"id":45573215,"url":"https://github.com/rbright/nix-codex","last_synced_at":"2026-05-27T03:10:52.605Z","repository":{"id":339982748,"uuid":"1164054785","full_name":"rbright/nix-codex","owner":"rbright","description":"Nix package for Codex CLI","archived":false,"fork":false,"pushed_at":"2026-04-11T06:44:00.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-11T08:25:44.327Z","etag":null,"topics":["codex","codex-cli","nix","nix-flake"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbright.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-02-22T15:17:10.000Z","updated_at":"2026-04-11T06:43:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"dfe3a01a-cb14-4a68-b5d1-bb0a56201e17","html_url":"https://github.com/rbright/nix-codex","commit_stats":null,"previous_names":["rbright/nix-codex"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/rbright/nix-codex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbright%2Fnix-codex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbright%2Fnix-codex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbright%2Fnix-codex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbright%2Fnix-codex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbright","download_url":"https://codeload.github.com/rbright/nix-codex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbright%2Fnix-codex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31869050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"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":["codex","codex-cli","nix","nix-flake"],"created_at":"2026-02-23T08:28:55.521Z","updated_at":"2026-04-16T03:00:59.912Z","avatar_url":"https://github.com/rbright.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nix-codex\n\n[![CI](https://github.com/rbright/nix-codex/actions/workflows/ci.yml/badge.svg)](https://github.com/rbright/nix-codex/actions/workflows/ci.yml)\n\nNix package for Codex CLI.\n\nSource: [`openai/codex`](https://github.com/openai/codex).\n\n## What this repo provides\n\n- Nix package: `codex` (binary: `codex`)\n- Nix app output: `.#codex`\n- Scripted updater for version/source hash pin refresh\n- Scheduled GitHub Actions updater that opens auto-mergeable PRs\n- Automated GitHub release creation on `codex` version bumps\n- Local quality gate (`just`) and GitHub Actions CI\n\n## Quickstart\n\n```sh\n# list commands\njust --list\n\n# full local validation gate\njust check\n\n# run the packaged binary\njust run --help\n```\n\n## Build and run\n\n```sh\nnix build -L 'path:.#codex'\nnix run 'path:.#codex' -- --help\n```\n\nSuccess criteria:\n\n- `nix build` exits `0`\n- `nix run` prints `codex` CLI usage output\n\n## Update workflow\n\n```sh\n# latest stable rust-vX.Y.Z tag from openai/codex\njust update\n\n# explicit version forms are accepted\njust update 0.104.0\njust update v0.104.0\njust update rust-v0.104.0\n```\n\n`./scripts/update-package.sh` updates:\n\n- `version`\n- `src.hash`\n- `Cargo.lock` (from upstream `codex-rs`)\n\nOnly full release versions are accepted (`X.Y.Z`). Pre-release tags (for example\n`rust-v0.105.0-alpha.1`) are ignored/rejected.\n\n### Updater prerequisites\n\n- `curl`\n- `git`\n- `jq`\n- `nix`\n- `perl`\n- `tar`\n\nCheck script usage:\n\n```sh\n./scripts/update-package.sh --help\n```\n\n## Automated GitHub updates\n\nWorkflow: `.github/workflows/update-codex.yml`\n\n- Runs every 6 hours and on manual dispatch.\n- Detects the latest stable upstream `rust-vX.Y.Z` tag from `openai/codex`.\n- Ignores pre-release tags (alpha/beta/rc) and rejects non-`X.Y.Z` manual overrides.\n- If newer than `package.nix`, runs `scripts/update-package.sh`, then runs `just validate-update` before opening/updating a PR.\n- `just validate-update` performs lightweight linting plus `nix build --dry-run 'path:.#codex'`.\n- Leaves the full `just build` compile to the normal PR CI workflow.\n- Enables auto-merge (`squash`) for that PR.\n\n### One-time repository setup\n\n1. Add repo secret `CODEX_UPDATER_TOKEN` (fine-grained PAT scoped to this repo):\n   - **Contents**: Read and write\n   - **Pull requests**: Read and write\n2. In repository settings → **Actions → General**:\n   - Set workflow permissions to **Read and write permissions**.\n   - Enable **Allow GitHub Actions to create and approve pull requests**.\n3. Ensure branch protection/required checks allow auto-merge after CI passes.\n\nManual trigger:\n\n- Actions → **Update codex package** → **Run workflow**\n- Optional input: `version` (accepts `0.x.y`, `v0.x.y`, or `rust-v0.x.y`)\n\n## Automated GitHub releases\n\nWorkflow: `.github/workflows/release-codex.yml`\n\n- Runs on pushes to `main` when `package.nix` changes.\n- Compares previous and current `package.nix` `version` values.\n- Creates a GitHub release + tag named `v\u003cversion\u003e` only when the packaged version changes.\n- Skips docs-only merges and other changes that do not modify `package.nix` version.\n\nNo extra secret is required; it uses the workflow `GITHUB_TOKEN` with `contents: write`.\n\n## Linting and checks\n\n```sh\njust fmt\njust fmt-check\njust lint\njust check\n```\n\n`just lint` runs:\n\n- `statix`\n- `deadnix`\n- `nixfmt --check`\n- `shellcheck`\n\n## Use from another flake\n\n```nix\n{\n  inputs.nixCodex.url = \"github:rbright/nix-codex\";\n\n  outputs = { self, nixpkgs, nixCodex, ... }: {\n    nixosConfigurations.my-host = nixpkgs.lib.nixosSystem {\n      system = \"x86_64-linux\";\n      modules = [\n        ({ pkgs, ... }: {\n          environment.systemPackages = [\n            nixCodex.packages.${pkgs.system}.codex\n          ];\n        })\n      ];\n    };\n  };\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbright%2Fnix-codex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbright%2Fnix-codex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbright%2Fnix-codex/lists"}