{"id":15664346,"url":"https://github.com/jonschlinkert/remote-origin-url","last_synced_at":"2025-04-16T04:46:35.086Z","repository":{"id":13960697,"uuid":"16661040","full_name":"jonschlinkert/remote-origin-url","owner":"jonschlinkert","description":"Extract the git remote origin URL from your local git repository.","archived":false,"fork":false,"pushed_at":"2021-02-11T17:45:08.000Z","size":27,"stargazers_count":16,"open_issues_count":3,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T16:36:32.189Z","etag":null,"topics":["config","git","gitconfig","github","javascript","js","node","nodejs","origin","remote","url"],"latest_commit_sha":null,"homepage":"https://github.com/jonschlinkert","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/jonschlinkert.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}},"created_at":"2014-02-09T05:59:10.000Z","updated_at":"2023-12-04T12:31:14.000Z","dependencies_parsed_at":"2022-08-03T02:45:18.050Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/remote-origin-url","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fremote-origin-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fremote-origin-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fremote-origin-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fremote-origin-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/remote-origin-url/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249198036,"owners_count":21228672,"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":["config","git","gitconfig","github","javascript","js","node","nodejs","origin","remote","url"],"created_at":"2024-10-03T13:42:11.357Z","updated_at":"2025-04-16T04:46:35.056Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# remote-origin-url [![NPM version](https://img.shields.io/npm/v/remote-origin-url.svg?style=flat)](https://www.npmjs.com/package/remote-origin-url) [![NPM monthly downloads](https://img.shields.io/npm/dm/remote-origin-url.svg?style=flat)](https://npmjs.org/package/remote-origin-url) [![NPM total downloads](https://img.shields.io/npm/dt/remote-origin-url.svg?style=flat)](https://npmjs.org/package/remote-origin-url) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/remote-origin-url.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/remote-origin-url)\n\n\u003e Get the git remote origin URL from your local git repository. Remember! A remote origin must exist first!\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save remote-origin-url\n```\n\n## Usage\n\n```js\nconst origin = require('remote-origin-url');\n```\n\n**async/await**\n\n```js\n(async() =\u003e {\n  let url = await origin();\n  console.log(url);\n  // url =\u003e \"https://github.com/jonschlinkert/remote-origin-url.git\"\n})();\n```\n\n**Callback**\n\n```js\norigin((err, url) =\u003e {\n  if (err) return console.log(err);\n  console.log(url);\n  // url =\u003e \"https://github.com/jonschlinkert/remote-origin-url.git\"\n});\n```\n\n**cwd**\n\nSpecify the current working directory to use:\n\n```js\norigin(process.cwd(), (err, url) =\u003e {\n  if (err) return console.log(err);\n  console.log(url);\n  // url =\u003e \"https://github.com/jonschlinkert/remote-origin-url.git\"\n});\n```\n\n### sync\n\n```js\nconsole.log(origin.sync());\n//=\u003e \"https://github.com/jonschlinkert/remote-origin-url.git\"\n```\n\nSpecify the `cwd` to use:\n\n```js\nconsole.log(origin.sync(process.cwd()));\n//=\u003e \"https://github.com/jonschlinkert/remote-origin-url.git\"\n```\n\n## Release history\n\n### v2.0.0\n\nNow returns a promise if a callback is not supplied.\n\n### v1.0.0\n\nNo significant changes, just minor code formatting. it's time for a 1.0 release!\n\n### v0.5.3\n\n**bug fixes**\n\nPass an object to [parse-git-config](https://github.com/jonschlinkert/parse-git-config) to ensure that `path` is used.\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n\u003c/details\u003e\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [git-config-path](https://www.npmjs.com/package/git-config-path): Resolve the path to the user's local or global .gitconfig. | [homepage](https://github.com/jonschlinkert/git-config-path \"Resolve the path to the user's local or global .gitconfig.\")\n* [git-user-name](https://www.npmjs.com/package/git-user-name): Get a user's name from git config at the project or global scope, depending on… [more](https://github.com/jonschlinkert/git-user-name) | [homepage](https://github.com/jonschlinkert/git-user-name \"Get a user's name from git config at the project or global scope, depending on what git uses in the current context.\")\n* [git-username](https://www.npmjs.com/package/git-username): Get the username (or 'owner' name) from a git/GitHub remote origin URL. | [homepage](https://github.com/jonschlinkert/git-username \"Get the username (or 'owner' name) from a git/GitHub remote origin URL.\")\n* [is-git-url](https://www.npmjs.com/package/is-git-url): Regex to validate that a URL is a git url. | [homepage](https://github.com/jonschlinkert/is-git-url \"Regex to validate that a URL is a git url.\")\n* [parse-github-url](https://www.npmjs.com/package/parse-github-url): Parse a github URL into an object. | [homepage](https://github.com/jonschlinkert/parse-github-url \"Parse a github URL into an object.\")\n\n### Contributors\n\n| **Commits** | **Contributor** |  \n| --- | --- |  \n| 34 | [jonschlinkert](https://github.com/jonschlinkert) |  \n| 3  | [doowb](https://github.com/doowb) |  \n\n### Author\n\n**Jon Schlinkert**\n\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on November 22, 2018._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fremote-origin-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fremote-origin-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fremote-origin-url/lists"}