https://github.com/inkohx/gh-archiver
A tool for archiving GitHub repositories
https://github.com/inkohx/gh-archiver
Last synced: over 1 year ago
JSON representation
A tool for archiving GitHub repositories
- Host: GitHub
- URL: https://github.com/inkohx/gh-archiver
- Owner: InkoHX
- License: mit
- Created: 2022-12-31T13:13:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-23T02:27:23.000Z (over 2 years ago)
- Last Synced: 2025-02-14T16:50:35.234Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 97.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gh-archiver
A tool for archiving GitHub repositories
## Installation
```sh
# Global install
npm i -g gh-archiver
# npx
npx gh-archiver --help
```
## Usage
### Create a Personal Access Token
You need to create a Personal Access Token with permissions set as per the following table from [the settings](https://github.com/settings/personal-access-tokens/new).
Select `All repositories` for `Repository access`
| Permission Name | Access |
| --------------- | ---------------- |
| Administration | `Read and write` |
| Metadata | `Read-only` |
### Command-line
```sh
# Archive repositories that are 1 year old from the last update date.
gh-archiver --before 1y --token="PERSONAL_ACCESS_TOKEN"
# Archive repositories whose last update date is less than 1 year old
# TIPS: If the PAT (Personal Access Token) is registered in an environment variable named "GITHUB_TOKEN", there is no need to use the --token flag.
gh-archiver --after 1y
# More information
gh-archiver --help
```
## License
See [LICENSE](https://github.com/InkoHX/gh-archiver/blob/main/LICENSE) file.
## Author
- [InkoHX](https://github.com/InkoHX)