https://github.com/zosmaai/gacli
Full-featured Google Analytics 4 CLI — Data API + Admin API, OAuth auth, multiple output formats, MCP server. Account management, property listings, audience lists, custom reports.
https://github.com/zosmaai/gacli
admin-api analytics cli command-line data-api developer-tools ga4 google-analytics google-api nodejs open-source typescript zosma-ai
Last synced: 3 days ago
JSON representation
Full-featured Google Analytics 4 CLI — Data API + Admin API, OAuth auth, multiple output formats, MCP server. Account management, property listings, audience lists, custom reports.
- Host: GitHub
- URL: https://github.com/zosmaai/gacli
- Owner: zosmaai
- License: mit
- Created: 2026-07-11T21:28:36.000Z (5 days ago)
- Default Branch: main
- Last Pushed: 2026-07-11T22:58:50.000Z (5 days ago)
- Last Synced: 2026-07-11T23:09:46.119Z (5 days ago)
- Topics: admin-api, analytics, cli, command-line, data-api, developer-tools, ga4, google-analytics, google-api, nodejs, open-source, typescript, zosma-ai
- Language: TypeScript
- Homepage:
- Size: 693 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# @zosmaai/gacli
Google Analytics 4 CLI — Data API + Admin API, OAuth auth, multiple output formats, MCP server.
## Install
```bash
npm install -g @zosmaai/gacli
```
## Quick Start
```bash
# Authenticate (OAuth 2.0)
gacli auth login --client-secret /path/to/client_secret_*.json
# List accounts
gacli admin accounts list
# List properties for an account
gacli admin properties list --account
# Run a report
gacli report run --property 537354123 --dimensions date --metrics activeUsers --date-range 2025-06-01 2025-07-01
```
## Common Commands
```bash
# Admin API
gacli admin accounts list
gacli admin properties list --account
gacli admin properties data-governance --property
# Data API
gacli report run --property --dimensions date --metrics activeUsers
gacli report run --property --dimensions pageTitle --metrics screenPageViews --date-range 28daysAgo today
# Check metadata compatibility
gacli metadata compatibility --property
```
## Output Formats
```bash
gacli admin accounts list -f json
gacli admin accounts list -f csv
gacli admin accounts list -f table
```
## Release
Tag and push to trigger npm publish:
```bash
git tag v1.x.x && git push origin v1.x.x
```
## Links
- Repo: https://github.com/zosmaai/gacli
- npm: https://www.npmjs.com/package/@zosmaai/gacli