44 |
44 |
45 `madonctl config dump -i mastodon.social -L username@domain -P password` |
45 `madonctl config dump -i mastodon.social -L username@domain -P password` |
46 |
46 |
47 (You can redirect the output to a configuration file.) |
47 (You can redirect the output to a configuration file.) |
48 |
48 |
49 If you only provide the Mastodon instance, it will generate a configuration |
|
50 file with an application ID/secret for this instance and you will have to add |
|
51 the user credentials. |
|
52 |
|
53 Note that every variable from the configration file can also be set with an |
|
54 environment variable (e.g. `export MADONCTL_INSTANCE='https://mamot.fr'`). |
|
55 |
|
56 If you don't want to use the password or if you have enabled *Two-factor |
49 If you don't want to use the password or if you have enabled *Two-factor |
57 authentication*, you can use **OAuth2** with the `oauth2` command, either |
50 authentication*, you can also use **OAuth2** with the `oauth2` command: |
58 interactively or non-interactively: |
51 |
59 |
52 `madonctl -i mastodon.social oauth2 > madonctl.yaml` |
60 `madonctl -i mastodon.social oauth2` |
53 |
61 |
54 For details on the configuration, please check the [configuration](configuration.md) page. |
62 The output is similar to the previous `config dump` command, so you can create |
|
63 your configuration file like this as well: |
|
64 |
|
65 `madonctl -i mastodon.social oauth2 > config_file.yaml` |
|
66 |
|
67 Note: If don't want to use the tool interactively, check to `get-url` and `code` |
|
68 subcommands: |
|
69 ``` sh |
|
70 madonctl -i mastodon.social oauth2 get-url |
|
71 # (Paste the link into your browser...) |
|
72 madonctl -i mastodon.social code $CODE > config_file.yaml |
|
73 ``` |
|
74 |
55 |
75 ### Usage |
56 ### Usage |
76 |
57 |
77 The complete list of commands is available in the online help (`madonctl help`, `madonctl command --help`...) |
58 The complete list of commands is available in the online help (`madonctl help`, `madonctl command --help`...) |
78 or in the [manpages](https://lilotux.net/~mikael/pub/madonctl/manual/html/).\ |
59 or in the [manpages](https://lilotux.net/~mikael/pub/madonctl/manual/html/).\ |