⭐️ A cross-platform CLI All-in-One assistant tool for Claude Code, Codex & Gemini CLI.
This report summarizes scanner evidence for SaladDay/cc-switch-cli, a Rust project with 5,421 GitHub stars. SynthScan examined 435,713 lines of code across 487 source files, recording 257 pattern matches distributed across 14 syntactic categories. The legacy adjusted pattern signal is 0.8 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 189 finding(s).
Are imports declared and package/API names verified? 23 finding(s).
Are wrappers, guards, and repeated structures necessary? 58 finding(s).
Which changes need focused human review? 257 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 257 distinct pattern matches across 14 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src-tauri/tests/proxy_daemon.rs | 1 | //! End-to-end tests for the supervisor daemon. | COMMENT |
| LOW | src-tauri/tests/proxy_daemon.rs | 621 | ); | COMMENT |
| LOW | src-tauri/tests/proxy_daemon.rs | 721 | /// Concurrency reproducer for "daemon ensure worker failed: Resource | COMMENT |
| LOW | src-tauri/src/hermes_config.rs | 1 | //! Hermes Agent configuration read/write module (ported from upstream cc-switch). | COMMENT |
| LOW | src-tauri/src/hermes_config.rs | 21 | //! base_url: https://openrouter.ai/api/v1 | COMMENT |
| LOW | src-tauri/src/hermes_config.rs | 121 | // Type Definitions | COMMENT |
| LOW | src-tauri/src/hermes_config.rs | 641 | // Provider Public API | COMMENT |
| LOW | src-tauri/src/provider.rs | 61 | // SSOT 模式:不再写供应商副本文件 | COMMENT |
| LOW | src-tauri/src/provider.rs | 81 | /// 备注信息 | COMMENT |
| LOW | src-tauri/src/provider.rs | 341 | #[serde(rename = "baseUrl")] | COMMENT |
| LOW | src-tauri/src/provider.rs | 361 | #[serde(rename = "codingPlanProvider")] | COMMENT |
| LOW | src-tauri/src/provider.rs | 401 | pub struct ProviderTestConfig { | COMMENT |
| LOW | src-tauri/src/provider.rs | 421 | #[serde(rename = "maxRetries", skip_serializing_if = "Option::is_none")] | COMMENT |
| LOW | src-tauri/src/provider.rs | 441 | #[serde(rename = "proxyUsername", skip_serializing_if = "Option::is_none")] | COMMENT |
| LOW | src-tauri/src/provider.rs | 461 | pub struct AuthBinding { | COMMENT |
| LOW | src-tauri/src/provider.rs | 481 | pub thinking_param: Option<String>, | COMMENT |
| LOW | src-tauri/src/provider.rs | 521 | /// Codex 官方供应商标记(官方无需填写 API Key,使用 codex login 凭证) | COMMENT |
| LOW | src-tauri/src/provider.rs | 541 | pub partner_promotion_key: Option<String>, | COMMENT |
| LOW | src-tauri/src/provider.rs | 561 | /// - "anthropic": 原生 Anthropic Messages API,直接透传 | COMMENT |
| LOW | src-tauri/src/provider.rs | 581 | /// fallback. Keeping it per provider avoids hard failures on lower-ceiling | COMMENT |
| LOW | src-tauri/src/provider.rs | 601 | skip_serializing_if = "Option::is_none" | COMMENT |
| LOW | src-tauri/src/codex_config.rs | 21 | /// | COMMENT |
| LOW | src-tauri/src/codex_config.rs | 421 | COMMENT | |
| LOW | src-tauri/src/codex_config.rs | 641 | struct CodexCatalogModelSpec { | COMMENT |
| LOW | src-tauri/src/usage_events.rs | 1 | //! Usage event notification shim for the CLI build. | COMMENT |
| LOW | src-tauri/src/app_config.rs | 161 | /// 仓库所有者(GitHub 用户/组织) | COMMENT |
| LOW | src-tauri/src/app_config.rs | 181 | #[serde(default)] | COMMENT |
| LOW | src-tauri/src/app_config.rs | 441 | #[derive(Debug, Clone, Serialize, Deserialize)] | COMMENT |
| LOW | src-tauri/src/settings.rs | 341 | /// These settings live in `settings.json`; they are intentionally not part of | COMMENT |
| LOW | src-tauri/src/settings.rs | 501 | #[serde(default)] | COMMENT |
| LOW | src-tauri/src/settings.rs | 521 | pub enable_claude_plugin_integration: bool, | COMMENT |
| LOW | src-tauri/src/settings.rs | 561 | #[serde(default, skip_serializing_if = "Option::is_none")] | COMMENT |
| LOW | src-tauri/src/settings.rs | 581 | /// into the shared bucket. Persisted so a failed migration retries at startup; | COMMENT |
| LOW | src-tauri/src/gemini_config.rs | 61 | /// 返回 `AppError` 如果遇到以下情况: | COMMENT |
| LOW | src-tauri/src/gemini_config.rs | 381 | COMMENT | |
| LOW | src-tauri/src/gemini_config.rs | 401 | /// 保留文件中的其他所有字段。 | COMMENT |
| LOW | src-tauri/src/mcp.rs | 1421 | pub fn remove_server_from_opencode(id: &str) -> Result<(), AppError> { | COMMENT |
| LOW | src-tauri/src/session_manager/cache.rs | 1 | //! Persistent session-scan metadata cache (stale-while-revalidate). | COMMENT |
| LOW | src-tauri/src/session_manager/cache.rs | 21 | /// Version tag written with every cached row. Bump this constant whenever the | COMMENT |
| LOW | src-tauri/src/session_manager/scan_cache_store.rs | 41 | } | COMMENT |
| LOW | src-tauri/src/session_manager/scan_cache_store.rs | 61 | pub state: Option<String>, | COMMENT |
| LOW | src-tauri/src/session_manager/paged_manifest.rs | 1 | //! Schema-free, page-oriented storage for very large Sessions lists. | COMMENT |
| LOW | src-tauri/src/session_manager/mod.rs | 21 | COMMENT | |
| LOW | src-tauri/src/session_manager/mod.rs | 41 | #[serde(skip_serializing_if = "Option::is_none")] | COMMENT |
| LOW | src-tauri/src/session_manager/providers/opencode.rs | 421 | /// summary 晚到/变化不改变 session JSON 与 message 目录 stat,缓存会长期返回 | COMMENT |
| LOW | src-tauri/src/database/mod.rs | 1 | //! 数据库模块 - SQLite 数据持久化 | COMMENT |
| LOW | src-tauri/src/database/mod.rs | 881 | Ok(_) => {} | COMMENT |
| LOW | src-tauri/src/database/dao/usage_rollup.rs | 1 | //! Usage rollup DAO | COMMENT |
| LOW | src-tauri/src/proxy/copilot_optimizer.rs | 1 | //! Copilot 请求优化器 | COMMENT |
| LOW | src-tauri/src/proxy/copilot_optimizer.rs | 21 | pub initiator: &'static str, | COMMENT |
| LOW | src-tauri/src/proxy/copilot_optimizer.rs | 321 | COMMENT | |
| LOW | src-tauri/src/proxy/copilot_optimizer.rs | 361 | COMMENT | |
| LOW | src-tauri/src/proxy/copilot_optimizer.rs | 441 | } | COMMENT |
| LOW | src-tauri/src/proxy/types.rs | 61 | #[derive(Debug, Clone, Serialize, Deserialize, Default)] | COMMENT |
| LOW | src-tauri/src/proxy/types.rs | 81 | /// 失败请求数 | COMMENT |
| LOW | src-tauri/src/proxy/types.rs | 241 | } | COMMENT |
| LOW | src-tauri/src/proxy/gemini_url.rs | 1 | //! Gemini Native URL helpers. | COMMENT |
| LOW | src-tauri/src/proxy/gemini_url.rs | 601 | COMMENT | |
| LOW | src-tauri/src/proxy/gemini_url.rs | 641 | false, | COMMENT |
| LOW | src-tauri/src/proxy/providers/copilot_model_map.rs | 1 | //! GitHub Copilot 模型 ID 归一化与 live-list 解析 | COMMENT |
| 95 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | install.sh | 17 | # ── helpers ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | install.sh | 160 | # ── platform detection ─────────────────────────────────────────────── | COMMENT |
| MEDIUM | install.sh | 190 | # ── download & extract ─────────────────────────────────────────────── | COMMENT |
| MEDIUM | install.sh | 240 | # ── install ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | install.sh | 324 | # ── main ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/session_manager/providers/hermes.rs | 386 | // ── SQLite scanning ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/session_manager/providers/hermes.rs | 612 | // ── JSONL scanning ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/proxy/copilot_optimizer.rs | 483 | // ─── 内部辅助 ───────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/proxy/copilot_optimizer.rs | 623 | // ─── 测试 ───────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/services/coding_plan.rs | 13 | // ── 供应商检测 ────────────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/services/coding_plan.rs | 97 | // ── Kimi For Coding ───────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/services/coding_plan.rs | 197 | // ── 智谱 GLM ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/services/coding_plan.rs | 346 | // ── MiniMax ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/services/coding_plan.rs | 469 | // ── OpenCode Go ───────────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/services/coding_plan.rs | 588 | // ── 公开入口 ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/services/balance.rs | 9 | // ── 供应商检测 ────────────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/services/balance.rs | 64 | // ── DeepSeek ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/services/balance.rs | 136 | // ── StepFun ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/services/balance.rs | 188 | // ── SiliconFlow ───────────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/services/balance.rs | 252 | // ── OpenRouter ────────────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/services/balance.rs | 311 | // ── Novita AI ─────────────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/services/balance.rs | 369 | // ── 工具函数 ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | src-tauri/src/services/balance.rs | 379 | // ── 公开入口 ──────────────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | scripts/benchmark_cc_switch.py | 368 | except sqlite3.Error: | CODE |
| HIGH | scripts/benchmark_cc_switch.py | 927 | except Exception: | CODE |
| HIGH | scripts/benchmark_cc_switch.py | 985 | except Exception: | CODE |
| HIGH | scripts/benchmark_cc_switch.py | 519 | except sqlite3.Error: | CODE |
| HIGH | scripts/benchmark_cc_switch.py | 1172 | except Exception: | CODE |
| HIGH | scripts/benchmark_cc_switch.py | 1241 | except OSError: | CODE |
| HIGH | scripts/benchmark_cc_switch.py | 1254 | except OSError: | CODE |
| HIGH | scripts/benchmark_cc_switch.py | 2079 | except Exception: | CODE |
| HIGH | scripts/benchmark_cc_switch.py | 2000 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src-tauri/src/cli/i18n.rs | 11341 | "⚠ 请确保已设置环境变量 {} 并包含您的 API 密钥\n 例如: export {}=\"your-api-key\"", | CODE |
| HIGH | src-tauri/src/cli/i18n.rs | 11346 | "⚠ Make sure to set the {} environment variable with your API key\n Example: export {}=\"your-api-key\" | CODE |
| HIGH | src-tauri/src/cli/i18n.rs | 11366 | 例如: export {}=\"your-api-key\"", | CODE |
| HIGH | src-tauri/src/cli/i18n.rs | 11374 | Example: export {}=\"your-api-key\"", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src-tauri/tests/credential_display_commands.rs | 288 | "user@example.com", | CODE |
| LOW | src-tauri/tests/webdav_settings.rs | 16 | username: "user@example.com".to_string(), | CODE |
| LOW | src-tauri/src/proxy/providers/codex_oauth_auth.rs | 1723 | Some("user@example.com".to_string()), | CODE |
| LOW | src-tauri/src/proxy/providers/codex_oauth_auth.rs | 1958 | Some("user@example.com".to_string()), | CODE |
| LOW | src-tauri/src/proxy/providers/codex_oauth_auth.rs | 1970 | Some("user@example.com".to_string()), | CODE |
| LOW | src-tauri/src/proxy/providers/codex_oauth_auth.rs | 2034 | Some("user@example.com".to_string()), | CODE |
| LOW | src-tauri/src/proxy/providers/codex_oauth_auth.rs | 2065 | Some("user@example.com".to_string()), | CODE |
| LOW | src-tauri/src/proxy/providers/codex_oauth_auth.rs | 2397 | Some("user@example.com".to_string()), | CODE |
| LOW | src-tauri/src/proxy/providers/codex_oauth_auth.rs | 2430 | Some("user@example.com".to_string()), | CODE |
| LOW | src-tauri/src/proxy/providers/codex_oauth_auth.rs | 2481 | Some("user@example.com".to_string()), | CODE |
| LOW | src-tauri/src/proxy/providers/codex_oauth_auth.rs | 2510 | Some("user@example.com".to_string()), | CODE |
| LOW | src-tauri/src/proxy/providers/codex_oauth_auth.rs | 2526 | Some("user@example.com".to_string()), | CODE |
| LOW | src-tauri/src/cli/tui/app/form_handlers/provider.rs | 2103 | out.push_str("placeholder"); | CODE |
| LOW | src-tauri/src/daemon/paths.rs | 241 | file.write_all(b"placeholder") | CODE |
| LOW | src-tauri/src/daemon/migration.rs | 744 | std::fs::write(&database_path, b"placeholder").expect("create database placeholder"); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | src-tauri/src/services/env_manager.rs | 23 | // Step 1: Create backup | COMMENT |
| LOW⚡ | src-tauri/src/services/env_manager.rs | 26 | // Step 2: Delete variables | COMMENT |
| LOW⚡ | src-tauri/src/services/session_usage_codex.rs | 507 | // Step 1: 小写 | COMMENT |
| LOW⚡ | src-tauri/src/services/session_usage_codex.rs | 510 | // Step 2: 剥离 "provider/" 前缀(如 openai/, azure/) | COMMENT |
| LOW⚡ | src-tauri/src/services/session_usage_codex.rs | 515 | // Step 3: 剥离 ISO 日期后缀 -YYYY-MM-DD(正好 11 字符) | COMMENT |
| LOW | src-tauri/src/services/session_usage_codex.rs | 530 | // Step 4: 剥离紧凑日期后缀 -YYYYMMDD(正好 9 字符) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | src-tauri/src/services/env_manager.rs | 23 | // Step 1: Create backup | COMMENT |
| LOW⚡ | src-tauri/src/services/env_manager.rs | 26 | // Step 2: Delete variables | COMMENT |
| LOW⚡ | src-tauri/src/services/session_usage_codex.rs | 507 | // Step 1: 小写 | COMMENT |
| LOW⚡ | src-tauri/src/services/session_usage_codex.rs | 510 | // Step 2: 剥离 "provider/" 前缀(如 openai/, azure/) | COMMENT |
| LOW⚡ | src-tauri/src/services/session_usage_codex.rs | 515 | // Step 3: 剥离 ISO 日期后缀 -YYYY-MM-DD(正好 11 字符) | COMMENT |
| LOW | src-tauri/src/services/session_usage_codex.rs | 530 | // Step 4: 剥离紧凑日期后缀 -YYYYMMDD(正好 9 字符) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | scripts/test_benchmark_cc_switch.py | 20 | def test_sessions_loaded_requires_a_published_manifest(self) -> None: | CODE |
| LOW⚡ | scripts/test_benchmark_cc_switch.py | 29 | def test_next_page_does_not_accept_a_first_page_relative_time(self) -> None: | CODE |
| LOW⚡ | scripts/test_benchmark_cc_switch.py | 37 | def test_usage_loaded_rejects_the_loading_frame(self) -> None: | CODE |
| LOW | scripts/test_benchmark_cc_switch.py | 49 | def test_usage_loaded_accepts_a_nonzero_total_ending_in_zero(self) -> None: | CODE |
| LOW | scripts/test_benchmark_cc_switch.py | 56 | def test_manifest_snapshots_are_scoped_to_the_selected_app(self) -> None: | CODE |
| LOW | scripts/benchmark_cc_switch.py | 1330 | def effective_current_provider(paths: Paths, app: str) -> str | None: | STRING |
| LOW | scripts/benchmark_cc_switch.py | 1340 | def find_provider_by_name_prefix(paths: Paths, app: str, name: str, id_prefix: str) -> str | None: | STRING |
| LOW | scripts/benchmark_cc_switch.py | 1368 | def remove_provider_prefix_direct(paths: Paths, app: str, provider_id_prefix: str) -> None: | STRING |
| LOW | scripts/benchmark_cc_switch.py | 1659 | def tui_sessions_loaded_marker( | STRING |
| LOW | scripts/benchmark_cc_switch.py | 1689 | def tui_sessions_route_marker( | STRING |
| LOW | scripts/benchmark_cc_switch.py | 1725 | def tui_sessions_next_page_marker(screen: str, total: int) -> bool: | STRING |
| LOW | scripts/benchmark_cc_switch.py | 1743 | def session_manifest_pointer_snapshot(paths: Paths, app: str) -> bytes | None: | STRING |
| LOW | scripts/benchmark_cc_switch.py | 1906 | def sessions_manual_refresh_metadata_body(session: TuiSession) -> float: | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/benchmark_cc_switch.py | 1238 | def close(self) -> None: | CODE |
| LOW | scripts/benchmark_cc_switch.py | 150 | except Exception: | CODE |
| LOW | scripts/benchmark_cc_switch.py | 927 | except Exception: | STRING |
| LOW | scripts/benchmark_cc_switch.py | 985 | except Exception: | STRING |
| LOW | scripts/benchmark_cc_switch.py | 1172 | except Exception: | STRING |
| LOW | scripts/benchmark_cc_switch.py | 1789 | except Exception as exc: | STRING |
| LOW | scripts/benchmark_cc_switch.py | 1808 | except Exception as exc: | STRING |
| LOW | scripts/benchmark_cc_switch.py | 1823 | except Exception as exc: | STRING |
| LOW | scripts/benchmark_cc_switch.py | 2000 | except Exception: | STRING |
| LOW | scripts/benchmark_cc_switch.py | 2079 | except Exception: | STRING |
| LOW | scripts/check_benchmark_thresholds.py | 62 | except Exception as exc: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | src-tauri/src/resources/gpt5_5_template.json | 42 | "base_instructions": "You are Codex, a coding agent based on GPT-5. You and the user share one workspace, and your job | CODE |
| MEDIUM⚡ | src-tauri/src/resources/gpt5_5_template.json | 44 | "instructions_template": "You are Codex, a coding agent based on GPT-5. You and the user share one workspace, and yo | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/benchmark_cc_switch.py | 921 | CODE | |
| LOW | scripts/benchmark_cc_switch.py | 1458 | CODE | |
| LOW | scripts/benchmark_cc_switch.py | 1751 | CODE | |
| LOW | scripts/benchmark_cc_switch.py | 1012 | CODE | |
| LOW | scripts/benchmark_cc_switch.py | 1075 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/test_benchmark_cc_switch.py | 1 | CODE | |
| LOW | scripts/benchmark_cc_switch.py | 11 | CODE | |
| LOW | scripts/check_benchmark_thresholds.py | 4 | CODE | |
| LOW | scripts/check_benchmark_thresholds.py | 9 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | src-tauri/src/resources/gpt5_5_template.json | 42 | "base_instructions": "You are Codex, a coding agent based on GPT-5. You and the user share one workspace, and your job | CODE |
| LOW⚡ | src-tauri/src/resources/gpt5_5_template.json | 44 | "instructions_template": "You are Codex, a coding agent based on GPT-5. You and the user share one workspace, and yo | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/benchmark_cc_switch.py | 843 | def update_settings(paths: Paths) -> None: | STRING |
| LOW | scripts/benchmark_cc_switch.py | 982 | def set_pty_size(fd: int, rows: int = 40, cols: int = 120) -> None: | STRING |