All Projects → benbjohnson → ghfs

benbjohnson / ghfs

Licence: MIT license
FUSE Filesystem for the GitHub API

Programming Languages

go
31211 projects - #10 most used programming language

ghfs godoc Version

The GitHub Filesystem (GHFS) is a user space filesystem that overlays the GitHub API. It allows you to access repositories and files using standard Unix commands such as ls and cat.

Install

To use ghfs, you'll need to install Go. If you're running OS X then you'll also need to install MacFUSE. Then you can install ghfs by running:

$ go get github.com/benbjohnson/ghfs/...

This will install ghfs into your $GOBIN directory. Next you'll need to create a directory and use ghfs to mount GitHub:

$ mkdir ~/github
$ ghfs ~/github &

Now you can read data from the GitHub API via the ~/github directory.

Usage

GHFS uses GitHub URL conventions for pathing. For example, to go to a user you can cd using their username:

$ cd ~/github/boltdb

To go to a repository, you can use the username and repository name:

$ cd ~/github/boltdb/bolt

Once you're in a repository, you can list files using ls and you can print out file contents using the cat tool.

bolt $ cat LICENSE
The MIT License (MIT)

Copyright (c) 2013 Ben Johnson

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].