{"id":13572483,"url":"https://github.com/wezm/git-grab","last_synced_at":"2025-04-06T09:09:07.744Z","repository":{"id":39375042,"uuid":"383662038","full_name":"wezm/git-grab","owner":"wezm","description":"Clone a git repository into a standard location organised by domain and path.","archived":false,"fork":false,"pushed_at":"2024-05-28T10:30:13.000Z","size":102,"stargazers_count":142,"open_issues_count":3,"forks_count":5,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-10-11T17:43:35.892Z","etag":null,"topics":["cli","git","rust","tool"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/wezm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE-APACHE","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":"wezm"}},"created_at":"2021-07-07T03:26:31.000Z","updated_at":"2024-10-07T00:28:14.000Z","dependencies_parsed_at":"2024-01-15T03:59:34.067Z","dependency_job_id":"e86145c3-9dbc-4b81-8236-fd70a0dbc256","html_url":"https://github.com/wezm/git-grab","commit_stats":{"total_commits":35,"total_committers":1,"mean_commits":35.0,"dds":0.0,"last_synced_commit":"e311a551ef3d3026d3d21c903d6fd049712597b4"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wezm%2Fgit-grab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wezm%2Fgit-grab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wezm%2Fgit-grab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wezm%2Fgit-grab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wezm","download_url":"https://codeload.github.com/wezm/git-grab/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457802,"owners_count":20941906,"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":["cli","git","rust","tool"],"created_at":"2024-08-01T14:01:24.510Z","updated_at":"2025-04-06T09:09:07.721Z","avatar_url":"https://github.com/wezm.png","language":"Rust","funding_links":["https://github.com/sponsors/wezm"],"categories":["Rust","cli"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  ⤵️\u003cbr\u003e\n  Git Grab\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cstrong\u003eA small tool to clone git repositories to a standard location, organised\n  by domain name and path. It runs on BSD, Linux, macOS, Windows, and\n  more.\u003c/strong\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://cirrus-ci.com/github/wezm/git-grab\"\u003e\n    \u003cimg src=\"https://api.cirrus-ci.com/github/wezm/git-grab.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://crates.io/crates/git-grab\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/v/git-grab.svg\" alt=\"Version\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/crates/l/git-grab.svg\" alt=\"License\"\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\nGit Grab clones a repo into `$GRAB_HOME`, organised by domain and path.\n`GRAB_HOME` defaults to `~/src` if not set or supplied via the `--home`\nargument. For example:\n\n    $ git grab github.com/wezm/git-grab\n    Cloning into '/home/wmoore/src/github.com/wezm/git-grab'...\n    remote: Enumerating objects: 30, done.\n    remote: Counting objects: 100% (30/30), done.\n    remote: Compressing objects: 100% (20/20), done.\n    remote: Total 30 (delta 9), reused 27 (delta 7), pack-reused 0\n    Receiving objects: 100% (30/30), 12.50 KiB | 12.50 MiB/s, done.\n    Resolving deltas: 100% (9/9), done.\n    Grabbed https://github.com/wezm/git-grab to /home/wmoore/src/github.com/wezm/git-grab\n\n    $ lsd --tree ~/src\n    /home/wmoore/src\n    └── github.com\n       └── wezm\n          └── git-grab\n             ├── Cargo.lock\n             ├── Cargo.toml\n             └── src\n                ├── args.rs\n                ├── grab.rs\n                └── main.rs\n\nInstall\n-------\n\n### Pre-compiled Binary\n\nPre-compiled binaries are available for a number of platforms.\n\n* [FreeBSD 13+ amd64](https://releases.wezm.net/git-grab/3.0.0/git-grab-3.0.0-amd64-unknown-freebsd.tar.gz)\n* [Linux x86\\_64](https://releases.wezm.net/git-grab/3.0.0/git-grab-3.0.0-x86_64-unknown-linux-musl.tar.gz)\n* [MacOS Universal](https://releases.wezm.net/git-grab/3.0.0/git-grab-3.0.0-universal-apple-darwin.tar.gz)\n* [Windows x86\\_64](https://releases.wezm.net/git-grab/3.0.0/git-grab-3.0.0-x86_64-pc-windows-msvc.zip)\n\nExample to download and extract a binary:\n\n    curl https://releases.wezm.net/git-grab/3.0.0/git-grab-3.0.0-x86_64-unknown-linux-musl.tar.gz | tar zxf -\n\n### Package Manager\n\n`git-grab` is packaged in these package managers:\n\n* Arch Linux: `git-grab`\n* Brew: `brew install git-grab`\n* Chimera Linux: `git-grab`\n\nUsage\n-----\n\nOnce `git-grab` in installed you can use it via `git grab`. `git` automatically\nfinds binaries named `git-*`, this also means that if you have a shell alias\nlike `alias g=git`, `g grab` will also work.\n\n```\nUSAGE:\n    git grab [OPTIONS] [URL]... [--] [GIT OPTIONS]\n\nARGS:\n    \u003cURL\u003e...\n        One or more git URLs to clone. Any URL accepted by `git` is valid.\n        In addition, URLs without a scheme such as\n        github.com/wezm/grab are also accepted.\n\nOPTIONS:\n    -h, --help\n            Prints help information\n\n    -c, --clipboard\n            Paste a URL to clone from the clipboard.\n\n        --home [default: ~/src or $GRAB_HOME]\n            The directory to use as \"grab home\", where the URLs will be\n            cloned into. Overrides the GRAB_HOME environment variable if\n            set.\n\n    -n, --dry-run\n            Don't clone the repository but print what would be done.\n\n    -V, --version\n            Prints version information\n\nGIT OPTIONS:\n    Arguments after `--` will be passed to the git clone invocation.\n    This can be used supply arguments like `--recurse-submodules`.\n\nENVIRONMENT\n    GRAB_HOME\n        See --home\n```\n\n### With GitHub CLI\n\n1. Configure an alias in the GitHub CLI:\n\n       gh alias set --shell grab 'git grab \"git@github.com:$1.git\"'\n\n2. You can now grab a GitHub repo. For example:\n\n       gh grab wezm/git-grab\n\nBuild from Source\n-----------------\n\n**Minimum Supported Rust Version:** 1.70.0\n\n`git-grab` is implemented in Rust. See the Rust website for [instructions on\ninstalling the toolchain][rustup].\n\n**Compile-time Options (Cargo Features)**\n\n`git-grab` supports the following compile-time options:\n\n* `clipboard`: enable support for cloning the URL on the clipboard\n  * This feature is on by default\n  * On UNIX and UNIX-like systems such as BSD and Linux one of the following\n    tools must be installed:\n    * [wl-clipboard](https://github.com/bugaevc/wl-clipboard) (Wayland)\n    * [xclip](https://github.com/astrand/xclip) or\n      [xsel](https://vergenet.net/~conrad/software/xsel/) (X11)\n\n### From Git Checkout or Release Tarball\n\nBuild the binary with `cargo build --release --locked`. The binary will be in\n`target/release/git-grab`.\n\n### From crates.io\n\n`cargo install git-grab`\n\nCredits\n-------\n\nThis tool is inspired by [grab by @jmhodges](https://github.com/jmhodges/grab).\nA small comparison:\n\n| Feature              | Original                               | This Version           |\n|----------------------|----------------------------------------|------------------------|\n| VCS Supported        | Git, Mercurial, Subversion, and Bazaar | Git                    |\n| Dependencies         | None                                   | git                    |\n| Progress Information | No                                     | Yes, provided by `git` |\n\n`git-grab` incorporates clipboard code from [clipp] by [bendn] under the MIT licence.\n\nLicence\n-------\n\nThis project is dual licenced under either of:\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](https://github.com/wezm/git-grab/blob/master/LICENSE-APACHE))\n- MIT license ([LICENSE-MIT](https://github.com/wezm/git-grab/blob/master/LICENSE-MIT))\n\nat your option.\n\n[rustup]: https://www.rust-lang.org/tools/install\n[clipp]: https://github.com/bend-n/clipp\n[bendn]: https://github.com/bend-n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwezm%2Fgit-grab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwezm%2Fgit-grab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwezm%2Fgit-grab/lists"}