summaryrefslogtreecommitdiff
path: root/docs/admin/cli.md
AgeCommit message (Collapse)AuthorFiles
2024-04-02[feature] Add `enable` command to mirror existing `disable` command; update ↵Libravatar tobi1
docs (#2792) * [feature] add `enable` CLI command to mirror existing `disable` command * update docs
2023-08-23[feature] list commands for both attachment and emojis (#2121)Libravatar rdelaage1
* [feature] list commands for both attachment and emojis * use fewer commands, provide `local-only` and `remote-only` as filters * envparsing --------- Co-authored-by: Romain de Laage <romain.delaage@rdelaage.ovh> Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
2023-07-09[chore] Fix password typos (#1966)Libravatar Daenney1
Fixes #1963
2023-07-07[feature] Add media list command (#1943)Libravatar Daenney1
* [feature] Add media list command This is an attempt to help alleviate #1776. Using admin media list --local the full path to each local media file will be printed, with a newline. The output of this should be feadable into backup tools in order to allow to backup local media too. Together with the database this should allow to fully recover from the loss of an instance. The list command also gets a --remote flag for symmetry. In the case of --remote we print the RemoteURL instead, the location the asset can be retrieved from. To get all media, you can run with --local and --remote. * [bugfix] Fix the test failures * [feature] Reimplement list media as top commands This changes the implementation of admin media list --<variant> to two separate top-level commands, list-local and list-remote. The implementation now iterates over over the database in batches of 200 in order to avoid loading all media metadata into memory. * [feature] Implement ListMedia with filter callback This does away with the somewhat odd iterator-like structure we had before and does away with most of the loop duplication in list-local and list-remote. Instead they call GetAllMediaPaths with a filter func to select the media they want. That's accumulated into a slice and eventually returned. * [bugfix] Simplify remote filter Since we don't append the empty string anywhere, the remote filter can be limited to returning RemoteURL, as that'll be an empty string for local media. * [docs] Add media list commands to CLI reference --------- Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com>
2023-02-11[chore/performance] Update media prune logic, add extra CLI command (#1474)v0.7.0-rc2Libravatar tobi1
* start updating media prune stuff a wee bit * continue prune / uncache work * more tidying + consistency stuff * add prune CLI command * docs * arg
2022-11-25[feature] Add `admin media prune orphaned` CLI command (#1146)Libravatar tobi1
* add FilePath regex * add `admin media prune orphaned` command * add prune orphaned function to media manager * don't mark flag as required * document admin media prune orphaned cmd * oh envparsing.sh you coy minx
2022-11-25[bugfix] Change emailVerified to true for admin account create (#1140)Libravatar Phil Hagelberg1
The NewSignup method was already being called with requireApproval=false, but it had emailVerified=false as well, which meant that it was required to use the `admin account confirm` command to verify the email before the newly-created user could log in. I think that was probably an oversight; effectively it did require approval anyway. Changing emailVerified to true allows you to just create the account and log in immediately, reducing the opportunity for manual error to sneak in. Also updated the docs to remove the mention of needing to confirm new accounts. However, I've left the confirmation command alone because I think once we have web signups, it will be needed in that context.
2022-11-14[chore] Remove unused `admin account suspend` action (#1047)Libravatar tobi1
* [docs] clarify that admin account commands are for local accounts * [chore] remove confusing unused `admin account suspend` command
2022-09-20[docs] Add --config-path to example CLI commands where needed. (#843)Libravatar Phil Hagelberg1
Previously we had a few examples referring to --config-file (which is not accepted) but most were missing it altogether. Put this argument last in all the examples. Also replaced "./example.json" with just "example.json" in the import/export examples because the "./" was unnecessary.
2022-02-03[docs] Fix documentation to show --config-path in the right position. (#375)Libravatar Phil Hagelberg1
The current position gets rejected as an unknown argument.
2021-12-07Implement Cobra CLI tooling, Viper config tooling (#336)Libravatar tobi1
* start pulling out + replacing urfave and config * replace many many instances of config * move more stuff => viper * properly remove urfave * move some flags to root command * add testrig commands to root * alias config file keys * start adding cli parsing tests * reorder viper init * remove config path alias * fmt * change config file keys to non-nested * we're more or less in business now * tidy up the common func * go fmt * get tests passing again * add note about the cliparsing tests * reorganize * update docs with changes * structure cmd dir better * rename + move some files around * fix dangling comma
2021-09-09Import export (#194)Libravatar tobi1
* start with export/import code * messing about with decoding/encoding * some more fiddling * stuff is WORKING * working pretty alright! * go fmt * fix up tests, add docs * start backup/restore doc * tweaks * credits * update advancedVisibility settings * update bun library -> v1.0.4 Signed-off-by: kim (grufwub) <grufwub@gmail.com> * update oauth library -> v4.3.1-SSB Signed-off-by: kim (grufwub) <grufwub@gmail.com> * handle oauth token scope, fix user.SigninCount + token.UserID Signed-off-by: kim (grufwub) <grufwub@gmail.com> * update oauth library --> v4.3.2-SSB Signed-off-by: kim (grufwub) <grufwub@gmail.com> * update sqlite library -> v1.13.0 Signed-off-by: kim (grufwub) <grufwub@gmail.com> * review changes * start with export/import code * messing about with decoding/encoding * some more fiddling * stuff is WORKING * working pretty alright! * go fmt * fix up tests, add docs * start backup/restore doc * tweaks * credits * update advancedVisibility settings * review changes Co-authored-by: kim (grufwub) <grufwub@gmail.com> Co-authored-by: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>
2021-07-31Password change (#123)Libravatar Tobi Smethurst1
* add password change command * document cli commands * go fmt