Unofficial cobalt command line client made in go. cobalt-cli uses gobalt library for communication between your machine <-> cobalt servers.
- Get directly link from the service cdn (if possible);
- More than 15 services supported;
- Option to check status of cobalt servers;
- Use custom cobalt instances (see https://instances.hyper.lol);
- Download the file directly to your computer.
Platform/OS | Download link |
---|---|
Windows | x64 / x86 / arm |
Linux | x64 / x86 / arm64 |
Mac | Intel / M1, M2, M3 |
You can also check the releases page to download the latest version according to your platform.
Alternatively, if you have Go installed, you can use go install github.com/lostdusty/cobalt@latest
to install to your machine.
Planned features for cobalt-cli:
- Option to save file to the current/custom folder, likely
-s
flag;- Display progress bar to track download progress (when supported by cobalt).
- Hability to use custom downloader program (wget, curl, got, etc);
- Translations.
- Benchmarking.
cobalt-cli is similar to yt-dlp, just use cobalt [url]
. If you use cobalt help
, it will now show the help message.
To save a file to the current directory, use the -s
flag, like: cobalt https://www.youtube.com/watch?v=n1a7o44WxNo -s
usage: cobalt-cli [-h|--help] [url "<value>"] [-c|--video-codec (av1|vp9|h264)]
[-q|--video-quality (144|240|360|480|720|1080|1440|2160)]
[-f|--audio-format (opus|ogg|wav|mp3|best)]
[-Q|--audio-quality (64|128|192|256|320)]
[-p|--filename-pattern (basic|pretty|nerdy|classic)]
[-m|--mode (auto|audio|mute)] [-x|--proxy]
[-d|--disable-metadata] [-t|--tiktok-h265]
[-T|--tiktok-full-audio] [-g|--gif] [-s|--save] [-a|--api
"<value>"] [-i|--instances] [-v|--verbose] [-k|--key
"<value>"] [-b|--benchmark]
save what you want, directly from the terminal, no unwanted
distractions involved. powered by cobalt's api
Arguments:
-h --help Print help information
<url> url to save
-c --video-codec Video codec to be used. Applies only to youtube
downloads. AV1: 8K/HDR, lower support | VP9: 4K/HDR,
best quality | H264: 1080p, works everywhere.
Default: h264
-q --video-quality Quality of the video, applies only to youtube
downloads. Default: 1080
-f --audio-format Audio format/codec to be used. "best" doesn't
re-encodes audio. Default: best
-Q --audio-quality Audio quality in kbps. Default: 320
-p --filename-pattern File name pattern. Classic:
youtube_yPYZpwSpKmA_1920x1080_h264.mp4 | audio:
youtube_yPYZpwSpKmA_audio.mp3 // Basic: Video Title
(1080p, h264).mp4 | audio: Audio Title - Audio
Author.mp3 // Pretty: Video Title (1080p, h264,
youtube).mp4 | audio: Audio Title - Audio Author
(soundcloud).mp3 // Nerdy: Video Title (1080p, h264,
youtube, yPYZpwSpKmA).mp4 | audio: Audio Title -
Audio Author (soundcloud, 1242868615).mp3. Default:
pretty
-m --mode Mode to download the video. Auto: video with audio |
Audio: only audio | Mute: video without audio.
Default: auto
-x --proxy Tunnel the download through cobalt's servers,
bypassing potential restrictions and protecting your
identity and privacy. Default: false
-d --disable-metadata Disable metadata in the downloaded file. Default:
false
-t --tiktok-h265 Use H265 codec for TikTok downloads. Default: false
-T --tiktok-full-audio Download TikTok videos with the original sound used
in a TikTok video. Default: false
-g --gif Convert Twitter videos to GIFs. Default: false
-s --save Save the downloaded file to disk. Default: true
-a --api Which API to use. Default is hyperdefined cobalt's
API. If you are hosting a custom API, or want to use
a different server, you can use it here. Default:
https://cobalt-backend.canine.tools
-i --instances Show community instances and exit. Default: false
-v --verbose Enable verbose logging. Default: false
-k --key API key by the instance owner. You may need to
provide one to use download. Can be set with
COBALT_API_KEY environment variable. Default:
-b --benchmark Run a benchmark to test the download speed and
integrity. Default: false
The command changed, now to view other instances, use cobalt -i
Make sure you have the lastest go compiler. Download it here.
Easy as:
- Clone this repository.
- On the root of this repository, run
go mod tidy
. This will download this project dependencies. - To run the application, use
go run .
. To compile, rungo build
.
To add additional Windows metadata, you'll need:
- go-winres, follow the install instructions there
Then run go-winres make
on the root of this repository, it will create two .syso files.
After that, building with go build
will automatically embed these files on the Windows executable.
Check out too: