{"id":13824805,"url":"https://github.com/talal/mimir","last_synced_at":"2025-07-08T19:33:12.388Z","repository":{"id":57515065,"uuid":"150656627","full_name":"talal/mimir","owner":"talal","description":"Fast and minimal shell prompt","archived":true,"fork":false,"pushed_at":"2023-05-06T19:08:53.000Z","size":187,"stargazers_count":99,"open_issues_count":0,"forks_count":13,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-15T15:20:04.135Z","etag":null,"topics":["bash","git","go","kubernetes","openstack","prompt","shell","zsh"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/talal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2018-09-27T22:50:29.000Z","updated_at":"2024-07-12T18:58:30.000Z","dependencies_parsed_at":"2024-01-18T03:48:50.859Z","dependency_job_id":null,"html_url":"https://github.com/talal/mimir","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talal%2Fmimir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talal%2Fmimir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talal%2Fmimir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talal%2Fmimir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/talal","download_url":"https://codeload.github.com/talal/mimir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225457865,"owners_count":17477362,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bash","git","go","kubernetes","openstack","prompt","shell","zsh"],"created_at":"2024-08-04T09:01:09.695Z","updated_at":"2024-11-20T02:31:11.247Z","avatar_url":"https://github.com/talal.png","language":"Go","readme":"# Archived project. No maintenance.\n\n**What does this mean?** No further code will be committed and the repository\nwill remain in a read-only state.\n\n**Why?** I no longer have the time to maintain this project.\n\nFeel free to fork and make your own changes if needed :)\n\n# Mímir\n\n[![GitHub Release](https://img.shields.io/github/release/talal/mimir.svg?style=flat-square)](https://github.com/talal/mimir/releases/latest)\n[![Build Status](https://img.shields.io/travis/talal/mimir/master.svg?style=flat-square)](https://travis-ci.org/talal/mimir)\n[![Go Report Card](https://goreportcard.com/badge/github.com/talal/mimir?style=flat-square)](https://goreportcard.com/report/github.com/talal/mimir)\n[![Software License](https://img.shields.io/github/license/talal/mimir.svg?style=flat-square)](LICENSE)\n\nMímir is a fast and minimal shell prompt written in [Go](https://golang.org).\nThe look of Mímir is inspired by [Pure](https://github.com/sindresorhus/pure)\nand the functionality is inspired by\n[prettyprompt](https://github.com/majewsky/gofu#prettyprompt).\n\n[![asciicast](https://asciinema.org/a/225675.svg)](https://asciinema.org/a/225675)\n\nThe Mímir Go binary only displays the (pre) prompt line with all the\ninformation. The actual prompt line used for input is configured in the shell's\nconfig file. This allows for flexibility:\n- You can configure the prompt line to your preference, e.g. you can specify a\n  prompt symbol of your choice, add user or host name info, etc.\n- You can use Mímir with any shell of your choosing. The description says Bash\n  and Zsh because these are the shells which I have tested Mímir on but\n  technically you can use Mímir with any shell as long as it allows you to load\n  a binary as a prompt.\n\n## Features\n\n- It is very fast: loads under 5ms with everything turned on\n  ([benchmark](https://asciinema.org/a/225680)).\n- Shows current Git branch name.\n- Long directory paths are shortened and inaccessible paths are highlighted in\n  red.\n- Kubernetes context and namespace info is shown using `KUBECONFIG` environment\n  variable. If multiple config files are specified in the variable value then\n  the first one with current context info is used. You can overwrite the K8s\n  info by exporting the `CURRENT_KUBE_CTX` variable with an arbitrary value.\n- OpenStack cloud info is shown using the standard OpenStack environment\n  variables that begin with `OS_`. Variables that specify IDs are used if name\n  specifying variables are not available. E.g. `OS_PROJECT_DOMAIN_ID` would be\n  used if `OS_PROJECT_DOMAIN_NAME` is not available. You can overwrite the cloud\n  info by exporting the `CURRENT_OS_CLOUD` variable with an arbitrary value.\n\n\n## Installation\n\n### Installer script\n\nThe simplest way to install Mímir on Linux or macOS is to run:\n\n```\n$ sh -c \"$(curl -sL git.io/getmimir)\"\n```\n\nThis will put the binary in `/usr/local/bin/mimir`\n\n### Pre-compiled binaries\n\nPre-compiled binaries for Linux and macOS are avaiable on the\n[releases][releases] page.\n\n[releases]: https://github.com/talal/mimir/releases\n\nThe binaries are static executables.\n\n### Homebrew\n\n```\n$ brew install talal/tap/mimir\n```\n\n### Building from source\n\nThe only required build dependency is [Go](https://golang.org/) 1.11 or above.\n\n```\n$ git clone https://github.com/talal/mimir.git\n$ cd mimir\n$ make install\n```\n\nThis will put the binary in `/usr/local/bin/mimir`\n\nAlternatively, you can also build Mímir directly with the go get command without\nmanually cloning the repository:\n\n```\n$ go get -u github.com/talal/mimir\n```\n\nThis will put the binary in `$GOPATH/bin/mimir`\n\n## Usage\n\nThe following usage examples are just one example of how Mímir can be\nconfigured. The examples below will result in a setup similar to the one shown\nin the demo above: the prompt symbol (`❯`) changes to red if the previous\ncommand exited with an error.\n\n### Bash\n\nAdd this to your `.bashrc` file:\n\n```bash\nprompt_mimir_cmd() {\n  if [ $? != 0 ]; then\n    local prompt_symbol=\"\\[\\e[0;31m\\]❯\\[\\e[0m\\]\"\n  else\n    local prompt_symbol=\"\\[\\e[0;35m\\]❯\\[\\e[0m\\]\"\n  fi\n\n  PS1=\"$(/path/to/mimir)\\n${prompt_symbol} \"\n}\nPROMPT_COMMAND=prompt_mimir_cmd\n```\n\n### Zsh\n\nAdd this to your `.zshrc` file:\n\n```zsh\nautoload -Uz add-zsh-hook\nprompt_mimir_cmd() { /path/to/mimir }\nadd-zsh-hook precmd prompt_mimir_cmd\n\nprompt_symbol='❯'\nPROMPT=\"%(?.%F{magenta}.%F{red})${prompt_symbol}%f \"\n```\n\n### Options\n\n| Option | Description | Usage |\n| --- | --- | --- |\n| `MIMIR_DISABLE_KUBE` | Disable Kubernetes context and namespace info. | `export MIMIR_DISABLE_KUBE=1` |\n| `MIMIR_DISABLE_CLOUD` | Disable OpenStack cloud info. | `export MIMIR_DISABLE_CLOUD=1` |\n| `CURRENT_KUBE_CTX` | Display arbitrary info for K8s. | `export CURRENT_KUBE_CTX='custom info'` |\n| `CURRENT_OS_CLOUD` | Display arbitrary info for OpenStack. | `export CURRENT_OS_CLOUD='custom info'` |\n\n## Credits\n\nMost of the source code is borrowed from\n[prettyprompt](https://github.com/majewsky/gofu#prettyprompt).\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalal%2Fmimir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftalal%2Fmimir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalal%2Fmimir/lists"}