{"id":13583363,"url":"https://github.com/anthonygauthier/axios-curlirize","last_synced_at":"2026-04-25T19:00:57.482Z","repository":{"id":38229122,"uuid":"137930823","full_name":"anthonygauthier/axios-curlirize","owner":"anthonygauthier","description":"axios plugin converting requests to cURL commands, saving and logging them.","archived":false,"fork":false,"pushed_at":"2024-07-07T16:01:59.000Z","size":450,"stargazers_count":192,"open_issues_count":10,"forks_count":30,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-22T22:08:14.810Z","etag":null,"topics":["axios","curl","debug","debugging","ecmascript6","http","javascript","log","logging","node","shell"],"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/anthonygauthier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["delirius325"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-06-19T18:34:59.000Z","updated_at":"2025-09-05T09:14:17.000Z","dependencies_parsed_at":"2024-01-18T03:49:30.804Z","dependency_job_id":"8a66f10d-895f-4c83-a6a0-ff69ebd2e75f","html_url":"https://github.com/anthonygauthier/axios-curlirize","commit_stats":null,"previous_names":["delirius325/axios-curlirize","augmnt/axios-curlirize"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/anthonygauthier/axios-curlirize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonygauthier%2Faxios-curlirize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonygauthier%2Faxios-curlirize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonygauthier%2Faxios-curlirize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonygauthier%2Faxios-curlirize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthonygauthier","download_url":"https://codeload.github.com/anthonygauthier/axios-curlirize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonygauthier%2Faxios-curlirize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32273223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: 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":["axios","curl","debug","debugging","ecmascript6","http","javascript","log","logging","node","shell"],"created_at":"2024-08-01T15:03:25.638Z","updated_at":"2026-04-25T19:00:57.465Z","avatar_url":"https://github.com/anthonygauthier.png","language":"JavaScript","funding_links":["https://github.com/sponsors/delirius325"],"categories":["JavaScript"],"sub_categories":[],"readme":"[![Codacy Badge](https://api.codacy.com/project/badge/Grade/7d519058c2f340428a1b7ef22d71368f)](https://app.codacy.com/app/antho325/axios-curlirize?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=delirius325/axios-curlirize\u0026utm_campaign=Badge_Grade_Dashboard)\n[![CircleCI](https://circleci.com/gh/delirius325/axios-curlirize.svg?style=svg)](https://circleci.com/gh/delirius325/axios-curlirize)\n[![npm version](https://badge.fury.io/js/axios-curlirize.svg)](https://badge.fury.io/js/axios-curlirize)\n\n# Versions\n* 2.0.0 - Uses ES Native Modules\n* 1.3.7 - Uses CommonJS Modules\n\n# Description\n\nThis module is an axios third-party module to log any axios request as a curl command in the console. It was originally posted as a suggestion on the axios repository, but since we believed it wasn't in the scope of axios to release such feature, we decided to make it as an independent module.\n\n# How it works\n\nThe module makes use of axios' interceptors to log the request as a cURL command. It also stores it in the response's config object. Therefore, the command can be seen in the app's console, as well as in the `res.config.curlCommand` property of the response.\n\n# How to use it\n\naxios-curlirize is super easy to use. First you'll have to install it.\n\n```shell\nnpm i --save axios-curlirize@latest\n```\n\nThen all you have to do is import and instanciate curlirize in your app. Here's a sample:\n\n```javascript\nimport axios from 'axios';\nimport express from 'express';\nimport curlirize from 'axios-curlirize';\n\nconst app = express();\n\n// initializing axios-curlirize with your axios instance\ncurlirize(axios);\n\n// creating dummy route\napp.post('/', (req, res) =\u003e {\n  res.send({ hello: 'world!' });\n});\n\n// starting server\napp.listen(7500, () =\u003e {\n  console.log('Dummy server started on port 7500');\n  /*\n             The output of this in the console will be :\n             curl -X POST -H \"Content-Type:application/x-www-form-urlencoded\" --data {\"dummy\":\"data\"} http://localhost:7500/\n        */\n  axios\n    .post('http://localhost:7500/', { dummy: 'data' })\n    .then(res =\u003e {\n      console.log('success');\n    })\n    .catch(err =\u003e {\n      console.log(err);\n    });\n});\n```\n\n# Features\n\n## Changing the logger\nBy default, axios-curlirize uses the `console.log/error()` functions. It is possible to change the logger by doing something similar to this:\n\n```javascript\n// when initiating your curlirize instance\ncurlirize(axios, (result, err) =\u003e {\n  const { command } = result;\n  if (err) {\n    // use your logger here\n  } else {\n    // use your logger here\n  }\n});\n```\n\n## Curilirize additional axios instance\nTo curlirize any other instances of axios (aside from the base one), please call the `curlirize()` method on that instance.\n```javascript\nconst instance = axios.create({ baseURL: 'https://some-domain.com/api/', timeout: 1000, headers: {'X-Custom-Header': 'foobar'} });\ncurlirize(instance);\n```\n\n## Disable the logger\n\nBy default, all requests will be logged. But you can disable this behaviour unitarily by setting the `curlirize` option to false within the axios request.\n\n```javascript\naxios\n  .post('http://localhost:7500/', { dummy: 'data' }, {\n    curlirize: false\n  })\n  .then(res =\u003e {\n    console.log('success');\n  })\n  .catch(err =\u003e {\n    console.log(err);\n  });\n```\n\n## Clear a request\n\n```javascript\naxios\n  .post('http://localhost:7500/', { dummy: 'data' })\n  .then(res =\u003e {\n    res.config.clearCurl();\n  })\n  .catch(err =\u003e {\n    console.log(err);\n  });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonygauthier%2Faxios-curlirize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthonygauthier%2Faxios-curlirize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonygauthier%2Faxios-curlirize/lists"}