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
|
||
|---|---|---|
| .forgejo/workflows | ci: why do i always have to have problems with forgejo actions | |
| .gitignore | initial commit | |
| .npmignore | feat: add an .npmignore file | |
| args.js | feat: change the default instance | |
| cli.js | fix: i don't even know what the fuck happened | |
| index.js | feat: change the default instance | |
| LICENSE | feat: i forgot the license FUCK | |
| package.json | build: bump version | |
| pnpm-lock.yaml | initial commit | |
| README.md | feat: change the default instance | |
| test.js | initial commit | |
| utils.js | initial commit | |
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 (defaulthttps://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.2160for 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,-arequired)-b,--bitrate- change the bitrate for your audio (e.g.128,-arequired)
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, defaultbasic)
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