{"id":30127641,"url":"https://github.com/moeki0/kiruke","last_synced_at":"2025-08-10T17:08:58.103Z","repository":{"id":265564321,"uuid":"866688146","full_name":"moeki0/kiruke","owner":"moeki0","description":"Kiruke is a tool for testing prompts for LLM.","archived":false,"fork":false,"pushed_at":"2024-10-04T13:29:53.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-31T13:37:10.234Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moeki0.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}},"created_at":"2024-10-02T17:42:59.000Z","updated_at":"2024-10-04T13:29:56.000Z","dependencies_parsed_at":"2024-12-06T16:54:54.743Z","dependency_job_id":null,"html_url":"https://github.com/moeki0/kiruke","commit_stats":null,"previous_names":["kawakamimoeki/kiruke","kawakamidev/kiruke","moekiorg/kiruke"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/moeki0/kiruke","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeki0%2Fkiruke","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeki0%2Fkiruke/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeki0%2Fkiruke/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeki0%2Fkiruke/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moeki0","download_url":"https://codeload.github.com/moeki0/kiruke/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeki0%2Fkiruke/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269756394,"owners_count":24470566,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"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":"2025-08-10T17:08:49.256Z","updated_at":"2025-08-10T17:08:58.083Z","avatar_url":"https://github.com/moeki0.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kiruke\n\nKiruke is a tool for testing prompts for LLM.\n\n## Installation\n\n```bash\nnpm install -D kiruke\n```\n\n```\nyarn add -D kiruke\n```\n\n```bash\npnpm add -D kiruke\n```\n\n\n## Usage\n\n```typescript\n// example.ts\nimport OpenAI from 'openai';\nimport dotenv from 'dotenv';\n\ndotenv.config();\n\nconst client = new OpenAI({\n  apiKey: process.env['OPENAI_API_KEY'],\n});\n\nconst example = async (prompt: string) =\u003e {\n  const chatCompletion = await client.chat.completions.create({\n    messages: [{ role: 'user', content: `\n      Please proofread the following text. If you correct any typos or errors, enclose them in \u003cspan\u003e.\n      Text: ${prompt}\n    ` }],\n    model: 'gpt-4o',\n  });\n\n  return chatCompletion.choices[0].message.content\n}\n```\n```typescript\n// example.kiruke.ts\nimport { example } from \"./example\";\nimport { describe, test } from \"kiruke\";\n\ndescribe(example, () =\u003e {\n  test(`Text: Hello, ChatGPT! How is the weather today?`, async (prompt, result) =\u003e {\n    expect(prompt).not.include(\"weather\");\n    expect(prompt).match(/today/);\n    expect(result).include(\"\u003cspan\u003eweather\u003c/span\u003e\");\n  });\n\n  test(`Text: Please tell me the characteristics of humans.`, async (prompt, result) =\u003e {\n    expect(prompt).not.include(\"characteristics\");\n    expect(prompt).match(/humans/);\n    expect(result).include(\"\u003cspan\u003echaracteristics\u003c/span\u003e\");\n  });\n}, { threshold: 0.7 });\n```\n\n```json\n{\n  \"scripts\": {\n    \"test:prompt\": \"kiruke\"\n  }\n}\n```\n\nOutput example:\n\n```bash\n🧪example\nPrompt: Text: Hello, ChatGPT! How is the whether today?\nLatency: 875.019ms\nResult:       Text: Hello, ChatGPT! How is the \u003cspan\u003eweather\u003c/span\u003e today?\n✅ Assertion passed: does not include weather\n✅ Assertion passed: matches /today/\n✅ Assertion passed: includes \u003cspan\u003eweather\u003c/span\u003e\n\nPrompt: Text: Please tell me the characteeristics of humans.\nLatency: 1.017s\nResult:       Text: Please tell me the \u003cspan\u003echaracteristics\u003c/span\u003e of humans.\n✅ Assertion passed: does not include characteristics\n✅ Assertion passed: matches /humans/\n✅ Assertion passed: includes \u003cspan\u003echaracteristics\u003c/span\u003e\n\n✅ Test passed: 100% / 70%\n```\n\n## Matchers\n\n- `include(\"weather\")`\n- `not.include(\"weather\")`\n- `match(/today/)`\n- `not.match(/today/)`\n- `toBeLike(\"It should be positive.\")`\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/kawakamimoeki/kiruke. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/kawakamimoeki/kiruke/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe npm package is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Kiruke project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/kawakamimoeki/kiruke/blob/main/CODE_OF_CONDUCT.md).\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoeki0%2Fkiruke","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoeki0%2Fkiruke","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoeki0%2Fkiruke/lists"}