File size: 2,312 Bytes
d086025
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# teamscli — usage documentation

`teamscli` is a command-line tool for Microsoft Teams. It reads the local Teams
cookies database and reuses your auth cookie to set things such as your presence
status.

## Requirements

- A working Microsoft Teams desktop app (Windows/Linux).
- `teamscli` must run on the **same host** as the GUI Teams client you are
  logged in with (it reads that client's cookie database).

## Commands

### `presence`

Set your Teams presence status.

```
$ ./teamscli help presence
possible options are Busy, Available, Offline, DoNotDisturb (DND), Away, BeRightBack (BRB)

Usage:
  teamscli presence [flags]

Flags:
  -d, --duration string   keep presence for specific time (e.g. 1h)
  -h, --help              help for presence
```

Accepted presence values:

| Value | Short form |
|---|---|
| Available | — |
| Busy | — |
| DoNotDisturb | DND |
| Away | — |
| BeRightBack | BRB |
| Offline | — |

Examples:

```
$ ./teamscli presence Busy
presence set to Busy

$ ./teamscli presence brb -d 1h30m
presence set to brb for 1h30m
```

Input: presence name as the first (positional) argument; optional `--duration`
flag accepting Go-style durations such as `1h` or `1h30m`.
Output: plain-text confirmation of the presence that was set.

### `status`

Set a custom status message.

```
Usage:
  teamscli status [flags]

Flags:
  -d, --duration string   keep status for specific time (e.g. 1h)
  -s, --show              show status message when people message you
  -h, --help              help for status
```

Running `teamscli status` with no arguments prints this help text.

Behavior:

- `teamscli status "<message>"` sets the status message.
- `-d/--duration <dur>` keeps the message for a given time (Go-style duration,
  e.g. `1h`).
- `-s/--show` makes the message visible to people who message you.

Output examples:

```
$ teamscli status "Out to lunch"
status set to Out to lunch
this message will be shown to people who message you.

$ teamscli status "In a meeting" -d 1h -s
status set to In a meeting for 1h
this message will be shown to people who message you.
```

Input: status message as the first (positional) argument (quoted if it contains
spaces); optional `--duration` and `--show` flags.
Output: plain-text confirmation, plus a note when `--show` is enabled.