https://github.com/kinbiko/kokodoko
Quickly generate GitHub permalink to lines of code in your local filesystem
https://github.com/kinbiko/kokodoko
cli developer-tools github golang
Last synced: 5 months ago
JSON representation
Quickly generate GitHub permalink to lines of code in your local filesystem
- Host: GitHub
- URL: https://github.com/kinbiko/kokodoko
- Owner: kinbiko
- License: mit
- Created: 2020-11-26T05:01:10.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-07-07T01:34:55.000Z (almost 3 years ago)
- Last Synced: 2025-10-28T06:11:05.802Z (8 months ago)
- Topics: cli, developer-tools, github, golang
- Language: Go
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# ここどこ? (koko doko?)
[](https://github.com/kinbiko/kokodoko/actions)
[](https://coveralls.io/github/kinbiko/kokodoko?branch=main)
[](https://goreportcard.com/report/github.com/kinbiko/kokodoko)
[](https://github.com/kinbiko/kokodoko/releases)
[](https://pkg.go.dev/github.com/kinbiko/kokodoko?tab=doc)
[](https://github.com/kinbiko/kokodoko/blob/master/LICENSE)
Stop wasting time finding the same code location in GitHub via the browser!
Instead, quickly generate GitHub permalink to lines of code in your local filesystem with `kokodoko` (best if integrated with your editor).
## Installation
Assuming you have Go installed:
```
go get -u github.com/kinbiko/kokodoko/cmd/kokodoko
```
## Usage
First argument should be a path to a file/directory on your local system.
Second (optional) argument is the line number, or a line number range, that you would like to highlight.
```console
$ kokodoko ./dotfiles/vimrc 10-15
Copied 'https://github.com/kinbiko/dotfiles/blob/15fc22c0c5672e0f15f2ef7ea333bd620aa9965c/vimrc#L10-L15' to the clipboard!
```
However, this tool is more useful when integrated directly in your editor.
### Vim integration
Put the following in your `.vimrc`:
```vim
" Super hacky mapping to shell out to github.com/kinbiko/kokodoko and fetch the
" Github link to the current line(s)
nnoremap oiuy :!kokodoko % =line(".")
vnoremap oiuy :!kokodoko % =line("'<")-=line("'>")u
```
Replace `oiuy` with your desired mapping.
### Integrating with other editors
Contributions are welcome!