1
0
Fork
You've already forked cobait
0
a no dependency cobalt.tools cli and package https://www.npmjs.com/package/cobait
  • JavaScript 100%
KwiatekMiki 35c66ecb1f
All checks were successful
/ publish (push) Successful in 32s
ci: why do i always have to have problems with forgejo actions
2025年02月14日 17:06:23 +01:00
.forgejo/workflows ci: why do i always have to have problems with forgejo actions 2025年02月14日 17:06:23 +01:00
.gitignore initial commit 2025年02月14日 15:26:28 +01:00
.npmignore feat: add an .npmignore file 2025年02月14日 16:25:40 +01:00
args.js feat: change the default instance 2025年02月14日 15:40:57 +01:00
cli.js fix: i don't even know what the fuck happened 2025年02月14日 16:08:06 +01:00
index.js feat: change the default instance 2025年02月14日 15:40:57 +01:00
LICENSE feat: i forgot the license FUCK 2025年02月14日 15:32:51 +01:00
package.json build: bump version 2025年02月14日 16:26:32 +01:00
pnpm-lock.yaml initial commit 2025年02月14日 15:26:28 +01:00
README.md feat: change the default instance 2025年02月14日 15:40:57 +01:00
test.js initial commit 2025年02月14日 15:26:28 +01:00
utils.js initial commit 2025年02月14日 15:26:28 +01:00

cobait

a no dependency[1] cobalt.tools cli and package

how to download

install node (and npm), open your terminal, and execute this command:

npm install -g cobait

how to use (cli)

to download a video, use cobait <video link>
to download multiple videos with one command, do cobait <video 1 link> <video 2 link> <...>

to download a playlist, use cobait <playlist link>

you can also use cb if you don't want to type out cobait every time.

arguments

to pass an argument, do one of these:

  • cobait -<short argument> <value>
  • cobait -<short argument>=<value>
  • cobait --<argument> <value>
  • cobait --<argument>=<value>

you can pass arguments anywhere in your command, for example:
cobait <video link> --instance https://api.cobalt.example <video link> <video link> -c=av1 <playlist link>

links have to start with "http:" or "https:"

argument list

  • -a, --audio - download an audio file instead of a video
  • -m, --mute - mute the video's audio
  • -i, --instance - change the instance you're using (default https://cobalt-api.kwiatekmiki.com, doesn't require an api key as of writing this)
    in case you don't know any (other) instances, here's an instance list (made by me)
  • -k, --api-key - use an api key for downloading (required if the instance needs turnstile and/or api keys)
  • -c, --codec - change the video codec (youtube only)
  • -q, --quality - change the video quality (e.g. 2160 for 1440p)
  • -n, --no-hls - disable hls for youtube (default: hls enabled)
  • -h, --h265 - allows you to download videos from platforms like tiktok in higher quality (at cost of compatibility)
  • -g, --twitter-gif - download short twitter videos as gifs (not recommended)
  • -f, --audio-format - change the format for audio (e.g. mp3, -a required)
  • -b, --bitrate - change the bitrate for your audio (e.g. 128, -a required)
    bitrate is applied only when converting audio to a lossy format.
  • -t, --audio-track - use a dubbed audio track if available (e.g. pl, youtube only)
  • -o, --original-audio - download sound from the video without any changes by the post's author (tiktok only)
  • -s, --filename-style - change the filename style (if the service supports it, default basic)
    filename style will only be used for files tunneled by cobalt, so if it doesn't work, you need to use -u
  • -e, --no-metadata - disable metadata, like the title, artist, etc. (default: metadata enabled)
    cobalt doesn't advertise itself using metadata, so it's recommended you keep it on

you can find defaults not mentioned here and expected values for arguments in cobalt's documentation