git-web-url

Print browser URLs or relative paths for local git repository files.

Updated Apr 25, 2022
One-click install
npx skills add https://github.com/MacHu-GWU/afwf_github-project --skill git-web-url
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-web-url
Source: https://github.com/MacHu-GWU/afwf_github-project/tree/main/.claude/skills/git-web-url
Command: npx skills add https://github.com/MacHu-GWU/afwf_github-project --skill git-web-url

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps you quickly determine and share the browser URL or relative path of a local git repository file, enabling seamless navigation to code in GitHub, GitLab, Bitbucket, or CodeCommit.

Core Features & Use Cases

  • Get the browser URL of a local file inside a git repository using the git_web_url CLI (gwu/gitweburl).
  • Retrieve the repository-relative path for a file to reference it in PRs, issues, or documentation.
  • Use across multiple hosting services (GitHub, GitLab, Bitbucket, CodeCommit) and supports current or specified branches.

Quick Start

Run gwu url /path/to/file.py to print the browser URL, or run gwu relpath /path/to/file.py to print the path relative to the repo root.

Frequently Asked Questions about git-web-url

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get the browser URL for a local file in a git repository?

You can get the browser URL for a local file in a git repository by running the gwu url command with the file path, which identifies the remote hosting service and prints the corresponding web link.

Can I open repository files in GitHub, GitLab, or Bitbucket using the command line?

Yes, you can open repository files in GitHub, GitLab, Bitbucket, or CodeCommit by running the gwu url command to print the correct browser URL for your specified local file path.

What is the best way to find the repository-relative path of a file for a pull request?

The best way to find the repository-relative path of a file is to run the gwu relpath command with your local file path, which outputs the path relative to the git repository root for referencing in pull requests.

Does this git web url tool work with branches other than the current one?

Yes, the git web url tool supports both the current branch and specified branches, allowing you to generate accurate browser URLs and relative paths for any branch in your git repository.

Do I need any dependencies installed to use the gitweburl command line interface?

No, you do not need any additional dependencies installed to use the gitweburl command line interface, as it operates independently to identify and print browser URLs or relative paths for your local git repository files.