{"id":23650137,"url":"https://github.com/cs-magic-open/zsh-git-relative-path","last_synced_at":"2025-04-10T11:10:51.663Z","repository":{"id":269159767,"uuid":"906612455","full_name":"cs-magic-open/zsh-git-relative-path","owner":"cs-magic-open","description":"Zsh Git 相对路径插件  一个简单但实用的 Zsh 插件，它可以在你的命令提示符中显示相对于 Git 项目根目录的当前路径。这个插件是在 AI 的协助下在短短 10 分钟内完成的，展示了 AI 辅助开发的强大能力。","archived":false,"fork":false,"pushed_at":"2024-12-21T14:14:51.000Z","size":777,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T17:08:44.204Z","etag":null,"topics":["ai","cursor","git","llm","oh-my-zsh","vscode","windsurf","zsh"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@cs-magic-open/zsh-git-relative-path","language":"JavaScript","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/cs-magic-open.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":"2024-12-21T11:52:06.000Z","updated_at":"2024-12-31T02:00:13.000Z","dependencies_parsed_at":"2024-12-21T12:12:40.709Z","dependency_job_id":"7fe58440-44d9-45c3-aa22-ce9afed43759","html_url":"https://github.com/cs-magic-open/zsh-git-relative-path","commit_stats":null,"previous_names":["cs-magic-open/zsh-git-relative-path"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cs-magic-open%2Fzsh-git-relative-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cs-magic-open%2Fzsh-git-relative-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cs-magic-open%2Fzsh-git-relative-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cs-magic-open%2Fzsh-git-relative-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cs-magic-open","download_url":"https://codeload.github.com/cs-magic-open/zsh-git-relative-path/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208561,"owners_count":21065202,"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":["ai","cursor","git","llm","oh-my-zsh","vscode","windsurf","zsh"],"created_at":"2024-12-28T15:51:29.953Z","updated_at":"2025-04-10T11:10:51.645Z","avatar_url":"https://github.com/cs-magic-open.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zsh Git Relative Path Plugin\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.v4.svg\" width=\"60%\" height=\"60%\" alt=\"Zsh Git Relative Path Plugin Logo\"\u003e\n\u003c/p\u003e\n\nA ZSH plugin that shows your current path relative to the git project root in your prompt.\n\n## Features\n\n- Works with any oh-my-zsh theme\n- Shows path relative to git project root when in a git repository\n- Falls back to normal path display when not in a git repository\n- Special support for popular themes (robbyrussell, agnoster, avit)\n- Zero configuration needed!\n\n## Prerequisites\n\n- [Oh My Zsh](https://ohmyz.sh/)\n- Node.js \u003e= 14.0.0\n- npm or pnpm\n\n## Installation\n\n### Using npm (Recommended)\n\n```bash\nnpm install -g @cs-magic-open/zsh-git-relative-path\n```\n\nThat's it! The plugin will be automatically configured and activated after installation.\n\n### Alternative: Manual Installation\n\nIf you prefer to inspect the code first:\n\n```bash\n# 1. Clone the repository\ngit clone https://github.com/cs-magic-open/zsh-git-relative-path\ncd zsh-git-relative-path\n\n# 2. Install globally from local\nnpm install -g .\n```\n\n## Usage\n\nOnce installed, the plugin will automatically modify your prompt to show paths relative to the git project root. No additional configuration is needed!\n\nExample:\n```\n# Before (in /Users/username/projects/my-project/src/components)\nusername ~/projects/my-project/src/components $\n\n# After (same directory)\nusername src/components $\n```\n\n## Updating\n\nTo update to the latest version:\n\n```bash\nnpm update -g @cs-magic-open/zsh-git-relative-path\n```\n\n## Uninstallation\n\n```bash\nnpm uninstall -g @cs-magic-open/zsh-git-relative-path\n```\n\n## Development\n\nTo contribute or modify the plugin:\n\n```bash\n# Clone the repository\ngit clone https://github.com/cs-magic-open/zsh-git-relative-path\ncd zsh-git-relative-path\n\n# Install dependencies\nnpm install\n\n# Make your changes...\n\n# Bump version\nnpm version patch  # or minor/major\n```\n\n## License\n\nMIT\n\n## Author\n\ncs-magic-open\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcs-magic-open%2Fzsh-git-relative-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcs-magic-open%2Fzsh-git-relative-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcs-magic-open%2Fzsh-git-relative-path/lists"}