{"id":15780454,"url":"https://github.com/balazs4/alola","last_synced_at":"2026-04-13T00:33:29.209Z","repository":{"id":40295760,"uuid":"251114535","full_name":"balazs4/alola","owner":"balazs4","description":"curl -i | alola","archived":false,"fork":false,"pushed_at":"2025-04-18T09:02:57.000Z","size":212,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-12T00:32:05.663Z","etag":null,"topics":["api-test","api-testing","assert","curl","json","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/balazs4.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}},"created_at":"2020-03-29T19:21:58.000Z","updated_at":"2025-04-18T09:02:21.000Z","dependencies_parsed_at":"2024-10-04T18:41:50.772Z","dependency_job_id":"42fe384c-bc5c-4b7c-808d-ea17ba14f41c","html_url":"https://github.com/balazs4/alola","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/balazs4/alola","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balazs4%2Falola","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balazs4%2Falola/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balazs4%2Falola/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balazs4%2Falola/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/balazs4","download_url":"https://codeload.github.com/balazs4/alola/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balazs4%2Falola/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268011188,"owners_count":24180712,"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-07-31T02:00:08.723Z","response_time":66,"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":["api-test","api-testing","assert","curl","json","nodejs"],"created_at":"2024-10-04T18:41:36.610Z","updated_at":"2026-04-13T00:33:29.157Z","avatar_url":"https://github.com/balazs4.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\".logo-gh-light-mode-only.svg#gh-light-mode-only\" alt=\"pipe alola pipe\"\u003e\n\u003cimg src=\".logo-gh-dark-mode-only.svg#gh-dark-mode-only\" alt=\"pipe alola pipe\"\u003e\n\u003c/p\u003e\n\n# alola\n\n[![npm version: alola](https://img.shields.io/npm/v/alola?color=010101\u0026logo=npm\u0026style=for-the-badge)](https://www.npmjs.com/package/alola) [![zero dependencies](https://img.shields.io/badge/dependencies-zero-010101?logo=npm\u0026style=for-the-badge)](https://www.npmjs.com/package/alola) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-010101.svg?logo=prettier\u0026style=for-the-badge)](https://github.com/prettier/prettier)\n\n```sh\ncurl -i \u003curl\u003e | alola | fx .\n```\n\n- glue between `curl -i` and cli JSON parser tool of your choice like [`jq`](https://github.com/stedolan/jq) or [`fx`](https://github.com/antonmedv/fx)\n- it was built with unix-philosophy in the mind\n- runs assertions on JSON\n- no bail-out: it runs every assertions\n- CI-friendly: process exit code is always the number of failed testcases\n\n## usage\n\n```bash\n# npm install -g alola\n# or\n# npx alola (recommended)\n\ncurl -i \u003curl\u003e | npx alola [assertions]\n```\n\n## examples\n\n```bash\ncurl -i https://ewqfsixnkkhp3syjy65heuhkou0dogwr.lambda-url.eu-central-1.on.aws/ \\\n  | npx alola\n\n# output\n\n{\n  \"redirects\": [],\n  \"protocol\": \"HTTP/1.1\",\n  \"status\": 200,\n  \"statusText\": \"OK\",\n  \"headers\": {\n    \"date\": \"Sun, 10 Jul 2022 08:30:19 GMT\",\n    \"content-type\": \"application/json\",\n    \"content-length\": \"68\",\n    \"connection\": \"keep-alive\",\n    \"x-amzn-requestid\": \"6f38be71-8c2a-4106-8bd5-6a2a0726d831\",\n    \"x-amzn-trace-id\": \"root=1-62ca8e1b-3fa47e01777132441c03e3de;sampled=0\"\n  },\n  \"body\": {\n    \"date\": 1657441819664,\n    \"foobar\": 42,\n    \"author\": \"balazs4\",\n    \"name\": \"alola\"\n  }\n}\n```\n\n```sh\n# follows redirections\ncurl -i https://ewqfsixnkkhp3syjy65heuhkou0dogwr.lambda-url.eu-central-1.on.aws/ --follow \\\n  | npx alola\n\n# assertion\ncurl -i https://ewqfsixnkkhp3syjy65heuhkou0dogwr.lambda-url.eu-central-1.on.aws/ \\\n  | npx alola \\\n   'status should be 200' \\\n   'headers.content-type should match json'\\\n   'body.author should be balazs4'\n\n# silent assertion\ncurl -i https://ewqfsixnkkhp3syjy65heuhkou0dogwr.lambda-url.eu-central-1.on.aws/ \\\n  | npx alola 'status should be 200' 2\u003e/dev/null\n\n# assertion only\ncurl -i https://ewqfsixnkkhp3syjy65heuhkou0dogwr.lambda-url.eu-central-1.on.aws/ \\\n  | npx alola 'status should be 200' 1\u003e/dev/null\n\n# json assertion output\ncurl -i https://ewqfsixnkkhp3syjy65heuhkou0dogwr.lambda-url.eu-central-1.on.aws/ \\\n  | ALOLA_REPORT=json npx alola 'status should be 200' 1\u003e/dev/null\n\n# middleware\ncurl -i https://ewqfsixnkkhp3syjy65heuhkou0dogwr.lambda-url.eu-central-1.on.aws/ \\\n  | npx alola 'status should be 200' 'headers.content-type should match json' \\\n  | fx 'res =\u003e res.body.name + \" by \" + res.body.author'\n```\n\n## assertions\n\n```sh\n\u003ckey\u003e should be \u003cexpected-value\u003e\n\u003ckey\u003e should not be \u003cexpected-value\u003e\n\u003ckey\u003e should match \u003cexpected-regex\u003e\n\u003ckey\u003e should not match \u003cexpected-regex\u003e\n```\n\n[more details](./.e2e.sh)\n\n## configuration\n\nYou can configure `alola` with the following environment variables:\n\n| Environment variable | Description                                  | Default value              | Possible values |\n| -------------------- | -------------------------------------------- | -------------------------- | --------------- |\n| `ALOLA_REPORT`       | result reporter                              | text                       | text,json       |\n| `ALOLA_CUSTOM`       | any resolvable path to the custom assertions | [./.alola.js](./.alola.js) |                 |\n\n## author\n\nbalazs4 - https://twitter.com/balazs4\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalazs4%2Falola","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbalazs4%2Falola","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalazs4%2Falola/lists"}