cli.rb 1014 B

1234567891011121314151617181920212223242526272829303132333435
  1. # frozen_string_literal: true
  2. require 'thor'
  3. require_relative 'mastodon/media_cli'
  4. require_relative 'mastodon/emoji_cli'
  5. require_relative 'mastodon/accounts_cli'
  6. require_relative 'mastodon/feeds_cli'
  7. require_relative 'mastodon/settings_cli'
  8. require_relative 'mastodon/domains_cli'
  9. module Mastodon
  10. class CLI < Thor
  11. def self.exit_on_failure?
  12. true
  13. end
  14. desc 'media SUBCOMMAND ...ARGS', 'Manage media files'
  15. subcommand 'media', Mastodon::MediaCLI
  16. desc 'emoji SUBCOMMAND ...ARGS', 'Manage custom emoji'
  17. subcommand 'emoji', Mastodon::EmojiCLI
  18. desc 'accounts SUBCOMMAND ...ARGS', 'Manage accounts'
  19. subcommand 'accounts', Mastodon::AccountsCLI
  20. desc 'feeds SUBCOMMAND ...ARGS', 'Manage feeds'
  21. subcommand 'feeds', Mastodon::FeedsCLI
  22. desc 'settings SUBCOMMAND ...ARGS', 'Manage dynamic settings'
  23. subcommand 'settings', Mastodon::SettingsCLI
  24. desc 'domains SUBCOMMAND ...ARGS', 'Manage account domains'
  25. subcommand 'domains', Mastodon::DomainsCLI
  26. end
  27. end