{"id":50367542,"url":"https://github.com/simonswine/lptm","last_synced_at":"2026-05-30T05:01:45.206Z","repository":{"id":354635115,"uuid":"1223782926","full_name":"simonswine/lptm","owner":"simonswine","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-29T11:50:26.000Z","size":333,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-29T12:28:39.920Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonswine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-28T16:44:53.000Z","updated_at":"2026-04-29T11:50:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/simonswine/lptm","commit_stats":null,"previous_names":["simonswine/lptm"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/simonswine/lptm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonswine%2Flptm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonswine%2Flptm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonswine%2Flptm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonswine%2Flptm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonswine","download_url":"https://codeload.github.com/simonswine/lptm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonswine%2Flptm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33680527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-05-30T05:01:44.385Z","updated_at":"2026-05-30T05:01:45.183Z","avatar_url":"https://github.com/simonswine.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lptm\n\n**lptm** is a terminal UI for exploring logs, profiles, traces, and metrics through Grafana — the Grafana Explore experience, but in your terminal.\n\n## Features\n\n- Browse and filter Prometheus datasources configured in Grafana\n- Write and execute PromQL instant queries with syntax highlighting\n- Tab-completion for metric names, label names, and label values\n- Results displayed as a structured table\n- Query history scoped per datasource and Grafana instance, persisted across sessions\n\n## Requirements\n\n- A running Grafana instance with at least one Prometheus datasource\n- A Grafana service account token with datasource read access\n\n## Usage\n\n```sh\nlptm --grafana-url http://localhost:3000 --grafana-token \u003ctoken\u003e\n```\n\nOr via environment variables:\n\n```sh\nexport GRAFANA_URL=http://localhost:3000\nexport GRAFANA_TOKEN=\u003ctoken\u003e\nlptm\n```\n\n## Key bindings\n\n### Universal\n\n| Key | Action |\n|-----|--------|\n| `Ctrl+C` | Quit |\n| `Ctrl+R` | Reload / re-execute current view |\n| `Ctrl+T` | Open time range picker |\n\n### Datasource list\n\n| Key | Action |\n|-----|--------|\n| `j` / `↓` | Move down |\n| `k` / `↑` | Move up |\n| `/` | Open filter |\n| `f` | Toggle favourite |\n| `Tab` | Toggle history panel |\n| `Enter` | Open query editor |\n| `Esc` | Clear filter / quit |\n\n### Query editor (Prometheus)\n\n| Key | Action |\n|-----|--------|\n| `Enter` | Execute query |\n| `Tab` | Accept completion |\n| `↑` / `↓` | Navigate history / completions |\n| `←` / `→` | Move cursor |\n| `Home` / `Ctrl+A` | Jump to line start |\n| `End` / `Ctrl+E` | Jump to line end |\n| `Esc` | Back to datasource list |\n\n### Pyroscope\n\n| Key | Action |\n|-----|--------|\n| `j` / `↓` | Next service |\n| `k` / `↑` | Previous service |\n| `/` | Filter services |\n| `p` | Open profile type selector |\n| `Enter` | Load flamegraph |\n| `Tab` | Cycle views (Flamegraph → Timeline → Heatmap → SpanHeatmap) |\n| `h` / `←` | Move left in flamegraph |\n| `l` / `→` | Move right in flamegraph |\n| `k` / `↑` | Zoom out in flamegraph |\n| `j` / `↓` | Zoom in in flamegraph |\n| `Enter` / `z` | Zoom into frame |\n| `Backspace` / `o` | Zoom out frame |\n| `s` | Sandwich view |\n| `q` / `Esc` | Back to service list |\n\n### Tempo\n\n| Key | Action |\n|-----|--------|\n| `Enter` | Execute query |\n| `j` / `↓` | Next result |\n| `k` / `↑` | Previous result |\n| `←` / `→` | Move cursor |\n| `Ctrl+A` | Jump to line start |\n| `Ctrl+E` | Jump to line end |\n| `Esc` | Back to datasource list |\n\n### Tempo trace detail\n\n| Key | Action |\n|-----|--------|\n| `j` / `↓` | Next span |\n| `k` / `↑` | Previous span |\n| `J` | Scroll attributes down |\n| `K` | Scroll attributes up |\n| `/` | Filter spans |\n| `Esc` | Back to trace list |\n\n### Loki\n\n| Key | Action |\n|-----|--------|\n| `Enter` | Execute query |\n| `Tab` | Accept completion |\n| `↑` / `↓` | Navigate completions / results |\n| `Ctrl+A` | Jump to line start |\n| `Ctrl+E` | Jump to line end |\n| `Esc` | Dismiss completions / back |\n\n## Configuration\n\nlptm stores its data in `~/.config/lptm/`:\n\n| File | Purpose |\n|------|---------|\n| `history` | Query history (JSONL, one entry per line) |\n| `debug.log` | Debug log |\n\nEach history entry records the query, datasource name and type, a hash of the Grafana URL, and a Unix timestamp — so history is automatically scoped when you switch between datasources or Grafana instances.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonswine%2Flptm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonswine%2Flptm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonswine%2Flptm/lists"}