Skip to content

: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.

feat(devenv): fetch news from master with local fallback (#57933)

Julian Bezd49907040a96
diff --git a/devenv/news.txt b/devenv/news.txt
index e769655e8c9d..70a819e4e579 100644
--- a/devenv/news.txt
+++ b/devenv/news.txt
@@ -1,5 +1,5 @@
-hogli dev:setup now lets you configure which services to start
-Use 'hogli dev:explain' to see why each service is running
-hogli now collects anonymous usage data - run 'hogli telemetry:status' for details
-Press 't' in phrocs to toggle services on or off — replaces hogli dev:setup
-hogli now supports detached mode: run hogli up -d, then hogli wait / hogli down
+2026-05-05
+check product maturity: hogli product:maturity <product>, or --all for a leaderboard
+
+2026-04-30
+hogli now supports detached mode: hogli up -d, then hogli wait / hogli down
diff --git a/tools/hogli-commands/hogli_commands/devenv/generator.py b/tools/hogli-commands/hogli_commands/devenv/generator.py
index 3ae6afb5f4d6..5b7d29c41b9c 100644
--- a/tools/hogli-commands/hogli_commands/devenv/generator.py
+++ b/tools/hogli-commands/hogli_commands/devenv/generator.py
@@ -208,8 +208,8 @@ class MprocsGenerator(ConfigGenerator):
def _build_info_process(self, proc_config: dict[str, Any], resolved: ResolvedEnvironment) -> dict[str, Any]:
"""Update the info process config with a generated shell command.
- News is read at runtime from devenv/news.txt so developers always see the
- latest items without re-running hogli dev:generate.
+ News is fetched live from master so developers on older branches still
+ see current announcements. Falls back to the local copy when offline.
"""
process_count = len(resolved.units)
products = sorted(resolved.intents) if resolved.intents else ["(none)"]
@@ -221,23 +221,18 @@ class MprocsGenerator(ConfigGenerator):
bold = r"\033[1m"
reset = r"\033[0m"
- # news.txt sits next to intent-map.yaml in the devenv/ directory, which
- # is at the repo root — the same cwd mprocs launches from.
- news_path = "devenv/news.txt"
+ news_url = "https://raw.githubusercontent.com/posthog/posthog/master/devenv/news.txt"
+ news_local = "devenv/news.txt"
shell = f"""\
echo ''
printf '{orange}{bold} PostHog Dev Environment{reset}\\n'
printf '{gray} ─────────────────────────────────────{reset}\\n'
echo ''
-if [ -f {news_path} ]; then
+_news=$(curl -sf --max-time 2 '{news_url}' 2>/dev/null || cat {news_local} 2>/dev/null || true)
+if [ -n "$_news" ]; then
printf ' {orange}{bold}News:{reset}\\n'
- git blame --date=short {news_path} 2>/dev/null | \\
- awk '{{match($0,/[0-9]{{4}}-[0-9]{{2}}-[0-9]{{2}}/); d=substr($0,RSTART,RLENGTH); sub(/.*\\) /,""); if($0!="") print d"|"$0}}' | \\
- sort -r | \\
- while IFS='|' read -r date content; do
- printf ' {gray}%s{reset} %s\\n' "$date" "$content"
- done
+ printf '%s\\n' "$_news" | sed 's/^/ /'
echo ''
fi
printf ' {bold}Commands:{reset}\\n'
diff --git a/tools/hogli-commands/hogli_commands/tests/test_devenv.py b/tools/hogli-commands/hogli_commands/tests/test_devenv.py
index 1a0fd852682c..baad5ac39160 100644
--- a/tools/hogli-commands/hogli_commands/tests/test_devenv.py
+++ b/tools/hogli-commands/hogli_commands/tests/test_devenv.py
@@ -547,14 +547,13 @@ class TestInfoProcess:
assert f"{expected_count} active" in shell
def test_info_process_reads_news_at_runtime(self) -> None:
- """Info process shell reads news.txt at runtime via git blame for dates."""
+ """Info process shell fetches news from master with local fallback."""
procs = self._generate_with_intents(["feature_flags"])
shell = procs["info"]["shell"]
- assert "devenv/news.txt" in shell
+ assert "raw.githubusercontent.com/posthog/posthog/master/devenv/news.txt" in shell
+ assert "cat devenv/news.txt" in shell # local fallback
assert "News:" in shell
- assert "git blame" in shell
- assert "sort -r" in shell
def test_info_process_includes_commands(self) -> None:
"""Info process shell includes useful commands."""