{"id":30224825,"url":"https://github.com/walles/moor","last_synced_at":"2026-04-26T19:02:10.525Z","repository":{"id":40574242,"uuid":"13996764","full_name":"walles/moor","owner":"walles","description":"Moor is a pager. It's designed to just do the right thing without any configuration.","archived":false,"fork":false,"pushed_at":"2026-04-24T04:40:32.000Z","size":9136,"stargazers_count":1061,"open_issues_count":31,"forks_count":49,"subscribers_count":10,"default_branch":"master","last_synced_at":"2026-04-24T06:25:57.258Z","etag":null,"topics":["console","console-application","moar","pager"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/walles.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":"2013-10-30T19:09:36.000Z","updated_at":"2026-04-24T04:40:36.000Z","dependencies_parsed_at":"2025-12-12T02:03:36.611Z","dependency_job_id":null,"html_url":"https://github.com/walles/moor","commit_stats":{"total_commits":598,"total_committers":6,"mean_commits":99.66666666666667,"dds":0.02842809364548493,"last_synced_commit":"eafb70d79042958235221a1428545253adc2220f"},"previous_names":["walles/moor","walles/moar"],"tags_count":186,"template":false,"template_full_name":null,"purl":"pkg:github/walles/moor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walles%2Fmoor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walles%2Fmoor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walles%2Fmoor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walles%2Fmoor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/walles","download_url":"https://codeload.github.com/walles/moor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walles%2Fmoor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32308879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T17:23:19.671Z","status":"ssl_error","status_checked_at":"2026-04-26T17:23:19.195Z","response_time":129,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["console","console-application","moar","pager"],"created_at":"2025-08-14T14:01:45.231Z","updated_at":"2026-04-26T19:02:05.508Z","avatar_url":"https://github.com/walles.png","language":"Go","readme":"Note: :warning: [As of version 2.0.0, `moar` has been renamed to\n`moor`](https://github.com/walles/moor/releases/tag/v2.0.0), but is otherwise\nthe same tool.\n\n[![Linux CI](https://github.com/walles/moor/actions/workflows/linux-ci.yml/badge.svg?branch=master)](https://github.com/walles/moor/actions/workflows/linux-ci.yml?query=branch%3Amaster)\n[![Windows CI](https://github.com/walles/moor/actions/workflows/windows-ci.yml/badge.svg?branch=master)](https://github.com/walles/moor/actions/workflows/windows-ci.yml?query=branch%3Amaster)\n\nMoor is a pager. It reads and displays UTF-8 encoded text from files or pipes.\n\n`moor` is designed to just do the right thing without any configuration:\n\n![Moor displaying its own source code](screenshot.png)\n\nThe intention is that Moor should be trivial to get into if you have previously\nbeen using [Less](http://www.greenwoodsoftware.com/less/). If you come from Less\nand find Moor confusing or hard to migrate to, [please report\nit](https://github.com/walles/moor/issues)!\n\nDoing the right thing includes:\n\n- **Syntax highlight** source code by default using\n  [Chroma](https://github.com/alecthomas/chroma)\n- **Search is incremental** / find-as-you-type just like in\n  [Chrome](http://www.google.com/chrome) or\n  [Emacs](http://www.gnu.org/software/emacs/)\n- **Filtering is incremental**: Press \u003ckbd\u003e\u0026\u003c/kbd\u003e to filter the input\n  interactively\n- Search becomes case sensitive if you add any UPPER CASE characters\n  to your search terms, just like in Emacs\n- [Regexp](http://en.wikipedia.org/wiki/Regular_expression#Basic_concepts)\n  search if your search string is a valid regexp\n- Deduplicated search history persists across `moor` invocations\n- **Snappy UI** even on slow / large input by reading input in the background\n  and using multi-threaded search\n- Supports displaying ANSI color coded texts (like the output from\n  `git diff` [| `riff`](https://github.com/walles/riff) for example)\n- Supports UTF-8 input and output\n- **Transparent decompression** when viewing [compressed text\n  files](https://github.com/walles/moor/issues/97#issuecomment-1191415680)\n  (`.gz`, `.bz2`, `.xz`, `.zst`, `.zstd`) or [streams](https://github.com/walles/moor/issues/261)\n- The position in the file is always shown\n- Supports **word wrapping** (on actual word boundaries) if requested using\n  `--wrap` or by pressing \u003ckbd\u003ew\u003c/kbd\u003e\n- [**Follows output** as long as you are on the last line](https://github.com/walles/moor/issues/108#issuecomment-1331743242),\n  just like `tail -f`\n- Renders [terminal\n  hyperlinks](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda)\n  properly\n- **Mouse Scrolling** works out of the box (but\n  [look here for tradeoffs](https://github.com/walles/moor/blob/master/MOUSE.md))\n\n[For compatibility reasons](https://github.com/walles/moor/issues/14), `moor`\nuses the formats declared in these environment variables if present:\n\n- `LESS_TERMCAP_md`: Man page \u003cb\u003ebold\u003c/b\u003e\n- `LESS_TERMCAP_us`: Man page \u003cu\u003eunderline\u003c/u\u003e\n- `LESS_TERMCAP_so`: [Status bar and search hits](https://github.com/walles/moor/issues/114)\n\nSetting `LESSSECURE` to `1` will prevent `moor` from launching external programs\nor opening new files [as required by `systemctl(1)`][systemctlLessSecure]. In\nsecure mode, the \u003ckbd\u003ev\u003c/kbd\u003e command for opening the current file in an editor\nis disabled.\n\nFor configurability reasons, `moor` reads extra command line options from the\n`MOOR` environment variable.\n\nMoor is used as the default pager by:\n\n- [`px` / `ptop`](https://github.com/walles/px), `ps` and `top` for human beings\n- [`riff`](https://github.com/walles/riff), a diff filter highlighting which line parts have changed\n\n# Installing\n\n## Using [Homebrew](https://brew.sh/)\n\n**Both macOS and Linux** users can use Homebrew to install. See below for distro\nspecific instructions.\n\n```sh\nbrew install moor\n```\n\nThen whenever you want to upgrade to the latest release:\n\n```sh\nbrew upgrade\n```\n\n## Using Debian\n\nOn [Debian Forky](https://www.debian.org/releases/forky/) and newer, as well as\non [Ubuntu 26.04 Resolute](https://packages.ubuntu.com/resolute/moor) and newer:\n\n```sh\nsudo apt install moor\n```\n\n## Using [MacPorts](https://www.macports.org/)\n\n```sh\nsudo port install moor\n```\n\nMore info [here](https://ports.macports.org/port/moor/).\n\n## Using [Gentoo](https://gentoo.org/)\n\n```sh\nemerge --ask --verbose sys-apps/moor\n```\n\nMore info [here](https://packages.gentoo.org/packages/sys-apps/moor).\n\n## Using [Arch Linux](https://archlinux.org/)\n\n```sh\npacman -S moor\n```\n\nMore info [here](https://archlinux.org/packages/extra/x86_64/moor/).\n\n## Manual Install\n\n### Using `go`\n\nThis will [install\n`moor` into `$GOPATH/bin`](\u003c(https://manpages.debian.org/testing/golang-go/go-install.1.en.html)\u003e)\n:\n\n```sh\ngo install github.com/walles/moor/v2/cmd/moor@latest\n```\n\nNOTE: If you got here because there is no binary for your platform,\n[please consider packaging `moor`](#packaging).\n\n### Downloading binaries\n\n1. Download `moor` for your platform from\n   \u003chttps://github.com/walles/moor/releases/latest\u003e\n1. `chmod a+x moor-*-*-*`\n1. `sudo mv moor-*-*-* /usr/local/bin/moor`\n\nAnd now you can just invoke `moor` from the prompt!\n\nTry `moor --help` to see options.\n\n# Configuring\n\nDo `moor --help` for an up to date list of options.\n\nEnvironment variable `MOOR` can be used to set default options.\n\nFor example:\n\n```bash\nexport MOOR='--statusbar=bold --no-linenumbers'\n```\n\n## Setting `moor` as your default pager\n\nSet it as your default pager by adding...\n\n```bash\nexport PAGER=/usr/local/bin/moor\n```\n\n... to your `.bashrc`.\n\n# Issues\n\nIssues are tracked [here](https://github.com/walles/moor/issues), or\nyou can send questions to \u003cjohan.walles@gmail.com\u003e.\n\n# Packaging\n\nIf you package `moor`, do include [the man page](moor.1) in your package.\n\n# Comparison with `bat`\n\n`moor` and `bat` do different things. `moor` is a pager. `bat` is a file\npreprocessor that sometimes pipes to a pager (like `moor`). So comparing them\ndirectly is not possible.\n\nWhat `bat` does is:\n1. Looks at its input and preprocesses it or not\n1. Pipes to a pager or not. This pager can be `moor` or something else.\n\nSome of `bat`'s preprocessing overlaps with what `moor` provides internally\n(like syntax highlighting and JSON formatting).\n\nBut some `moor` features like fast interactive search is `moor` specific and not\nsomething `bat` can simulate through preprocessing.\n\nTo use `moor` as your `bat` pager, set `BAT_PAGER=moor` in your environment.\n\nOr, to use `moor` instead of `bat`, set `PAGER=moor`.\n\n# Embedding `moor` in your app\n\nAPI Reference: https://pkg.go.dev/github.com/walles/moor/v2/pkg/moor\n\nFor a quick start, first fetch your dependency:\n```\ngo get github.com/walles/moor/v2\n```\n\nThen, here's how you can use the API:\n```go\npackage main\n\nimport (\n\t\"github.com/walles/moor/v2/pkg/moor\"\n)\n\nfunc main() {\n\terr := moor.PageFromString(\"Hello, world!\", moor.Options{})\n\tif err != nil {\n\t\t// Handle paging problems\n\t\tpanic(err)\n\t}\n}\n```\n\nAfter both `go get` is done and you have calls to `moor` in your code, you may\nhave to:\n```\ngo mod tidy\n```\n\nYou can also `PageFromStream()` or `PageFromFile()`.\n\n# Developing\n\nYou need the [go tools](https://golang.org/doc/install).\n\nRun tests:\n\n```bash\n./test.sh\n```\n\nLaunch the manual test suite:\n\n```bash\n./manual-test.sh\n```\n\nTo run tests in 32 bit mode, either do `GOARCH=386 ./test.sh` if you're on\nLinux, or `docker build . -f Dockerfile-test-386` (tested on macOS).\n\nRun microbenchmarks:\n\n```bash\ngo test -benchmem -run='^$' -bench=. ./...\n```\n\nProfiling `BenchmarkPlainTextSearch()`. Try replacing `-alloc_objects` with\n`-alloc_space` or change the `-focus` function:\n\n```bash\ngo test -memprofilerate=1 -memprofile=profile.out -benchmem -run='^$' -bench '^BenchmarkPlainTextSearch$' ./internal \u0026\u0026 go tool pprof -alloc_objects -focus findFirstHit -relative_percentages -web profile.out\n```\n\nOr to get a CPU profile:\n\n```bash\ngo test -cpuprofile=profile.out -benchmem -run='^$' -bench '^BenchmarkRenderLines$' ./internal \u0026\u0026 go tool pprof -focus renderLines -relative_percentages -web profile.out\n```\n\nBuild + run:\n\n```bash\n./moor.sh ...\n```\n\nInstall (into `/usr/local/bin`) from source:\n\n```bash\n./install.sh\n```\n\n# Making a new Release\n\nMake sure that [screenshot.png](screenshot.png) matches moor's current UI.\nIf it doesn't, scale a window to 81x16 characters and make a new one.\n\nExecute `release.sh` and follow instructions.\n\n# TODO\n\n- Enable exiting using ^c (without restoring the screen).\n\n- Enable suspending using ^z, followed by resuming using `fg`.\n\n- Underline the file name in the status bar while viewing. The point is to make\n  it more obvious where this name ends in case it contains whitespace.\n\n- Retain the search string when pressing / to search a second time.\n\n## Done\n\n- Add `\u003e` markers at the end of lines being cut because they are too long\n\n- Doing moor on an arbitrary binary (like `/bin/ls`) should put all\n  line-continuation markers at the rightmost column. This really means our\n  truncation code must work even with things like tabs and various control\n  characters.\n\n- Make sure search hits are highlighted even when we have to scroll right\n  to see them\n\n- Change out-of-file visualization to writing `---` after the end of the file\n  and leaving the rest of the screen blank.\n\n- Exit search on pressing up / down / pageup / pagedown keys and\n  scroll. I attempted to do that spontaneously, so it's probably a\n  good idea.\n\n- Remedy all FIXMEs in this README file\n\n- Release the `go` version as the new `moor`, replacing the previous Ruby\n  implementation\n\n- Add licensing information (same as for the Ruby branch)\n\n- Make sure `git grep` output gets highlighted properly.\n\n- Handle all kinds of line endings.\n\n- Make sure version information is printed if there are warnings.\n\n- Add spinners while file is still loading\n\n- Make `tail -f /dev/null` exit properly, fix\n  \u003chttps://github.com/walles/moor/issues/7\u003e.\n\n- Showing unicode search hits should highlight the correct chars\n\n- [Word wrap text rather than character wrap it](m/linewrapper.go).\n\n- Arrow keys up / down while in line wrapping mode should scroll by screen line,\n  not by input file line.\n\n- Define 'g' to prompt for a line number to go to.\n\n- Handle search hits to the right of the right screen edge when searching\n  forwards. Searching forwards now moves first right, then to the left edge\n  and down.\n\n- Handle search hits to the right of the right screen edge when searching\n  backwards. Searching backwards should move first left, then up and to the\n  rightmost hit.\n\n\n[systemctlLessSecure]: https://github.com/systemd/systemd/blob/ee3cd7890d81744efa9513b739e5ff03c9e7649b/man/common-variables.xml#L193-L194\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalles%2Fmoor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwalles%2Fmoor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalles%2Fmoor/lists"}