{"id":47830673,"url":"https://github.com/leynier/codex-dart","last_synced_at":"2026-04-03T20:11:38.293Z","repository":{"id":339512464,"uuid":"1162272127","full_name":"leynier/codex-dart","owner":"leynier","description":"Dart SDK for Codex CLI","archived":false,"fork":false,"pushed_at":"2026-02-20T04:30:47.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-20T07:17:24.798Z","etag":null,"topics":["codex","dart","flutter","flutter-desktop","openai","sdk"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/codex","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leynier.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-20T04:00:55.000Z","updated_at":"2026-02-20T04:40:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/leynier/codex-dart","commit_stats":null,"previous_names":["leynier/codex-dart"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/leynier/codex-dart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leynier%2Fcodex-dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leynier%2Fcodex-dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leynier%2Fcodex-dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leynier%2Fcodex-dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leynier","download_url":"https://codeload.github.com/leynier/codex-dart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leynier%2Fcodex-dart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31374268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","dart","flutter","flutter-desktop","openai","sdk"],"created_at":"2026-04-03T20:11:37.628Z","updated_at":"2026-04-03T20:11:38.288Z","avatar_url":"https://github.com/leynier.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# codex\n\nDart SDK for Codex.\n\nThis package wraps the `codex` CLI and exchanges JSONL events over stdin/stdout.\n\n## Installation\n\n```bash\ndart pub add codex\n```\n\n## Quickstart\n\n```dart\nimport 'package:codex/codex.dart';\n\nFuture\u003cvoid\u003e main() async {\n  final codex = Codex();\n  final thread = codex.startThread();\n\n  final turn = await thread.run('Diagnose the failing test and propose a fix.');\n  print(turn.finalResponse);\n}\n```\n\n## Streaming\n\n```dart\nimport 'package:codex/codex.dart';\n\nFuture\u003cvoid\u003e main() async {\n  final codex = Codex();\n  final thread = codex.startThread();\n\n  final streamed = await thread.runStreamed('Inspect this repo and summarize risks.');\n  await for (final event in streamed.events) {\n    if (event is ItemCompletedEvent) {\n      print(event.item.runtimeType);\n    }\n  }\n}\n```\n\n## Structured output\n\n```dart\nimport 'package:codex/codex.dart';\n\nFuture\u003cvoid\u003e main() async {\n  final codex = Codex();\n  final thread = codex.startThread();\n\n  final schema = {\n    'type': 'object',\n    'properties': {\n      'summary': {'type': 'string'},\n      'status': {\n        'type': 'string',\n        'enum': ['ok', 'action_required'],\n      },\n    },\n    'required': ['summary', 'status'],\n    'additionalProperties': false,\n  };\n\n  final result = await thread.run(\n    'Summarize repository status',\n    TurnOptions(outputSchema: schema),\n  );\n\n  print(result.finalResponse);\n}\n```\n\n## Binary resolution strategy\n\nThis package resolves the executable in this order:\n\n1. `codexPathOverride`\n2. `CODEX_EXECUTABLE`\n3. `PATH`\n\nIf `codex` cannot be found, it throws a clear error with remediation steps.\n\n## Attribution and license\n\nThis project is a Dart port inspired by the TypeScript SDK in the OpenAI Codex repository (`sdk/typescript`).\n\n- Upstream project: https://github.com/openai/codex\n- Upstream license: Apache-2.0\n\nSee `LICENSE` and `NOTICE` in this repository for attribution details.\n\n## Non-profit intent and package name\n\nThis project is maintained without profit intent and is published to help the Dart ecosystem.\n\nIf OpenAI decides to publish an official Dart package under the `codex` name, the current maintainer is willing to transfer/release this package name to OpenAI without issues.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleynier%2Fcodex-dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleynier%2Fcodex-dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleynier%2Fcodex-dart/lists"}