{"id":28092866,"url":"https://github.com/ltn100/prmpt","last_synced_at":"2025-05-13T13:49:14.611Z","repository":{"id":18618876,"uuid":"21824519","full_name":"ltn100/prmpt","owner":"ltn100","description":"Prompty is a command prompt markup language.","archived":false,"fork":false,"pushed_at":"2024-03-17T20:19:14.000Z","size":442,"stargazers_count":11,"open_issues_count":17,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-04-24T22:58:24.388Z","etag":null,"topics":["command-line-tool","latex","markup-language","prompts","python","tex"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ltn100.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}},"created_at":"2014-07-14T15:20:12.000Z","updated_at":"2024-07-29T14:23:59.000Z","dependencies_parsed_at":"2024-03-17T20:17:46.138Z","dependency_job_id":"90dc0945-b544-4dc4-a761-5bc092dc0c6c","html_url":"https://github.com/ltn100/prmpt","commit_stats":null,"previous_names":["ltn100/prmpt","ltn100/prompty"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltn100%2Fprmpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltn100%2Fprmpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltn100%2Fprmpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltn100%2Fprmpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ltn100","download_url":"https://codeload.github.com/ltn100/prmpt/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253953319,"owners_count":21989818,"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":["command-line-tool","latex","markup-language","prompts","python","tex"],"created_at":"2025-05-13T13:49:13.890Z","updated_at":"2025-05-13T13:49:14.594Z","avatar_url":"https://github.com/ltn100.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Prmpt [![Build Status](https://travis-ci.org/ltn100/prmpt.svg?branch=develop)](https://travis-ci.org/ltn100/prmpt) [![Documentation Status](https://readthedocs.org/projects/prmpt/badge/?version=latest)](https://prmpt.readthedocs.io/en/latest/) [![Coverage Status](https://coveralls.io/repos/ltn100/prmpt/badge.svg?service=github)](https://coveralls.io/github/ltn100/prmpt) [![PyPI version](https://badge.fury.io/py/prmpt.svg)](https://pypi.org/project/prmpt/) [![MIT license](http://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\n=======\n\nPrmpt is a [command prompt](https://en.wikipedia.org/wiki/Command-line_interface#Command_prompt) [markup language](https://en.wikipedia.org/wiki/Markup_language).\n\nThe language is loosely modelled on the [LaTeX](https://en.wikipedia.org/wiki/LaTeX) markup language, used for typesetting.\n\nHere is an example of the sort of interactive command prompt that can be built using prmpt:\n\n![prmpt demonstration](./img/demo.gif)\n\n\n# Installation\n\nThe latest version can be installed from PyPI using `pip`:\n\n```bash\nsudo pip install prmpt\n```\n\nYou then need to insert a line at the end of your `.bashrc` file so that prmpt is called from the `PS1` environment variable:\n\n```bash\nprmpt -b \u003e\u003e ~/.bashrc\n```\n\nNow re-source your updated `.bashrc` file:\n\n```bash\nsource ~/.bashrc\n```\n(alternatively you can restart your shell session)\n\n\n\u003e **Tip:** If you get an error like \"`bash: prmpt: command not found`\", it is probably because you installed it locally, as a non-root user (without `sudo`). This is fine, but you will need to call the prmpt executable from its local path:\n\u003e\n\u003e `~/.local/bin/prmpt -b \u003e\u003e ~/.bashrc`\n\n\n# Configuration\n\nThe configuration for prmpt is defined in your `~/.local/share/prmpt/prmpt.cfg` file:\n\n```cfg\n[prompt]\nprompt_file = default.prmpt\n```\n\nThe `prompt_file` variable specifies which prmpt file is currently in use. The prmpt files are located in `~/.local/share/prmpt/`. You can change the configuration to use one of the pre-defined ones, or write your own.\n\n\n# Examples\n\n## Simple example\n\nYou can define a simple `.prmpt` file like this:\n\n```TeX\n\\green{\\user}\\space\n\\yellow{\\hostname}\\space\n\\blue[bold]{\\workingdir}\\space\n\\magenta[inverted]{(\\repobranch )}\\newline\n\\green[bold]{\\unichar{0x27a5}}\\space\n```\n\nAnd your prompt will end up looking like this:\n\n![example](./img/example1.gif)\n\n\n## A more verbose example\n\nHere is a verbose example with comments to explain the syntax used:\n\n```TeX\n% comments are allowed\n% and white-space does not matter!\n\n% first the username\n\\lightblue{\\user}\n\n% then an @ symbol\n@\n\n% followed by the machine name\n\\green{\\hostname}\n\n% if we want an actual space, we do this:\n\\space\n\n% now the working directory in a nice yellow.\n% lets also make it bold!\n\\yellow[bold]{\\workingdir}\n\\space\n\n% now for the VCS repository branch\n(\\repobranch )\n\\space\n\n% and finally we have the special $ sign\n% (which actually turns into a # when you're root)\n\\dollar\\space\n```\n\nThis prmpt script will achieve the following prompt:\n\n![example](./img/example2.gif)\n\n\n## More\n\n[`elite.prmpt`](./skel/elite.prmpt):\n\n![elite](./img/elite.png)\n\n\n[`red.prmpt`](./skel/red.prmpt):\n\n![red](./img/red.png)\n\nFor a more elaborate example, see [`~/.local/share/prmpt/default.prmpt`](./skel/default.prmpt) (this is the one used for the animation at the top of this page).\n\n\n# Documentation\n\nDocumentation is available at [readthedocs](https://prmpt.readthedocs.io/en/latest/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltn100%2Fprmpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fltn100%2Fprmpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltn100%2Fprmpt/lists"}