]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tools/peertube.ts
Add redundancy CLI
[github/Chocobozzz/PeerTube.git] / server / tools / peertube.ts
old mode 100755 (executable)
new mode 100644 (file)
index c8b9fa7..9883bbf
@@ -1,5 +1,8 @@
 #!/usr/bin/env node
 
+import { registerTSPaths } from '../helpers/register-ts-paths'
+registerTSPaths()
+
 import * as program from 'commander'
 import {
   version,
@@ -18,13 +21,11 @@ program
   .command('get-access-token', 'get a peertube access token', { noHelp: true }).alias('token')
   .command('watch', 'watch a video in the terminal ✩°。⋆').alias('w')
   .command('repl', 'initiate a REPL to access internals')
+  .command('plugins [action]', 'manage instance plugins/themes').alias('p')
+  .command('redundancy [action]', 'manage instance redundancies').alias('r')
 
 /* Not Yet Implemented */
 program
-  .command('plugins [action]',
-           'manage plugins on a local instance',
-           { noHelp: true } as program.CommandOptions
-          ).alias('p')
   .command('diagnostic [action]',
            'like couple therapy, but for your instance',
            { noHelp: true } as program.CommandOptions
@@ -58,14 +59,15 @@ if (!process.argv.slice(2).length) {
             ,"\\/
       _,.__/"\\/_                     (the CLI for red chocobos)
      / \\) "./,  ".
-  --/---"---" "-) )---- by Chocobozzz et al.`)
+  --/---"---" "-) )---- by Chocobozzz et al.\n`)
 }
 
 getSettings()
   .then(settings => {
-    const state = (settings.default === undefined || settings.default === -1) ?
-      'no instance selected, commands will require explicit arguments' :
-      ('instance ' + settings.remotes[settings.default] + ' selected')
+    const state = (settings.default === undefined || settings.default === -1)
+      ? 'no instance selected, commands will require explicit arguments'
+      : 'instance ' + settings.remotes[settings.default] + ' selected'
+
     program
       .on('--help', function () {
         console.log()