README.md
1## Keybase [![Build Status](https://travis-ci.org/keybase/client.svg?branch=master)](https://travis-ci.org/keybase/client) [![Build status](https://ci.appveyor.com/api/projects/status/90mxorxtj6vixnum/branch/master?svg=true)](https://ci.appveyor.com/project/keybase/client-x5qrt/branch/master)
2
3This repository contains the Keybase core crypto libraries, command-line
4utility, and local Keybase service. All code is written in the [Go
5Language](https://golang.org), making heavy use of Go's
6[OpenPGP](https://godoc.org/golang.org/x/crypto/openpgp) and
7[NaCl](https://godoc.org/golang.org/x/crypto/nacl)
8[Library](https://github.com/agl/ed25519) implementation.
9
10Our intended architecture is that `keybase` runs a local service on Desktop
11environments, which can be connected to over a local Unix domain sockets on OSX/Linux,
12and over named pipes on Windows. The persistent service will eventually listen
13for asynchronous server updates, and will serve several clients, like the command-line
14utility, the graphical desktop app ([see `electron`](../electron)), and the Keybase
15FUSE-mounted file system.
16
17Code in this repository can run against either our [production
18site](https://keybase.io) or our [staging
19server](https://stage0.keybase.io).
20
21### Install production client
22
23If you're not building Keybase yourself, follow our [usual install
24instructions](https://keybase.io/download).
25
26### Building
27
28Here's how to build the command line client on Linux or OSX. You need to
29have both Git and **Go 1.9 or higher** installed. (Run `go version` to
30see what version you have.)
31
32```bash
33# First we need to set up a GOPATH. This is a standard first step for
34# building Go programs, so if you've done this already, skip on ahead.
35# See also https://golang.org/doc/install.
36mkdir ~/gopath
37export GOPATH="$HOME/gopath" # Consider putting this in your ~/.bashrc.
38export PATH="$PATH:$GOPATH/bin" # Ditto.
39
40# Now for the actual clone and build.
41go get github.com/keybase/client/go/keybase
42go install -tags production github.com/keybase/client/go/keybase
43
44# If you did the PATH bit above, this should just work.
45keybase
46```
47
48### Run the service
49
50```bash
51keybase service
52```
53
54Or specify a custom home directory (and use -d for debug):
55
56```bash
57keybase -H ~/Projects/Keybase/dev -d service
58```
59
60Note that many commands will start the service in the background
61automatically if it's not already running. See also `keybase ctl --help`.
62
63### Run the client
64
65```bash
66keybase login
67keybase id max
68```
69
70### Or you can run the client in "Standalone" Mode
71
72```bash
73# No service needed, but you'll be repeatedly prompted for your passphrase
74keybase --standalone id max
75```
76
77### Run tests
78
79```bash
80cd $GOPATH/src/github.com/keybase/client/go/test
81./run_tests.sh
82```
83
84### Calculate package dependenies
85
86```bash
87make gen-deps
88```
89
90### License
91
92Most code is released under the New BSD (3 Clause) License.
93