Attention, please.
This code is a work in progress, and we publish it for full transparency. You can review the source code, but:
- you shouldn't just run this code without reading it, as it may have bugs or stubbed out crypto
- it might not do exactly what it says it is doing
If you really want to install Keybase, please return to the top level Readme.md for official release instructions.
2nd Warning: The code in this repository does not represent a finalized architecture or API and we will probably not accept any external pull requests. We advise you not to fork this repository.
# Install CocoaPods (if not installed)
sudo gem install cocoapods
pod setup
# Generate workspace
pod install
# Open workspace (not xcodeproj)
open Keybase.xcworkspace
Then select the target Keybase
and run.
To build the installer, view instructions at Scripts/README.md.
┌────────────────────────────────┐
│desktop/app/installer.desktop.js│
└────────────────────────────────┘
│
│
▼
┌────────────────────────────────┐
│keybase install-auto │
│keybase install --components=...│
└────────────────────────────────┘
│
│
▼
┌────────────────────┐
│ go/install package │
└────────────────────┘
│
▼
┌──────────────────────┐
│ non-privileged tasks │
└──────────────────────┘
┌──────────────────────┐
│ privileged tasks │
└──────────────────────┘
│
│
▼
┌─────────────────────┐
│KeybaseInstaller.app │
└─────────────────────┘
Install tasks are managed by the go/install
package. You can interact with this package via the command line client, for example,
by specifying components to install.
Install the service (in launchd):
keybase install --components=service
Install the helper tool, Fuse and the mount directory, and start KBFS service:
keybase install --components=helper,fuse,mountdir,kbfs
If the installed component requires a privileged task or native code (like Fuse), the go package will call into the native KeybaseInstaller.app (see below).
When the Electron app starts up it runs keybase install-auto
in shared/desktop/app/installer.desktop.js.
By default this runs install with the components:
cli
: Command line (to /usr/local/bin)updater
: Updater in launchdservice
: Service in launchdkbfs
: KBFS in launchd (without mount), needed by chatkbnm
: Browser native messaging
If Fuse has been installed (via the Folder tab), it will also install/update the following components:
helper
: Helper tool which runs privileged tasksfuse
: Fuse kextmountdir
: Creates /keybasekbfs
: KBFS in launchd (with mount)
The KeybaseInstaller.app has options to install native components (via privileged tasks in the Helper tool) via the command line parameters:
For example, to install (or update) Fuse, you can run:
/Applications/Keybase.app/Contents/Resources/KeybaseInstaller.app/Contents/MacOS/Keybase \
--app-path=/Applications/Keybase.app --run-mode=prod --timeout=60 --install-fuse
Other arguments include:
install-fuse
: Installs KBFuse, our custom osxfuse build, see Fuse/kbfuse for more details.install-mountdir
: Creates the/keybase
folder.install-helper
: Installs helper tool, which runs privileged tasks. See Privileged Helper Tool.install-cli
: Installs command line into/usr/local/bin
or/etc/paths.d/Keybase
install-app-bundle
: Installs app by verifying app bundle and then moving it into/Applications/Keybase.app
(as privileged task).
It also has corresponding uninstall options:
uninstall-fuse
uninstall-mountdir
uninstall-helper
uninstall-cli
uninstall-app
See STYLEGUIDE.md.
Launch Agents, Services, XPC: Describes how services are installed and run.
App Extensions: Describes app extensions for Actions, Share and Finder Sync.
Privileged Helper Tool: Describes the Helper tool functionality.
In Xcode, Preferences, Text Editing:
- Prefer indent using: Spaces
- Tab width: 2 spaces
- Indent width: 2 spaces