Browser extension that brings GitHub experience to the next level. This repository contains the source code of Octotree Core. You can build and run it locally to access all features of the free version. Or you can download the full version on our website. Octotree supports Chrome, Firefox, Opera and Safari.
Octotree uses the GitHub API to retrieve repository metadata. By default, it makes unauthenticated requests to get these data. However, there are two situations when GitHub require such requests to be authenticated:
- You access a private repository
- You exceed the API rate limit
When that happens, Octotree will ask for your GitHub personal access token. If you don't already have one, create one, then copy and paste it into the token textbox in the Settings screen. Note that the minimal scopes that should be granted are public_repo
and repo
(if you need access to private repositories).
No BS Policy: Octotree doesn't collect/share/care about your data at all. It stores the access token in your browser local storage and uses it only to communicate with GitHub API (see the code that does that here).
Access tokens are stored in the browser's local storage, only enter access tokens when you use a trusted computer.
If you have multiple GitHub accounts with access to different private repositories, you can let Octotree know which access token to use for which account. When you login to GitHub with an account, Octotree will use the matching token to make API requests to GitHub. If you don't login to GitHub or if the account you login is not in the account list, Octotree will use the default access token.
Go to Settings and click the + icon to add more accounts. Similar to access token, these accounts and tokens are stored in the browser's local storage.
Hotkeys to pin or unpin the sidebar. You can enter multiple hotkeys by separating them with a comma.
- Supported modifiers:
⇧
,shift
,option
,⌥
,alt
,ctrl
,control
,command
, and⌘
. - Supported special keys:
backspace
,tab
,clear
,enter
,return
,esc
,escape
,space
,up
,down
,left
,right
,home
,end
,pageup
,pagedown
,del
,delete
andf1
throughf19
.
Learn more at keymaster.
Note: GitHub Enterprise is not supported on Safari.
Follow these steps to enable Octotree for GitHub Enterprise:
- Navigate to any repository on github.com (not GitHub Enterprise)
- Open the Octotree sidebar
- Click the login link in the footer (or in Settings view)
- Login using your Octotree account
- Navigate to your GitHub Enterprise domain
- Right-click the Octotree icon the browser bar (see image below) select "Enable Octotree on this domain"
- Show sidebar on hover. If checked, hover the Octotree button to open the sidebar. Otherwise, click the button to open the sidebar.
- Load code tree lazily. By default, Octotree loads everything in a single API request to render the full code tree. If you frequently work with big repositories, you should select this option so that Octotree only loads and renders the code tree lazily.
- Show file-specific icons. If checked, show different icons for different file types.
- Show only pull request changes. If checked, show only the change set of the current pull request. Otherwise, show the full code tree.
- Enable Octotree in pages (Pro). Control which pages Octotree will show up in by choosing among the provided options.
- Cache repositories locally (Pro). Whether to cache the repository file structure in local machine cache (via browser Cache API). This speeds up loading of large repositories and reduces the number of API requests to GitHub.
- Enhanced code review (Pro). In the Pull Request page, you will automatically see file comments and file view status.
- Multiple themes (Pro). Click the theme icon located at the bottom of Octotree to select a color theme. The "Only Sidebar" theme changes the Octotree sidebar to the dark theme without changing the theme of the GitHub page.
- Change docking position (Pro). Click the dock icon at the footer of Octotree to change the sidebar location to the right or left of the screen.
- File search (Pro). Click the search icon to start file search. Note that this requires the "Load entire tree at once" option to be selected.
- Repository and PR bookmark (Pro). When viewing a repository or pull request, you can click the bookmark icon next to its title to bookmark it. You can view all bookmarks by clicking the bookmark icon in Octotree header.
Octotree Core (built from source from this repo) requires some browser permissions:
- Read/change data in
github.com
andapi.github.com
: needed to show Octotree and make requests to GitHub API storage
: needed to store Octotree settings
The full version of Octotree requires these additional permissions:
- Read/change data in
octotree.io
: needed to authenticate users and load/store bookmarks from Octotree API contextMenus
: needed to show Octotree context menu itemsactiveTab
: needed for context menu actions to trigger enabling/disabling Octotree in GitHub Enterprise domains
The following permissions are optional and only requested when you enable Octotree in a GitHub Enterprise domain (*):
webNavigation
: needed to inject Octotree sidebar in GitHub Enterprise domainstabs
: needed to inject Octotree sidebar in GitHub Enterprise domains
*: when enabling Octotree in a GitHub Enterprise domain, Chrome displays the prompt for the "Read your browsing history" permission. That's a bit confusing as Octotree doesn't request the history
permission or collect your data at all. See this discussion for more details. Firefox, on the other hand, is clearer about the specific permissions being requested by Octotree.
Octotree uses the following open-source software: