Repository Analysis

googleworkspace/cli

Google Workspace CLI — one command-line tool for Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin, and more. Dynamically built from Google Discovery Service. Includes AI agent skills.

4.6 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of googleworkspace/cli, a Rust project with 29,674 GitHub stars. SynthScan v2.0 examined 42,720 lines of code across 211 source files, recording 116 pattern matches distributed across 5 syntactic categories. The overall adjusted score of 4.6 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

4.6
Adjusted Score
4.6
Raw Score
100%
Time Factor
2026-07-01
Last Push
29.7K
Stars
Rust
Language
42.7K
Lines of Code
211
Files
116
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 0MEDIUM 40LOW 76

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 116 distinct pattern matches across 5 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Decorative Section Separators39 hits · 117 pts
SeverityFileLineSnippetContext
MEDIUMcrates/google-workspace/src/validate.rs24// ── Dangerous character detection ─────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace/src/validate.rs63// ── Path validators ───────────────────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace/src/validate.rs273// ── URL encoding ──────────────────────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace/src/validate.rs295// ── Resource / API validators ─────────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/auth_commands.rs2027 // ── is_workspace_admin_scope tests ──────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/auth_commands.rs2104 // ── is_workspace_admin_scope – new patterns ─────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/auth_commands.rs2132 // ── scope_matches_service tests ──────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/auth_commands.rs2239 // ── services filter integration tests ────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/output.rs25// ── Sanitization ──────────────────────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/output.rs45// ── Color ─────────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/output.rs65// ── Stderr helpers ────────────────────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/output.rs93 // ── sanitize_for_terminal ─────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/output.rs149 // ── colorize ──────────────────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup_tui.rs463// ── Setup Wizard (unified TUI session) ──────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup_tui.rs885 // ── PickerState unit tests ──────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup_tui.rs931 // ── handle_key / key-sequence tests ─────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup_tui.rs1132 // ── InputState tests ───────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup_tui.rs1225 // ── GoBack key tests ───────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup_tui.rs1251 // ── selected_count tests ───────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup_tui.rs1281 // ── is_fixed item tests ────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup_tui.rs1318 // ── Single-select picker tests ─────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup_tui.rs1415 // ── Template toggling tests ────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup_tui.rs1552 // ── Readonly/superset scope interaction tests ──────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup_tui.rs1629 // ── wrap_text tests ────────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup_tui.rs1674 // ── PickerState::new initial selection tests ───────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup_tui.rs1691 // ── Edge case tests ────────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup.rs429// ── gcloud helpers ──────────────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup.rs743// ── API enabling ────────────────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup.rs853// ── OAuth REST API ──────────────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup.rs915// ── Main setup orchestrator ─────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup.rs1722 // ── Action resolution (test-only) ───────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup.rs1764 // ── Helpers ─────────────────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup.rs1794 // ── API / data tests ────────────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup.rs1848 // ── parse_setup_args tests ──────────────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup.rs1985 // ── Account selection → gcloud action ───────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup.rs2013 // ── Project selection → gcloud action ───────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup.rs2055 // ── API selection → enable action ───────────────────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup.rs2115 // ── Full pipeline: keys → picker → gcloud action ────────────COMMENT
MEDIUMcrates/google-workspace-cli/src/setup.rs2275 // ── enable_apis unit tests ──────────────────────────────────COMMENT
Over-Commented Block70 hits · 70 pts
SeverityFileLineSnippetContext
LOWCargo.toml1# Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace/Cargo.toml1# Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace/src/client.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace/src/error.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace/src/discovery.rs1#![allow(dead_code)]COMMENT
LOWcrates/google-workspace/src/lib.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace/src/services.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace/src/validate.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace/src/validate.rs161COMMENT
LOWcrates/google-workspace-cli/Cargo.toml1# Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/token_storage.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/credential_store.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/generate_skills.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/oauth_config.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/oauth_config.rs21//! "client_id": "...apps.googleusercontent.com",COMMENT
LOWcrates/google-workspace-cli/src/client.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/error.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/discovery.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/fs_util.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/logging.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/logging.rs21//! ## Environment VariablesCOMMENT
LOWcrates/google-workspace-cli/src/auth.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/auth.rs201}COMMENT
LOWcrates/google-workspace-cli/src/formatter.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/formatter.rs21COMMENT
LOWcrates/google-workspace-cli/src/services.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/auth_commands.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/auth_commands.rs841 "slides" => vec!["presentations"],COMMENT
LOWcrates/google-workspace-cli/src/auth_commands.rs1581/// (requires a Chat app or service account).COMMENT
LOWcrates/google-workspace-cli/src/commands.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/schema.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/executor.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/executor.rs381COMMENT
LOWcrates/google-workspace-cli/src/output.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/timezone.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/main.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/text.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/text.rs21/// Max chars for skill body method descriptions (markdown, agents benefit from detail).COMMENT
LOWcrates/google-workspace-cli/src/setup_tui.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/validate.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/setup.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/helpers/docs.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/helpers/sheets.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/helpers/drive.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/helpers/mod.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/helpers/script.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/helpers/workflows.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/helpers/calendar.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/helpers/modelarmor.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/helpers/chat.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/helpers/chat.rs161/// We use `String` here to own the data, as it will be used to constructCOMMENT
LOWcrates/google-workspace-cli/src/helpers/events/mod.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/helpers/gmail/send.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/helpers/gmail/mod.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/helpers/gmail/mod.rs1301/// Read and validate attachments from `--attach` arguments.COMMENT
LOWcrates/google-workspace-cli/src/helpers/gmail/read.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/helpers/gmail/reply.rs1// Copyright 2026 Google LLCCOMMENT
LOW…ates/google-workspace-cli/src/helpers/gmail/forward.rs1// Copyright 2026 Google LLCCOMMENT
LOWcrates/google-workspace-cli/src/helpers/gmail/triage.rs1// Copyright 2026 Google LLCCOMMENT
LOWscripts/show-art.sh1#!/bin/bashCOMMENT
10 more matches not shown…
Fake / Example Data5 hits · 5 pts
SeverityFileLineSnippetContext
LOWcrates/google-workspace-cli/src/setup.rs1937 "user@example.com",CODE
LOWcrates/google-workspace-cli/src/setup.rs1945 assert!(msg.contains("user@example.com"));CODE
LOWcrates/google-workspace-cli/src/helpers/gmail/mod.rs2681 assert!(m.email.contains("foo@bar.com"));CODE
LOWskills/recipe-sync-contacts-to-sheet/SKILL.md273. Append each contact row: `gws sheets +append --spreadsheet SHEET_ID --range 'Contacts' --values '["Jane Doe", "jane@cCODE
LOWskills/recipe-log-deal-update/SKILL.md273. Append new row: `gws sheets +append --spreadsheet SHEET_ID --range 'Pipeline' --values '["2024-03-15", "Acme Corp", "CODE
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMcrates/google-workspace-cli/src/helpers/README.md46### ✅ Good Flags (control orchestration)COMMENT
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWscripts/coverage.sh18# Check if cargo-llvm-cov is installedCOMMENT