{"id":19320884,"url":"https://github.com/info-mono/diyship","last_synced_at":"2025-02-24T05:24:05.408Z","repository":{"id":134997246,"uuid":"365542906","full_name":"info-mono/diyship","owner":"info-mono","description":"🧰🚀 Cross-shell prompt framework","archived":false,"fork":false,"pushed_at":"2022-09-05T08:11:44.000Z","size":105,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-06T05:25:37.061Z","etag":null,"topics":["cli","cross-shell","diyship","prompt","starship","terminal"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"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/info-mono.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}},"created_at":"2021-05-08T15:03:38.000Z","updated_at":"2024-07-23T22:05:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"23d8d081-9ae9-46bb-a66b-b7e16fe6a055","html_url":"https://github.com/info-mono/diyship","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/info-mono%2Fdiyship","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/info-mono%2Fdiyship/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/info-mono%2Fdiyship/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/info-mono%2Fdiyship/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/info-mono","download_url":"https://codeload.github.com/info-mono/diyship/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240422279,"owners_count":19798723,"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":["cli","cross-shell","diyship","prompt","starship","terminal"],"created_at":"2024-11-10T01:33:06.922Z","updated_at":"2025-02-24T05:24:05.382Z","avatar_url":"https://github.com/info-mono.png","language":null,"funding_links":["https://www.buymeacoffee.com/nnbnh"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://www.figma.com/file/ivfF5xzAi1zioAkpDHbUyb/DIYship\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/43980777/142657083-ec10c6a1-b34b-4517-9110-3d07f7263a63.png\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003eCross-shell prompt framework\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/info-mono/diyship/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/info-mono/diyship?labelColor=383838\u0026color=585858\u0026style=for-the-badge\" alt=\"License: GPL-3.0\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://gist.github.com/NNBnh/9ef453aba3efce26046e0d3119dab5a7#development-completed\"\u003e\u003cimg src=\"https://img.shields.io/badge/development-completed-%23585858.svg?labelColor=383838\u0026style=for-the-badge\u0026logoColor=FFFFFF\" alt=\"Development completed\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## 💡 About\n\n**DIYship** is a cross-shell prompt framework that let you write your prompt with any programing language for any shell.\n\n\u003e [Learn more about how its work](#%EF%B8%8F-configuration).\n\n## 🚀 Setup\n\n### 📥 Installation\n\nTo install DIYship to your shell, simply append the correspond code file on this repo to your shell config file.\n\n#### 🐚 Bash\n\n```sh\ncurl https://raw.githubusercontent.com/info-mono/diyship/main/bash \u003e\u003e ~/.bashrc\n```\n\n#### 🐚 Zsh\n\n```sh\ncurl https://raw.githubusercontent.com/info-mono/diyship/main/zshrc \u003e\u003e ~/.zshrc\n```\n\n#### 🐚 Fish\n\n```sh\ncurl https://raw.githubusercontent.com/info-mono/diyship/main/fish \u003e\u003e ~/.config/fish/config.fish\n```\n\n#### 🐚 PowerShell\n\n```sh\ncurl https://raw.githubusercontent.com/info-mono/diyship/main/powerShell \u003e\u003e ~/.config/powershell/Microsoft.PowerShell_profile.ps1\n```\n\n#### 🐚 Ion\n\n```sh\ncurl https://raw.githubusercontent.com/info-mono/diyship/main/ion \u003e\u003e ~/.config/ion/initrc\n```\n\n#### 🐚 Elvish\n\n```sh\ncurl https://raw.githubusercontent.com/info-mono/diyship/main/elvish \u003e\u003e ~/.elvish/rc.elv\n```\n\n\u003e **Warning** Only Elvish v0.18 or higher is supported.\n\n#### 🐚 Tcsh\n\n```sh\ncurl https://raw.githubusercontent.com/info-mono/diyship/main/tcsh \u003e\u003e ~/.tcshrc\n```\n\n#### 🐚 Nushell\n\n```sh\ncurl https://raw.githubusercontent.com/info-mono/diyship/main/nushell \u003e\u003e ~/.config/nu/config.toml\n```\n\n#### 🐚 Xonsh\n\n```sh\ncurl https://raw.githubusercontent.com/info-mono/diyship/main/xonsh \u003e\u003e ~/.xonshrc\n```\n\n\u003e **Warning** Only Nushell version v0.33 or higher is supported.\n\n### ⚙️ Configuration\n\nDIYship is basically execute a command (which could be a path to an executable script file or program) and take it output as a prompt,\nyou can change the command through variable:\n\n| Environment variable    | Description                    |\n| ----------------------- | ------------------------------ |\n| `DIYSHIP_COMMAND_LEFT`  | Command to print left prompt.  |\n| `DIYSHIP_COMMAND_RIGHT` | Command to print right prompt. |\n\n\u003e **Note** You can disable right prompt by `DIYSHIP_COMMAND_RIGHT=\"test\"`\n\nDIYship will export these following environment variables before running the commands to print out prompts,\nso you could utilize theme informations in your script/program:\n\n| Environment variable  | Description                                                   |\n| --------------------- | ------------------------------------------------------------- |\n| `$DIYSHIP_SHELL`      | Current shell name.                                           |\n| `$DIYSHIP_STATUS`     | The status code of the previously run command.                |\n| `$DIYSHIP_PIPESTATUS` | Status codes from a command pipeline.                         |\n| `$DIYSHIP_DURATION`   | The execution duration of the last command (in milliseconds). |\n| `$DIYSHIP_JOBS`       | The number of currently running jobs                          |\n| `$DIYSHIP_KEYMAP`     | The current keymap.                                           |\n\nDo to many technical limitation, not every shell support all features:\n\n| Feature              | Bash | Zsh | Fish | Powershell | Ion | Elvish | Tcsh | Nushell | Xonsh |\n| -------------------- | ---- | --- | ---- | ---------- | --- | ------ | ---- | ------- | ----- |\n| Left prompt          | ✅   | ✅  | ✅   | ✅         | ✅  | ✅     | ✅   | ✅      | ✅    |\n| Right prompt         |      | ✅  | ✅   |            |     | ✅     |      |         | ✅    |\n| Export current shell | ✅   | ✅  | ✅   | ✅         | ✅  | ✅     | ✅   | ✅      | ✅    |\n| Export status        | ✅   | ✅  | ✅   | ✅         | ✅  |        | ✅   |         | ✅    |\n| Export pipe status   | ✅   | ✅  | ✅   |            |     |        |      |         |       |\n| Export duration      | ✅   | ✅  | ✅   | ✅         | ✅  | ✅     | ✅   | ✅      | ✅    |\n| Export jobs          | ✅   | ✅  | ✅   | ✅         | ✅  | ✅     |      |         | ✅    |\n| Export keymap        |      | ✅  | ✅   |            |     |        |      |         |       |\n\n\u003e **Note** For more documentation and inspiration about writing your own prompt, checkout [ours wiki](https://github.com/info-mono/diyship/wiki) and [Starship's custom modules](https://github.com/starship/starship/discussions/1252).\n\n## 💌 Credits\n\nThis project was heavily based on and inspired by [**Starship**](https://starship.rs).\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n---\n\n\u003e \u003ch1 align=\"center\"\u003eMade with ❤️ by \u003ca href=\"https://github.com/info-mono\"\u003e\u003ccode\u003e@info-mono\u003c/code\u003e\u003c/a\u003e\u003c/h1\u003e\n\u003e\n\u003e \u003cp align=\"center\"\u003e\u003ca href=\"https://www.buymeacoffee.com/nnbnh\"\u003e\u003cimg src=\"https://img.shields.io/badge/buy_me_a_coffee%20-%23FFC387.svg?logo=buy-me-a-coffee\u0026logoColor=333333\u0026style=for-the-badge\" alt=\"Buy Me a Coffee\"\u003e\u003c/a\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfo-mono%2Fdiyship","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfo-mono%2Fdiyship","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfo-mono%2Fdiyship/lists"}