admob-cli
v1.0.4
Published
Google AdMob API를 CLI로 관리하는 도구
Readme
AdMob CLI
A command-line tool to interact with the Google AdMob API. It can be integrated as a Skill for Gemini CLI, allowing AI to query AdMob data directly.
Features
- Default JSON Output: All commands return JSON by default for easy parsing by AI and other tools.
- Table View: Use the
--tableflag for human-readable table output. - Comprehensive API Integration: Accounts, Apps, Ad Units, Mediation, and Revenue Reports.
Installation
npm install -g admob-cliAuthentication Setup
To use the AdMob API, you must create an OAuth2 client in the Google Cloud Console.
- Create a project in the Google Cloud Console.
- Enable the AdMob API.
- Configure the OAuth Consent Screen (Select "External").
- Go to Credentials > Create Credentials > OAuth 2.0 Client ID (Type: Desktop Application).
Step 1: Register Credentials
admob auth setup- The CLI will prompt you to enter your Client ID and Client Secret interactively.
Step 2: Login via OAuth2
admob auth login- For headless/server environments (e.g., SSH), use the
--headlessflag to manually enter the authorization code:
admob auth login --headlessList Accounts
admob account list
# For table view:
admob account list --tableList Apps
admob app list accounts/pub-XXXXXXXXXXXXXXXXList Ad Units
admob ad-unit list accounts/pub-XXXXXXXXXXXXXXXX/apps/YYYYYYYYYYYYList Mediation Groups
admob mediation list accounts/pub-XXXXXXXXXXXXXXXXRevenue Reports
### Network Report
```bash
admob report network accounts/pub-XXXXXXXXXXXXXXXX --start-date 2024-01-01 --end-date 2024-01-31
# With custom dimensions and metrics
admob report network accounts/pub-XXXXXXXXXXXXXXXX --start-date 2024-01-01 --end-date 2024-01-31 --dimensions DATE,APP --metrics ESTIMATED_EARNINGSMediation Report (Recommended for Revenue Tracking)
admob report mediation accounts/pub-XXXXXXXXXXXXXXXX --start-date 2024-01-01 --end-date 2024-01-31
# With custom dimensions and metrics
admob report mediation accounts/pub-XXXXXXXXXXXXXXXX --start-date 2024-01-01 --end-date 2024-01-31 --dimensions MONTH,AD_SOURCE --metrics ESTIMATED_EARNINGSGemini CLI Skill Registration
The project includes a SKILL.md file in .gemini/skills/admob-cli/ to enable AI agents to use this tool seamlessly.
