google-analytics-cli 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/PKG-INFO +1 -1
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/pyproject.toml +1 -1
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/agent_cmd.py +25 -3
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/uv.lock +1 -1
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/.github/workflows/ci.yml +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/.github/workflows/release.yml +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/.gitignore +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/.python-version +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/README.md +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/install.sh +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/__init__.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/api/__init__.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/api/client.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/auth/__init__.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/auth/credentials.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/auth/oauth.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/auth/service_account.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/__init__.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/access_bindings.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/access_reports.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/account_summaries.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/accounts.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/annotations.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/audiences.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/auth_cmd.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/bigquery_links.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/calculated_metrics.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/channel_groups.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/completions_cmd.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/config_cmd.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/custom_dimensions.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/custom_metrics.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/data_retention.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/data_streams.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/event_create_rules.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/event_edit_rules.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/firebase_links.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/google_ads_links.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/key_events.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/mp_secrets.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/properties.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/property_settings.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/reports.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/upgrade_cmd.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/config/__init__.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/config/constants.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/config/store.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/main.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/utils/__init__.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/utils/describe.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/utils/dry_run.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/utils/errors.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/utils/output.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/utils/pagination.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/__init__.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/conftest.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_access_bindings.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_access_reports.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_account_summaries.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_accounts.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_agent_cmd.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_annotations.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_api_client.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_audiences.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_auth_cmd.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_bigquery_links.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_calculated_metrics.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_channel_groups.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_completions_cmd.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_config_cmd.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_credentials.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_custom_dimensions.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_custom_metrics.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_data_retention.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_data_streams.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_describe.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_dry_run.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_errors.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_event_create_rules.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_event_edit_rules.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_firebase_links.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_google_ads_links.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_install_script.sh +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_key_events.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_mp_secrets.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_output.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_pagination.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_properties.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_property_settings.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_quiet_nocolor.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_reports.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_reports_batch.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_reports_funnel.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_reports_pivot.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_service_account.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_upgrade_cmd.py +0 -0
- {google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/tests/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: google-analytics-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Command-line interface for Google Analytics 4
|
|
5
5
|
Project-URL: Homepage, https://github.com/daidalytics/google-analytics-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/daidalytics/google-analytics-cli
|
|
@@ -74,7 +74,7 @@ ga account-summaries list [-o json]
|
|
|
74
74
|
|
|
75
75
|
### Properties
|
|
76
76
|
```bash
|
|
77
|
-
ga properties list [-a ACCOUNT_ID] [-o json]
|
|
77
|
+
ga properties list [-a ACCOUNT_ID] [-o json] # pipe: | jq '.[] | select(.displayName | test("prod"; "i"))'
|
|
78
78
|
ga properties get [-p PROPERTY_ID] [-o json]
|
|
79
79
|
ga properties create -a ACCOUNT_ID --name "Name" [--timezone TZ] [--currency CODE]
|
|
80
80
|
ga properties update -p PROPERTY_ID [--name NAME] [--timezone TZ] [--currency CODE] [--industry CAT]
|
|
@@ -237,7 +237,7 @@ Get/set hybrid: no update flags = GET, any update flag = PATCH. Enhanced measure
|
|
|
237
237
|
|
|
238
238
|
### Reports
|
|
239
239
|
```bash
|
|
240
|
-
ga reports run [-p PROPERTY_ID] -m metrics -d dimensions --start-date DATE --end-date DATE [--limit N] [-o json]
|
|
240
|
+
ga reports run [-p PROPERTY_ID] -m metrics -d dimensions --start-date DATE --end-date DATE [--limit N] [-o json] # pipe: | jq '[.[] | {date, sessions, users}]'
|
|
241
241
|
ga reports pivot [-p PROPERTY_ID] -m metrics -d dimensions --pivot-field FIELD [--start-date DATE] [-o json]
|
|
242
242
|
ga reports check-compatibility [-p PROPERTY_ID] [-m metrics] [-d dimensions] [-o json]
|
|
243
243
|
ga reports metadata [-p PROPERTY_ID] [--type metrics|dimensions] [--search TEXT] [-o json]
|
|
@@ -263,6 +263,28 @@ ga completions bash|zsh|fish
|
|
|
263
263
|
| `GA_CLI_CONFIG_DIR` | Override config directory |
|
|
264
264
|
| `NO_COLOR` | Disable colored output |
|
|
265
265
|
|
|
266
|
+
## Parsing Output
|
|
267
|
+
|
|
268
|
+
`-o json` produces machine-parseable output **meant for jq**. Always pipe through jq — never parse raw JSON manually.
|
|
269
|
+
|
|
270
|
+
### Reusable jq recipes
|
|
271
|
+
```bash
|
|
272
|
+
# Extract numeric IDs from resource names ("accounts/123" → "123")
|
|
273
|
+
ga accounts list -o json | jq -r '.[].name' | grep -o '[0-9]*$'
|
|
274
|
+
|
|
275
|
+
# Filter resources by display name (case-insensitive regex)
|
|
276
|
+
ga properties list -o json | jq '.[] | select(.displayName | test("prod"; "i"))'
|
|
277
|
+
|
|
278
|
+
# Pick specific fields
|
|
279
|
+
ga data-streams list -o json | jq '[.[] | {id: (.name | split("/") | last), displayName, type}]'
|
|
280
|
+
|
|
281
|
+
# Count results
|
|
282
|
+
ga custom-dimensions list -o json | jq 'length'
|
|
283
|
+
|
|
284
|
+
# Get first result's ID (useful for chaining)
|
|
285
|
+
ga properties list -o json | jq -r '.[0].name' | grep -o '[0-9]*$'
|
|
286
|
+
```
|
|
287
|
+
|
|
266
288
|
## Agent Workflow
|
|
267
289
|
Typical discover → act pattern:
|
|
268
290
|
```bash
|
|
@@ -299,7 +321,7 @@ ga data-streams list -o json | jq -r '.[].name' | grep -o '[0-9]*$'
|
|
|
299
321
|
- **Start with `ga --describe`** — discover every command, parameter, type, and flag in one JSON call; cache the result
|
|
300
322
|
- **Use `--dry-run` before mutations** — preview the exact API request before executing creates, updates, and deletes
|
|
301
323
|
- **Set defaults first** — eliminates repetitive `--account-id` / `--property-id` flags from every command
|
|
302
|
-
- **Always use `-o json`** —
|
|
324
|
+
- **Always use `-o json` and pipe through `jq`** — JSON output is machine-parseable; always pipe through `jq` to filter, extract IDs, or reshape — never parse raw output manually (see "Parsing Output" above)
|
|
303
325
|
- **Use `check-compatibility` before complex reports** — avoids API errors from incompatible metric/dimension combos
|
|
304
326
|
- **Use `metadata` to discover available metrics/dimensions** — `ga reports metadata -p ID --search revenue -o json`
|
|
305
327
|
- **Parallelize independent operations** — run creates/deletes concurrently with `&` and `wait`
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/auth/service_account.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/access_bindings.py
RENAMED
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/access_reports.py
RENAMED
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/account_summaries.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/annotations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/bigquery_links.py
RENAMED
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/calculated_metrics.py
RENAMED
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/channel_groups.py
RENAMED
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/completions_cmd.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/custom_dimensions.py
RENAMED
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/custom_metrics.py
RENAMED
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/data_retention.py
RENAMED
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/data_streams.py
RENAMED
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/event_create_rules.py
RENAMED
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/event_edit_rules.py
RENAMED
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/firebase_links.py
RENAMED
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/google_ads_links.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/property_settings.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_analytics_cli-0.1.0 → google_analytics_cli-0.1.1}/src/ga_cli/commands/upgrade_cmd.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|