@lemonaid-dev/forge
v0.1.1
Published
Open, print, and copy Git forge links for repositories and blamed lines
Maintainers
Readme
@lemonaid-dev/forge
Open, print, and copy Git forge links for repositories and blamed lines.
The GitLab repository is private. The npm package is public.
Install
bun install -g @lemonaid-dev/forgeThe package installs the primary forge command and the compatible www and
blame-menu commands.
Usage
# Open a repository path on its current branch
forge open
forge open src/cli.ts
# Print or copy instead of opening
forge open src/cli.ts --print
forge open src/cli.ts --copy --line 12
# Inspect one blamed line interactively
forge blame src/cli.ts 12
# Use blame noninteractively
forge blame src/cli.ts 12 --action print-permalink
forge blame src/cli.ts 12 --action copy-hash
# Select non-default repository state
forge open --remote upstream --ref main
forge open --provider gitlabCompatibility commands:
www [PATH] [--print|--copy]
blame-menu FILE LINE [--action ACTION]Run forge open --help and forge blame --help for the complete options.
Providers
GitHub and GitLab, including self-hosted instances selected explicitly with
--provider, are supported. Unknown hosts are rejected instead of receiving a
possibly incorrect URL shape.
Requirements
- Bun
- Git
- Git
fzffor the interactive blame menu
Opening and clipboard access are provided by @lemonaid-dev/open and
@lemonaid-dev/clipboard.
Releasing
Releases are published by GitLab CI from protected vX.Y.Z tags through npm
Trusted Publishing. No npm publishing token belongs in GitLab.
