-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fa9661c
Showing
30 changed files
with
1,063 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
![Logo](https://raw.github.com/tanishqmanuja/apkmirror-downloader/v1/assets/banner.png?maxAge=2592000) | ||
|
||
# APKMD //APK Mirror Downloader | ||
|
||
[![Downloads][downloads-shield]][downloads-url] | ||
[![NPM Version][npm-shield]][npm-url] | ||
![GitHub Workflow Status][build-status-shield] | ||
[![Language][language-shield]][language-url] | ||
[![License][license-shield]][license-url] | ||
|
||
APKMD is a CLI tool that allows you to download APKs from Apkmirror. This repo also provides a npm package [apkmirror-downloader](https://www.npmjs.com/package/apkmirror-downloader) that allows you to download APKs from APKMirror programatically. | ||
|
||
## 🚀 Install | ||
|
||
Using `npm` | ||
```bash | ||
npm install apkmirror-downloader | ||
``` | ||
|
||
Using `bun` | ||
```bash | ||
bun add apkmirror-downloader | ||
``` | ||
|
||
Or use any other package manager like `yarn` or `pnpm` | ||
|
||
## 📃 Usage | ||
|
||
```ts | ||
import { APKMirrorDownloader } from "apkmirror-downloader"; | ||
|
||
const apkmd = new APKMirrorDownloader( | ||
{ outDir: "./downloads" } // <-- 🟠 APKMDOptions (optional) | ||
); | ||
|
||
apkmd.download( | ||
{ org: "google-inc", repo: "youtube" }, // <-- App (required) | ||
{ type: "apk" } // <-- 🟣 AppOptions (optional), will be merged with APKMDOptions | ||
); | ||
|
||
// OR | ||
|
||
APKMirrorDownloader.download({ org: "google-inc", repo: "youtube" }); | ||
``` | ||
|
||
🟠 **APKMDOptions Interface** | ||
- arch: Optional. The architecture of the application. For example, arm64-v8a, armeabi-v7a, etc. | ||
- dpi: Optional. The screen density of the application. For example, 240dpi, 320dpi, 480dpi, etc. | ||
- outDir: Optional. The output directory where the application files will be stored. | ||
|
||
🟣 **AppOptions Interface** | ||
- version: Optional. The version of the application. | ||
- arch: Optional, DEFAULT: "universal". The architecture of the application. For example, arm64-v8a, armeabi-v7a, etc. | ||
- dpi: Optional, DEFAULT: "nodpi". The screen density of the application. For example, 240dpi, 320dpi, 480dpi, etc. | ||
- type: Optional, DEFAULT: "apk". The type of the application. Supported types are "apk" and "bundle". | ||
- outFile: Optional. The name of the output file where the application will be saved. | ||
- outDir: Optional. The output directory where the application files will be stored. | ||
|
||
`AppOptions` will be merged automatically with `APKMDOptions` when download function is called. | ||
|
||
> [!WARNING] | ||
> Sometimes, download can fail at random. This is most likely due to rate limit protection by APKMirror using Cloudflare. | ||
## ⚡ CLI | ||
|
||
CLI can be downloaded from [releases](https://github.com/tanishqmanuja/apkmirror-downloader/releases/latest) section. | ||
|
||
Usage can be found using the following command | ||
|
||
```bash | ||
apkmd -h | ||
``` | ||
|
||
For downloading multiple apks use apps.json file | ||
|
||
```bash | ||
apkmd apps.json | ||
``` | ||
|
||
```json | ||
{ | ||
"options": { | ||
"arch": "arm64-v8a", | ||
"outDir": "downloads" | ||
}, | ||
"apps": [ | ||
{ | ||
"org": "google-inc", | ||
"repo": "youtube-music", | ||
"outFile": "ytm" | ||
}, | ||
{ | ||
"org": "google-inc", | ||
"repo": "youtube", | ||
"outFile": "yt", | ||
"version": "18.40.34" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## 🐱 Show your support | ||
|
||
Give a ⭐️ if this project helped you! | ||
|
||
## 💀 Disclaimer | ||
|
||
THIS PROJECT IS NOT ASSOCIATED OR ENDORSED BY APKMIRROR. The project is provided "as is" without warranty of any kind, either express or implied. Use at your own risk. | ||
|
||
|
||
<!-- Shields --> | ||
[build-status-shield]: https://img.shields.io/github/actions/workflow/status/tanishqmanuja/apkmirror-downloader/ci.yaml?branch=main&style=for-the-badge | ||
[downloads-shield]: https://img.shields.io/github/downloads/tanishqmanuja/apkmirror-downloader/total?style=for-the-badge&logo=github | ||
[downloads-url]: https://github.com/tanishqmanuja/apkmirror-downloader/releases/latest | ||
[language-shield]: https://img.shields.io/github/languages/top/tanishqmanuja/apkmirror-downloader?style=for-the-badge | ||
[language-url]: https://www.typescriptlang.org/ | ||
[license-shield]: https://img.shields.io/github/license/tanishqmanuja/apkmirror-downloader?style=for-the-badge | ||
[license-url]: https://github.com/tanishqmanuja/apkmirror-downloader/blob/main/LICENSE.md | ||
[npm-shield]: https://img.shields.io/npm/v/apkmirror-downloader?style=for-the-badge | ||
[npm-url]: https://www.npmjs.com/package/apkmirror-downloader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
contents: write | ||
|
||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
|
||
steps: | ||
- name: Checkout Source Code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v2 | ||
with: | ||
bun-version: latest | ||
|
||
- name: Install Dependencies | ||
run: bun install --frozen-lockfile | ||
|
||
- name: Lint | ||
run: bun run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
bump: | ||
description: "Bump Type" | ||
required: true | ||
type: choice | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
contents: write | ||
|
||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
|
||
steps: | ||
- name: Checkout Source Code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Git User | ||
run: | | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v2 | ||
with: | ||
bun-version: latest | ||
|
||
- name: Install Dependencies | ||
run: bun install --frozen-lockfile | ||
|
||
- name: Build and Release | ||
run: bun run release ${{ github.event.inputs.bump }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# deps | ||
node_modules | ||
|
||
# output | ||
dist | ||
out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Ignore everything | ||
/* | ||
|
||
# Except | ||
!.github | ||
!src | ||
!scripts | ||
!.prettierrc | ||
!tsconfig.json | ||
!.release-it.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"semi": true, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"printWidth": 80, | ||
"singleQuote": false, | ||
"arrowParens": "avoid", | ||
"importOrder": [ | ||
"<BUILTIN_MODULES>", | ||
"", | ||
"<THIRD_PARTY_MODULES>", | ||
"", | ||
"^[./]" | ||
], | ||
"plugins": ["@ianvs/prettier-plugin-sort-imports"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"git": { | ||
"tagName": "v${version}", | ||
"commitMessage": "chore: release v${version}", | ||
"pushRepo": "https://github.com/tanishqmanuja/apkmirror-downloader" | ||
}, | ||
"hooks": { | ||
"after:bump": ["bun run build", " bun run compile"] | ||
}, | ||
"github": { | ||
"release": true, | ||
"releaseName": "vRYjs v${version}", | ||
"tokenRef": "GITHUB_TOKEN", | ||
"assets": ["out/*"] | ||
}, | ||
"npm": { | ||
"publish": true | ||
}, | ||
"plugins": { | ||
"@release-it/conventional-changelog": { | ||
"preset": { | ||
"name": "conventionalcommits", | ||
"types": [ | ||
{ | ||
"type": "feat", | ||
"section": "🎉 Features" | ||
}, | ||
{ | ||
"type": "fix", | ||
"section": "🐛 Bug Fixes" | ||
} | ||
] | ||
}, | ||
"ignoreRecommendedBump": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Tanishq Manuja | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# APKMD //APK Mirror Downloader | ||
|
||
APKMD is a CLI tool that allows you to download APKs from Apkmirror. This repo also provides a npm package [apkmirror-downloader](https://www.npmjs.com/package/apkmirror-downloader) that allows you to download APKs from APKMirror programatically. | ||
|
||
## 🚀 Install | ||
|
||
Using `npm` | ||
```bash | ||
npm install apkmirror-downloader | ||
``` | ||
|
||
Using `bun` | ||
```bash | ||
bun add apkmirror-downloader | ||
``` | ||
|
||
Or use any other package manager like `yarn` or `pnpm` | ||
|
||
## 📃 Usage | ||
|
||
```ts | ||
import { APKMirrorDownloader } from "apkmirror-downloader"; | ||
|
||
const apkmd = new APKMirrorDownloader( | ||
{ outDir: "./downloads" } // <-- 🟠 APKMDOptions (optional) | ||
); | ||
|
||
apkmd.download( | ||
{ org: "google-inc", repo: "youtube" }, // <-- App (required) | ||
{ type: "apk" } // <-- 🟣 AppOptions (optional), will be merged with APKMDOptions | ||
); | ||
|
||
// OR | ||
|
||
APKMirrorDownloader.download({ org: "google-inc", repo: "youtube" }); | ||
``` | ||
|
||
🟠 **APKMDOptions Interface** | ||
- arch: Optional. The architecture of the application. For example, arm64-v8a, armeabi-v7a, etc. | ||
- dpi: Optional. The screen density of the application. For example, 240dpi, 320dpi, 480dpi, etc. | ||
- outDir: Optional. The output directory where the application files will be stored. | ||
|
||
🟣 **AppOptions Interface** | ||
- version: Optional. The version of the application. | ||
- arch: Optional, DEFAULT: "universal". The architecture of the application. For example, arm64-v8a, armeabi-v7a, etc. | ||
- dpi: Optional, DEFAULT: "nodpi". The screen density of the application. For example, 240dpi, 320dpi, 480dpi, etc. | ||
- type: Optional, DEFAULT: "apk". The type of the application. Supported types are "apk" and "bundle". | ||
- outFile: Optional. The name of the output file where the application will be saved. | ||
- outDir: Optional. The output directory where the application files will be stored. | ||
|
||
`AppOptions` will be merged automatically with `APKMDOptions` when download function is called. | ||
|
||
## ⚡ CLI | ||
|
||
CLI can be downloaded from [releases](https://github.com/tanishqmanuja/apkmirror-downloader/releases/latest) section. | ||
|
||
Usage can be found using the following command | ||
|
||
```bash | ||
apkmd -h | ||
``` | ||
|
||
For downloading multiple apks use apps.json file | ||
|
||
```bash | ||
apkmd apps.json | ||
``` | ||
|
||
```json | ||
{ | ||
"options": { | ||
"arch": "arm64-v8a", | ||
"outDir": "downloads" | ||
}, | ||
"apps": [ | ||
{ | ||
"org": "google-inc", | ||
"repo": "youtube-music", | ||
"outFile": "ytm" | ||
}, | ||
{ | ||
"org": "google-inc", | ||
"repo": "youtube", | ||
"outFile": "yt", | ||
"version": "18.40.34" | ||
} | ||
] | ||
} | ||
``` |
Binary file not shown.
Oops, something went wrong.