{"id":13621384,"url":"https://github.com/classmethod/aurl","last_synced_at":"2026-03-07T02:35:13.346Z","repository":{"id":27109729,"uuid":"30577415","full_name":"classmethod/aurl","owner":"classmethod","description":"Command line utility to make HTTP request with OAuth2","archived":false,"fork":false,"pushed_at":"2023-06-21T07:41:45.000Z","size":99,"stargazers_count":60,"open_issues_count":3,"forks_count":10,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-08-01T21:47:48.267Z","etag":null,"topics":["bd","curl","curl-commands","oauth2","oauth2-client"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/classmethod.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":"2015-02-10T05:56:22.000Z","updated_at":"2024-07-24T06:21:31.000Z","dependencies_parsed_at":"2024-06-12T04:37:43.155Z","dependency_job_id":"81c93c96-1dba-4c22-8252-87cf5be8fda7","html_url":"https://github.com/classmethod/aurl","commit_stats":null,"previous_names":["classmethod-aws/aurl"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classmethod%2Faurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classmethod%2Faurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classmethod%2Faurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classmethod%2Faurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/classmethod","download_url":"https://codeload.github.com/classmethod/aurl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223654635,"owners_count":17180548,"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","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":["bd","curl","curl-commands","oauth2","oauth2-client"],"created_at":"2024-08-01T21:01:05.358Z","updated_at":"2026-03-07T02:35:08.304Z","avatar_url":"https://github.com/classmethod.png","language":"Go","readme":"aurl\n====\n\n![Release](https://github.com/classmethod/aurl/workflows/Release/badge.svg)\n[![License](https://img.shields.io/github/license/classmethod/aurl.svg)](https://github.com/classmethod/aurl/blob/master/LICENSE)\n\n## Description\n\nHTTP CLI client with OAuth 2.0 authentication.\n\nYou know `curl` is powerful command line tool and you can make any complex HTTP request to every servers.\nBut the target web server is secured by OAuth 2.0, you must send another HTTP request to the authorization server\nbefore making principal request.  And more, you should to manage issued access tokens for every resources.\n\n`aurl` is a command-line tool that process OAuth 2.0 dance and manage access/refresh tokens automatically.\n\n**Note:** Currently, `aurl` is not support OAuth 1.0a.  Your pull-request is appreciated.\n\n## Install\n\nYou can install the pre-compiled binary by either following the steps.\n\n### homebrew\n\n```bash\nbrew tap classmethod/repos\nbrew install aurl\n```\n\n### scoop\n\nTBD\n\n### go install\n\n```bash\ngo install github.com/classmethod/aurl@latest\n```\n\n### manually\n\nDownload the [pre-compiled binaries](https://github.com/classmethod/aurl/releases) from the OSS releases page.\n\n## Usage\n\n### Profile configuration\n\nFirst, you must create profile setting file `~/.aurl/profiles` file which format is described below.\nProfile setting file format is typically called [INI file](http://en.wikipedia.org/wiki/INI_file).\nEach section name is used as profile name.\n\n###### SYNOPSIS\n\nSection name is utilized as profile name.  In each section following key settings are available:\n\n| key name                      | description                       | default value | available values | mandatory                       |\n| ----------------------------- | --------------------------------- |:-------------:|:----------------:|:-------------------------------:|\n| grant\\_type                   | OAuth2 grant type                 | authorization_code | authorization_code, password, client_credentials | no |\n| client\\_id                    | client id                         | aurl          | (any)            | no                              |\n| client_secret                 | client secret                     | aurl          | (any)            | no                              |\n| auth\\_server\\_auth\\_endpoint  | OAuth2 authorization endpoint URI | (none)        | (any)            | YES (except for password grant) |\n| auth\\_server\\_token\\_endpoint | OAuth2 token endpoint URI         | (none)        | (any)            | YES                             |\n| redirect                      | redirect URI                      | (none)        | (any)            | YES (except for password grant) |\n| scopes                        | space separated scope values      | read write    | (any)            | no                              |\n| username                      | username for password grant       | (none)        | (any)            | no (except for password grant)  |\n| password                      | password for password grant       | (none)        | (any)            | no (except for password grant)  |\n| default\\_content\\_type        | default content type header       | (none)        | (any)            | no                              |\n| default\\_user\\_agent          | default user agent   header       | aurl x.x.x    | (any)            | no                              |\n\nImplicit flow is not supported currently.\n\n###### EXAMPLE\n\n```\n[default]\nauth_server_auth_endpoint = https://api.example.com/oauth/authorize\nauth_server_token_endpoint = https://api.example.com/oauth/token\nredirect = https://api.example.com/oauth/oob\ndefault_content_type = application/json\n\n[foobar]\ngrant_type = password\nclient_id = foobar\nclient_secret = bazqux\nauth_server_token_endpoint = https://api.example.com/oauth/token\nscopes = read write global\nusername = john\npassword = pass1234\n\n[fb]\nclient_id = your_facebook_App_ID\nclient_secret = your_facebook_App_Secret\nauth_server_auth_endpoint = https://www.facebook.com/dialog/oauth\nauth_server_token_endpoint = https://graph.facebook.com/oauth/access_token\nredirect = https://www.facebook.com/connect/login_success.html\nscopes = public_profile email user_friends\n\n[google]\nclient_id = xxxxxxxx.apps.googleusercontent.com\nclient_secret = yyyyyyyy\nauth_server_auth_endpoint = https://accounts.google.com/o/oauth2/auth\nauth_server_token_endpoint = https://www.googleapis.com/oauth2/v3/token\nredirect = urn:ietf:wg:oauth:2.0:oob\nscopes = https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email\n\n```\n\n### Token store file\n\nToken store file `~/.aurl/token/*.json` is used by aurl internally.  Retrieved token response body is stored in this file.\nYou SHOULD NOT edit this file manually because this file is overwritten at any time curl is executed.\nYou may lose comment and another extra data.\n\n### Execution\n\n###### SYNOPSIS\n\n```bash\nusage: aurl [\u003cflags\u003e] \u003curl\u003e\n\nCommand line utility to make HTTP request with OAuth2.\n\nFlags:\n      --help                     Show context-sensitive help (also try --help-long and --help-man).\n  -p, --profile=\"default\"        Set profile name. (default: \"default\")\n  -X, --request=\"GET\"            Set HTTP request method. (default: \"GET\")\n  -H, --header=HEADER:VALUE ...  Add HTTP headers to the request.\n  -d, --data=DATA                Set HTTP request body.\n  -k, --insecure                 Disable SSL certificate verification.\n      --print-body               Enable printing response body to stdout. (default: enabled, try --no-print-body)\n      --print-headers            Enable printing response headers JSON to stdout. (default: disabled, try --no-print-headers)\n  -V, --verbose                  Enable verbose logging to stderr.\n      --version                  Show application version.\n\nArgs:\n  \u003curl\u003e  The URL to request\n```\n\n###### EXAMPLE\n\n```bash\n$ aurl http://api.example.com/path/to/resource\n...http.response.body...\n$ aurl -X POST http://api.example.com/path/to/resource --data \"foobar\"\n...http.response.body...\n```\n\naurl make request with access token in `Authorization` header of `default` profile.\nYou can specify profile name with `--profile` option.\n\n```bash\n$ aurl --profile fb https://graph.facebook.com/me\n{\"id\":\"...\",\"email\": ... }\n$ aurl --profile google https://www.googleapis.com/plus/v1/people/me\n{\n \"kind\": \"plus#person\",\n...\n}\n```\n\nBy default aurl prints response body in stdout.  When an error occured the detail is printed in stderr.\nYou may want not response body but response header, then you can use `--no-print-body` and `--print-headers` option.\n\n```bash\n$ aurl --no-print-body --print-headers -X OPTIONS http://api.example.com/path/to/resource\n{\"Content-Type\":[\"application/json;charset=UTF-8\"],\"Date\":[\"Tue, 17 Feb 2015 08:16:41 GMT\"],\"Server\":[\"nginx/1.6.2\"], ...}\n```\n\n## Contribution\n\n1. Fork ([https://github.com/classmethod/aurl/fork](https://github.com/classmethod/aurl/fork))\n1. Create a feature branch named like `feature/something_awesome_feature` from `development` branch\n1. Commit your changes\n1. Rebase your local changes against the `master` branch\n1. Run test suite with the `go test ./...` command and confirm that it passes\n1. Run `gofmt -s`\n1. Create new Pull Request\n\n## Build\n\n```bash\n$ make deps\n$ make\n$ bin/aurl --help\nusage: aurl [\u003cflags\u003e] \u003curl\u003e\n\nCommand line utility to make HTTP request with OAuth2.\n\nFlags:\n  -h, --help                     Show context-sensitive help (also try --help-long and --help-man).\n  ...\n```\n\n## Author\n\n[Daisuke Miyamoto](https://github.com/dai0304)\n\n## Maintainer\n\n[Seiichi Arai](https://github.com/seiichi1101)\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclassmethod%2Faurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclassmethod%2Faurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclassmethod%2Faurl/lists"}