Browser extensions (Chrome, Firefox, Safari and Opera) to display GitHub code in tree format. Useful for developers who frequently read source in GitHub and do not want to download or checkout too many repositories. Features:
- Easy-to-navigate code tree like IDEs
- Fast browsing with pjax
- Support private repositories (require personal access token)
- Download and install Octotree from the Chrome store
- Navigate to any GitHub project (or just refresh this page as an example)
- The code tree should show as follows:
Submitting to Mozilla and Safari stores is quite a tedious process. Octotree 1.0 (not even 1.1) was submitted to Mozilla store and is still being reviewed. Safari store requires even more work and time (that I don't have).
Alternatively, you can just install the prebuilt extensions located in the dist folder. For security reason, be sure to install from this location only.
- Firefox: drag
octotree.xpi
to the browser and follow the instructions - Safari: drag
octotree.safariextz
to the browser and follow the instructions - Opera: drag
octotree.nex
to the browser and follow the instructions
Note: you can also pack extensions from source by executing the Gulp script that generates extension structures for Chrome, Firefox and Safari. Refer to the documentation of Firefox and Safari to learn how to package extensions.
Octotree uses GitHub API to retrieve repository metadata. By default, it makes unauthenticated requests to the GitHub API. However, there are two situations when requests must be authenticated:
- You access a private repository
- You exceed the rate limit of unauthenticated requests
When that happens, Octotree shows the screen below to ask for your GitHub personal access token. If you don't already have one, create one, then copy and paste it into the textbox. Note that the minimal scopes that should be granted are public_repo
and repo
(if you need access to private repositories).
Alternatively, you can manually enter or update the token by following these steps:
- Navigate to any GitHub page
- Open the Chrome (or Safari, Firefox) developer console
- Execute the following line:
localStorage.setItem('octotree.github_access_token', 'REPLACE WITH TOKEN')
- Hide sidebar by default (upon many user requests)
- Hotkey (
cmd+b
,ctrl+b
) to toggle sidebar - Sidebar is now resizable
- Support rendering submodules
- Reflect GitHub selection to Octotree
- New sidebar header and progress indicator
- And bug fixes
- New UI that blends better with GitHub!
- Hide Octotree on non-code pages
- When asking for token, show more detailed message and not fly out automatically
- Extend pjax timeout to work better with big files
- Sanitize file and folder names before displaying
- Fix error when a branch name contains slashes
- Gulp script to build for Chrome, Firefox and Safari
- And some other minor changes
- Thanks to everyone who submit pull requests, report bugs and suggest ideas on GitHub and on HN
- Extension icon by pstadler