:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(hogli): read metabase cookies from arc (#81038)
Michael Matlokaf4a34f26d16e
diff --git a/tools/hogli-commands/hogli_commands/metabase.py b/tools/hogli-commands/hogli_commands/metabase.pyindex f3f7a99c3b3f..605b35b5eeca 100644--- a/tools/hogli-commands/hogli_commands/metabase.py+++ b/tools/hogli-commands/hogli_commands/metabase.py@@ -40,6 +40,7 @@ _CHROMIUM_PROFILE_ROOTS: dict[str, list[Path]] = {"chrome": [_HOME / "Library/Application Support/Google/Chrome"],"chromium": [_HOME / "Library/Application Support/Chromium"],"brave": [_HOME / "Library/Application Support/BraveSoftware/Brave-Browser"],+ "arc": [_HOME / "Library/Application Support/Arc/User Data"],"dia": [_HOME / "Library/Application Support/Dia/User Data"],}@@ -54,7 +55,7 @@ REQUIRED_COOKIES: tuple[str, ...] = ("ph_int_auth-0","ph_int_auth-1",)-SUPPORTED_BROWSERS: tuple[str, ...] = ("chrome", "chromium", "brave", "dia", "firefox", "safari")+SUPPORTED_BROWSERS: tuple[str, ...] = ("chrome", "chromium", "brave", "arc", "dia", "firefox", "safari")CACHE_DIR: Path = Path.home() / ".config" / "posthog" / "metabase"@@ -69,7 +70,7 @@ def _format_cookie_header(cookies: dict[str, str]) -> str:def _enumerate_cookie_files(browser: str | None) -> list[tuple[str, Path]]:"""Return (loader_name, cookie_file_path) pairs for every browser profile to try.- Chromium-family browsers (Chrome, Brave, Chromium, Dia) keep a `Cookies`+ Chromium-family browsers (Chrome, Brave, Chromium, Arc, Dia) keep a `Cookies`SQLite db per profile (`Default`, `Profile 1`, ...). We glob each profiledirectory so users with multiple profiles (work + personal) don't have tocare which one they logged in with.