Octo To Local, Open files with local editor from GitHub web.
- Linux
- Mac OS
- Neovim
- Visual Studio Code
- JetBrains IDEs
And, you can execute any command with editor kind cmd
.
- Firefox
- Chrome
- Chromium
note: Although not well tested, Opera, Edge and Vivaldi may run with configuration that same as Chrome.
Because we use Native Messaging API, you should install native application.
Executable binary is available for each releases.
# In any directory conteined in $PATH
$ curl -Lo octolo https://github.com/rail44/octolo/releases/latest/download/octolo-x86_64-unknown-linux-musl
$ chmod a+x octolo
# In any directory conteined in $PATH
$ curl -Lo octolo https://github.com/rail44/octolo/releases/latest/download/octolo-x86_64-apple-darwin
$ chmod a+x octolo
$ cargo install octolo
Create ~/.config/octolo/octolo.toml
like bellow.
# Comment out browsers your using
browser_list = [
# "Firefox",
# "Chromium",
# "Chrome"
]
# If you have configuration ghq.root, Octolo will use it as default
# root = "/home/john/src"
# path = github.com/{{user}}/{{repository}}
# Use configurations for editor your using
[[editors]]
kind = "neovim"
# The address that nvim listening. By default, Octolo uses $NVIM_LISTEN_ADDRESS
# address = ""
[[editors]]
kind = "visual-studio-code"
bin = "/usr/local/bin/code" # Path of $(which code)
[[editors]]
kind = "jetbrains-ide"
name = "IntelliJ IDEA" # or "PHPStorm", "RubyMine" ...
bin = "/usr/local/bin/idea" # Path of $(which idea)
# Or, you can execute any commands.
# cmd should be defined with handlebars syntax.
[[editors]]
kind = "cmd"
cmd = [
"your-favorite-cli",
"-f {{path}}",
"-l {{line}}"
]
Once creating configuration, run bellow
$ octolo cofig dump
# Dump full config with optional fields...
$ octolo manifest
# Dump Native Messaging Manifests for each browsers
$ octolo manifest -w
# And place it!
Manifests contains absolute path for octolo. When you change location of it, you should redo above.
Firefox: https://addons.mozilla.org/ja/firefox/addon/octolo/
Chrome: https://chrome.google.com/webstore/detail/octolo/igdmgdknajejkdpaonpnpjedakhppiob
Then, you can open files by right-click menu from GitHub Web!
# In `extension` dir
$ npm install
$ npm run build
# In `native` dir
$ cargo build