PeerTube_original/server/tools
Theodore R. Smith 8e76aa1d75
(#3520) [cli] Hardened auth add: No longer fails with extraneous characters.
**The Solution:**
I have hardened `auth add` by stripping out everything from the third '/' to the end of the instance URL.

**The Problem:**
When adding an authorization for the peertube-cli, before this commit you could not have anything after the domain_name:port.

For instance, if there was a trailing / in your instance URL, before this commit it will always fail with

    expected 200 "OK", got 404 "Not Found".

It took me over 20 minutes to figure out that this was the problem.

See Issue #3091.
2020-12-27 14:29:54 -06:00
..
cli.ts Fix import/upload CLI options 2020-04-16 16:20:56 +02:00
package.json remove outdated badges, add authorization to caption routes 2020-11-20 11:29:37 +01:00
peertube-auth.ts (#3520) [cli] Hardened auth add: No longer fails with extraneous characters. 2020-12-27 14:29:54 -06:00
peertube-get-access-token.ts Use typescript paths in cli scripts too 2019-10-21 17:13:22 +02:00
peertube-import-videos.ts Fix channels import with a channel with playlists 2020-12-14 09:55:30 +01:00
peertube-plugins.ts Move to eslint 2020-02-03 08:31:02 +01:00
peertube-redundancy.ts emit more specific status codes on video upload (#3423) 2020-12-08 21:16:10 +01:00
peertube-repl.ts Fix CLI build 2020-05-07 15:40:22 +02:00
peertube-upload.ts Move to eslint 2020-02-03 08:31:02 +01:00
peertube-watch.ts Add log in peertube watch script on error 2020-04-14 09:09:11 +02:00
peertube.ts Move to eslint 2020-02-03 08:31:02 +01:00
README.md fix a few typos (#2141) 2019-09-23 08:17:42 +02:00
test.ts Add inspect to test script 2020-11-30 15:06:25 +01:00
tsconfig.json Split types and typings 2020-06-18 10:46:27 +02:00
yarn.lock Update CLI dependencies 2020-04-02 14:09:33 +02:00

peertube(8) -- companion CLI for PeerTube

SYNOPSIS

peertube [command] [options]

DESCRIPTION

peertube wraps various utilities around PeerTube that are used either on a running local, running remote, or cold local instance.

COMMANDS

Unless otherwise specified, every command can be queried for its own help or manual by passing its name to the help command, or by using the --help option.

auth [action]: stores credentials for your accounts on remote instances, so that you don't need to pass them at every command

upload|up: upload a video to a remote instance

$ peertube upload \
    -u "PEERTUBE_URL" \
    -U "PEERTUBE_USER" \
    --password "PEERTUBE_PASSWORD"

import-videos|import: import a video from a streaming platform to a remote instance

$ peertube import \
    -u "PEERTUBE_URL" \
    -U "PEERTUBE_USER" \
    --password "PEERTUBE_PASSWORD" \
    -t "TARGET_URL"

The target URL can be directly the video file, or any of the supported sites of youtube-dl. The video is downloaded locally and then uploaded. Already downloaded videos will not be uploaded twice, so you can run and re-run the script in case of crash, disconnection…

watch|w: watch a video in the terminal ✩°。⋆

-g, --gui <player>      player type (default: ascii)
-i, --invert            invert colors (ascii player only)
-r, --resolution <res>  video resolution (default: 720)

It provides support for different players:

- ascii (default ; plays in ascii art in your terminal!)
- mpv
- mplayer
- vlc
- stdout
- xbmc
- airplay
- chromecast

repl: interact with the application libraries and objects even when PeerTube is not running

Type .help to see the repl-only functions, or to see the available PeerTube core functions:

repl> lodash.keys(context)

help [cmd]: display help for [cmd]

EXAMPLES

$ peertube auth add -u "PEERTUBE_URL" -U "PEERTUBE_USER" --password "PEERTUBE_PASSWORD"
$ peertube up <videoFile>
$ peertube watch https://peertube.cpy.re/videos/watch/e8a1af4e-414a-4d58-bfe6-2146eed06d10

SEE ALSO

PeerTube Tools Documentation

PeerTube Admin Documentation

REPORTING BUGS

See PeerTube repository.