File: usage.md

package info (click to toggle)
toot 0.51.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,108 kB
  • sloc: python: 9,284; makefile: 41
file content (176 lines) | stat: -rw-r--r-- 4,158 bytes parent folder | download | duplicates (2)
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
Usage
=====

Running `toot` displays a list of available commands.

Running `toot <command> -h` shows the documentation for the given command.

Below is an overview of some common scenarios.

<!-- toc -->

Authentication
--------------

Before tooting, you need to log into a Mastodon instance.

    toot login

You will be redirected to your Mastodon instance to log in and authorize toot to
access your account, and will be given an **authorization code** in return
which you need to enter to log in.

The application and user access tokens will be saved in the configuration file
located at `~/.config/toot/config.json`.

### Using multiple accounts

It's possible to be logged into multiple accounts at the same time. Just
repeat the login process for another instance. You can see all logged in
accounts by running `toot auth`. The currently active account will have an
**ACTIVE** flag next to it.

To switch accounts, use `toot activate`. Alternatively, most commands accept a
`--using` option which can be used to specify the account you wish to use just
that one time.

Finally you can logout from an account by using `toot logout`. This will
remove the stored access tokens for that account.

Post a status
-------------

The simplest action is posting a status.

```sh
toot post "hello there"
```

You can also pipe in the status text:

```sh
echo "Text to post" | toot post
cat post.txt | toot post
toot post < post.txt
```

If no status text is given, you will be prompted to enter some:

```sh
$ toot post
Write or paste your toot. Press Ctrl-D to post it.
```

Finally, you can launch your favourite editor:

```sh
toot post --editor vim
```

Define your editor preference in the `EDITOR` environment variable, then you
don't need to specify it explicitly:

```sh
export EDITOR=vim
toot post --editor
```

### Attachments

You can attach media to your status. Mastodon supports images, video and audio
files. For details on supported formats see
[Mastodon docs on attachments](https://docs.joinmastodon.org/user/posting/#attachments).

It is encouraged to add a plain-text description to the attached media for
accessibility purposes by adding a `--description` option.

To attach an image:

```sh
toot post "hello media" --media path/to/image.png --description "Cool image"
```

You can attach upto 4 attachments by giving multiple `--media` and
`--description` options:

```sh
toot post "hello media" \
  --media path/to/image1.png --description "First image" \
  --media path/to/image2.png --description "Second image" \
  --media path/to/image3.png --description "Third image" \
  --media path/to/image4.png --description "Fourth image"
```

The order of options is not relevant, except that the first given media will be
matched to the first given description and so on.

If the media is sensitive, mark it as such and people will need to click to show
it. This affects all attachments.

```sh
toot post "naughty pics ahoy" --media nsfw.png --sensitive
```

View timeline
-------------

View what's on your home timeline:

```sh
toot timeline
```

Timeline takes various options:

```sh
toot timeline --public          # public timeline
toot timeline --public --local  # public timeline, only this instance
toot timeline --tag photo       # posts tagged with #photo
toot timeline --count 5         # fetch 5 toots (max 20)
toot timeline --once            # don't prompt to fetch more toots
```

Add `--help` to see all the options.

Status actions
--------------

The timeline lists the status ID at the bottom of each toot. Using that status
you can do various actions to it, e.g.:

```sh
toot favourite 123456
toot reblog 123456
```

If it's your own status you can also delete pin or delete it:

```sh
toot pin 123456
toot delete 123456
```

Account actions
---------------

Find a user by their name or account name:

```sh
toot search "name surname"
toot search @someone
toot search someone@someplace.social
```

Once found, follow them:

```sh
toot follow someone@someplace.social
```

If you get bored of them:

```sh
toot mute someone@someplace.social
toot block someone@someplace.social
toot unfollow someone@someplace.social
```