{"id":47671452,"url":"https://github.com/nomanr/logpeek","last_synced_at":"2026-04-06T18:00:34.865Z","repository":{"id":348286910,"uuid":"1197426916","full_name":"nomanr/logpeek","owner":"nomanr","description":"logpeek — Peek into mobile device logs from AI coding agents. Give your agent eyes into Android \u0026 iOS logs.","archived":false,"fork":false,"pushed_at":"2026-03-31T16:11:08.000Z","size":81,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-05T17:02:43.123Z","etag":null,"topics":["ai-agent","android","claude-code","cli","coding-agent","debugging","developer-tools","flutter","ios","logcat","logs","mcp","mobile","react-native"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nomanr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-31T15:14:44.000Z","updated_at":"2026-03-31T22:54:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nomanr/logpeek","commit_stats":null,"previous_names":["nomanr/logpipe"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nomanr/logpeek","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomanr%2Flogpeek","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomanr%2Flogpeek/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomanr%2Flogpeek/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomanr%2Flogpeek/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nomanr","download_url":"https://codeload.github.com/nomanr/logpeek/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomanr%2Flogpeek/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31483380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T17:22:55.647Z","status":"ssl_error","status_checked_at":"2026-04-06T17:22:54.741Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","android","claude-code","cli","coding-agent","debugging","developer-tools","flutter","ios","logcat","logs","mcp","mobile","react-native"],"created_at":"2026-04-02T12:55:19.128Z","updated_at":"2026-04-06T18:00:34.622Z","avatar_url":"https://github.com/nomanr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# logpeek\n\nPeek into mobile device logs from AI coding agents.\n\nlogpeek gives coding agents like Claude Code, Cursor, and Gemini CLI direct access to Android and iOS device logs.\n\n\u003cp\u003e\n  \u003ca href=\"https://www.npmjs.com/package/logpeek\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/logpeek?style=flat-square\u0026color=e8a23e\u0026label=npm\" alt=\"npm version\" /\u003e\u003c/a\u003e\n  \u0026nbsp;\n  \u003ca href=\"https://github.com/nomanr/logpeek/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/logpeek?style=flat-square\u0026color=c49344\" alt=\"license\" /\u003e\u003c/a\u003e\n  \u0026nbsp;\n  \u003ca href=\"https://www.npmjs.com/package/logpeek\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/logpeek?style=flat-square\u0026color=b8860b\" alt=\"downloads\" /\u003e\u003c/a\u003e\n  \u0026nbsp;\n  \u003cimg src=\"https://img.shields.io/badge/iOS%20%7C%20Android-e8a23e?style=flat-square\u0026label=platform\" alt=\"platform\" /\u003e\n\u003c/p\u003e\n\n\nhttps://github.com/user-attachments/assets/06f707f4-0edc-48b7-852a-7adf0286725e\n\n\n## What you can do\n\nAsk your agent things like:\n\n- **\"Why is my app crashing on launch?\"** — agent pulls crash logs, finds the stack trace, and fixes the issue\n- **\"Show me the last 30 seconds of error logs\"** — narrow time window, error-level filtering\n- **\"What's happening in the React Native JS layer?\"** — isolate framework-specific logs from native noise\n- **\"Check the network logs for failures\"** — grep through logs for specific patterns\n- **\"My app is slow, what's going on?\"** — pull verbose logs and spot the bottleneck\n\n## Quick Start\n\n### 1. Install\n\n```bash\nnpm install -g logpeek\n```\n\n### 2. Connect your agent\n\n\u003cdetails open\u003e\n\u003csummary\u003e\u003cstrong\u003eClaude Code\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\nnpx logpeek init\n```\n\nRegisters logpeek as a Claude Code plugin. Restart Claude Code after.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eOther agents\u003c/strong\u003e\u003c/summary\u003e\n\nAny agent that runs shell commands can use logpeek. Add this to your agent's system prompt:\n\n```\nYou have access to `logpeek` for collecting mobile device logs:\n- logpeek --app com.example.app                       # collect logs (last 5m)\n- logpeek --app com.example.app --level error          # errors only\n- logpeek --app com.example.app -f react-native        # React Native logs only\n- logpeek --app com.example.app --grep \"network\"       # search logs\n- logpeek --app com.example.app --last 30s             # narrow time window\n- logpeek devices                                      # list connected devices\n```\n\n\u003c/details\u003e\n\n### 3. Verify\n\n```bash\nnpx logpeek doctor\n```\n\nChecks that `adb` (Android) and `xcrun` (iOS) are available and ready.\n\n## Commands\n\n```bash\n# Collect logs (default command)\nlogpeek --app com.example.app\nlogpeek                                          # interactive device \u0026 app picker\n\n# List connected devices\nlogpeek devices\n\n# Check prerequisites\nlogpeek doctor\n\n# Register Claude Code plugin\nlogpeek init\n```\n\n## Flags\n\n| Flag | Short | Default | Description |\n|------|-------|---------|-------------|\n| `--app \u003cid\u003e` | `-a` | interactive | Bundle ID (iOS) or package name (Android) |\n| `--device \u003cid\u003e` | `-d` | auto | Device ID or name |\n| `--platform \u003ctype\u003e` | `-p` | auto | `android` or `ios` |\n| `--level \u003clevel\u003e` | `-l` | `verbose` | Minimum log level: `verbose`, `debug`, `info`, `warn`, `error` |\n| `--source \u003ctype\u003e` | `-s` | `all` | Log source: `all`, `native`, `framework` |\n| `--framework \u003ctype\u003e` | `-f` | — | `react-native` or `flutter`. Automatically sets `--source framework`. |\n| `--last \u003cduration\u003e` | `-t` | `5m` | Time window (e.g., `30s`, `1m`, `5m`, `1h`) |\n| `--lines \u003cn\u003e` | `-n` | `200` | Max lines to output |\n| `--grep \u003cpattern\u003e` | `-g` | — | Case-insensitive text filter |\n| `--verbose` | | — | Debug logging |\n| `--quiet` | | — | Suppress output except errors |\n\n## Examples\n\n```bash\n# All logs from last 5 minutes\nlogpeek --app com.example.app\n\n# Errors only, last 30 seconds\nlogpeek --app com.example.app --level error --last 30s\n\n# React Native JS logs only (-f implies --source framework)\nlogpeek --app com.example.app -f react-native\n\n# Search for network-related errors\nlogpeek --app com.example.app --grep \"network\" --level error\n\n# Target a specific device\nlogpeek --app com.example.app -d \"iPhone 16\"\n\n# Combine framework filter with grep\nlogpeek --app com.example.app -f react-native --grep \"inventory\" --level error\n\n# Widen the window for intermittent issues\nlogpeek --app com.example.app --last 30m -n 500\n```\n\n## Log Output\n\nLogs are automatically formatted for readability:\n\n```\n15:47:37 INF [Network] GET /api/cart → 200 OK (142ms)\n15:47:37 INF [Network] GET /api/user/profile → 401 Unauthorized\n15:47:37 WRN [Auth] Session token expired, refreshing...\n15:47:37 INF [Network] POST /api/auth/refresh → 200 OK (203ms)\n15:47:39 ERR [Inventory] Failed to verify stock: Connection timeout after 5000ms\n15:47:39 INF [Performance] JS thread: 58.2fps | UI thread: 60.0fps\n```\n\nRaw platform timestamps and process metadata are stripped. Level indicators (`INF`, `WRN`, `ERR`, `DBG`) and categories are preserved.\n\n## How It Works\n\n**Android**: Uses `adb logcat` with PID filtering. If the app has crashed (no PID), automatically includes `AndroidRuntime` and `FATAL EXCEPTION` logs.\n\n**iOS**: Uses `xcrun simctl spawn \u003cudid\u003e log show` with process/subsystem predicates. Falls back to `ReportCrash` and `SpringBoard` logs for crash debugging.\n\n**Filtering**: Logs pass through a pipeline — format → level filter → source filter → grep filter → line limit. Filters combine with AND logic.\n\n**Device discovery**: Automatically detects booted Android emulators (`adb devices`) and iOS simulators (`xcrun simctl list`). If multiple devices are found, an interactive picker is shown.\n\n## Framework Support\n\n| Framework | Android | iOS |\n|-----------|---------|-----|\n| React Native | `ReactNativeJS` tag | `com.facebook.react.runtime.JavaScript` |\n| Flutter | `flutter` tag | `flutter` subsystem |\n| Native | Full logcat | Full unified log |\n\n## Platform Support\n\n| Platform | Emulator/Simulator | Physical Device |\n|----------|-------------------|-----------------|\n| Android  | Supported         | Not yet         |\n| iOS      | Supported (macOS only) | Not yet    |\n\n## Requirements\n\n- **Node.js** \u003e= 18\n- **Android**: `adb` available, emulator booted\n- **iOS**: macOS with `xcrun simctl`, simulator booted\n\n## Development\n\n```bash\nnpm install\nnpm run dev          # watch mode\nnpm test             # run tests\nnpm run build        # production build\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomanr%2Flogpeek","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnomanr%2Flogpeek","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomanr%2Flogpeek/lists"}