README.markdown
1xmpp-client setup
2=================
3
4 go get github.com/agl/xmpp-client
5
6(If you don't have Go already installed then see below.)
7
8xmpp-client use
9===============
10
11xmpp-client is a simple XMPP client written in pure Go. It's a terminal program and so probably doesn't work on Windows.
12
13xmpp-client expects a config file in `~/.xmpp-client`. You can set the location of the config file with `--config-file` on the command line. If it fails to parse a config file, it'll enter enrollment: where it'll ask a series of questions to configure itself and will then write a config file from the answers.
14
15The config file is just a JSON file and can be edited by hand. (Although xmpp-client will rewrite it, blowing away any comments or custom formatting.)
16
17xmpp-client will prompt for a password each time it's run. If you want to save the password you have to edit the config file and insert a string element called `Password`. (This ensures that you understand that the password is stored in plaintext.)
18
19Once the connection has been established, the commands are quite simple. Type `/help` for a listing.
20
21Messages are sent by entering the JID of a contact and hitting tab to complete the address, followed by a colon. The message can then be entered after the colon, IRC style. Like this:
22
23 > friend@example.com: Hi there!
24
25On subsequent lines you don't have to enter their address again, unless you want to direct messages to someone else:
26
27 > friend@example.com: Hi there!
28 > I was thinking
29 > about that thing
30 > otherfriend@example.com: I'll be right with you!
31 > friend@example.com: back again
32
33Messages from others are written in a similar fashion: the address is omitted for subsequent lines and replaced with a colon. The colon is red for unencrypted and green for encrypted.
34
35If a contact name isn't recognised before a colon then it's ignored. Don't assume that you're sending a message to who you think you are unless you tab completed the address.
36
37The client functions, but is very rudimentary.
38
39Installation instructions
40=========================
41
42Build and run instructions for Ubuntu 13.10 (codename Saucy Salamander, go version 1.1.2). Note the version of Go shipped with this distro is very old any may be broken now.
43
44 sudo apt-get install git golang mercurial
45 export GOPATH=$HOME/go
46 go get github.com/agl/xmpp-client
47 $GOPATH/bin/xmpp-client
48
49 ## If you want to set up an alias
50 echo "alias xmpp-client='$GOPATH/bin/xmpp-client' " >> ~/.bashrc
51 . ~/.bashrc
52 xmpp-client
53
54Build and run instructions for Tails (tested on version 1.2, go version 1.2)
55
56 ## If you don't have already
57 sudo apt-get update
58
59 ## Debian old-stable, on which Tails is currently based, doesn't have Go packages
60 sudo apt-get install -t unstable golang
61
62 ## Git is already included in tails so we only need to get Mercurial
63 sudo apt-get install mercurial
64
65 ## Assuming you have created a persistant volume
66 export GOPATH=/home/amnesia/Persistent/go/
67
68 go get github.com/agl/xmpp-client
69 $GOPATH/bin/xmpp-client
70