Tail and search your logs from the terminal

Install the tailcove command line tool, sign in through your browser, follow a source live with the query language, search with jq, and send a cron job's output to Tailcove.

Beginner10 min to complete5 min read

Before you start

  • A Tailcove source receiving logs
  • A Linux or macOS machine

The web app is the best place to dig into a problem. When you're already in a terminal, deploying or SSHed into a box, it's quicker to stay there. The tailcove command line tool follows a source as lines arrive, searches it with the same query language as the search bar, and sends any program's output to a source. This guide sets it up and walks through the commands you'll use most. Every flag is in the CLI docs.

On this page7 sections

1. Install it#

tailcove ships with every release of the Tailcove agent as one static binary. Pick your system:

# Apple silicon (M1 and later). On an Intel Mac use tailcove_darwin_amd64.tar.gz.
curl -fsSL https://github.com/tailcove/agent/releases/latest/download/tailcove_darwin_arm64.tar.gz | tar -xz tailcove
sudo install -m 0755 tailcove /usr/local/bin/tailcove
tailcove version
# x86_64. On an ARM server use tailcove_linux_arm64.tar.gz.
curl -fsSL https://github.com/tailcove/agent/releases/latest/download/tailcove_linux_amd64.tar.gz | tar -xz tailcove
sudo install -m 0755 tailcove /usr/local/bin/tailcove
tailcove version
# There's no Windows build yet. Install WSL once (it needs a restart), then
# run the Linux commands inside the Ubuntu terminal it adds.
wsl --install

uname -m tells you which Mac you have: arm64 is Apple silicon, x86_64 is Intel. With Go 1.24 or newer, go install github.com/tailcove/agent/cmd/tailcove@latest works too.

2. Sign in#

tailcove login

It prints a code like BCDF-GHJK and opens the activation page in your browser. Check the code matches, look at the device name and address the page shows, and press Approve. The terminal saves its token in ~/.config/tailcove/config.json, readable by you only.

On a server you reached over SSH, no browser opens: open the link on your laptop and type the code there. Only approve a code you started yourself.

tailcove whoami
tailcove sources

tailcove whoami naming the team Shop and user Ana Silva, then tailcove sources listing shop-production

whoami names the team and user the token acts as. sources lists the team's sources with their ids, names and platforms. You can name a source by either in every command below, and leave it out when the team has only one.

3. Follow a source live#

tailcove tail checkout-api

tailcove tail shop-production printing recent lines, then a checkout, a payment error and a retry warning as they arrive

You get the last 10 lines, then each new one as it arrives, coloured by level, until you press Ctrl+C. Add a query to narrow it down:

tailcove tail checkout-api 'level:error OR status>=500' -host:canary

--json prints one JSON object per line, which makes jq the filter for anything the query language doesn't cover:

tailcove tail checkout-api --json | jq -r 'select(.context.duration_ms > 2000) | "\(.ts) \(.message)"'

The tool asks for new lines every 2 seconds and backs off when the API asks it to, so a line shows up a couple of seconds after Tailcove stores it.

4. Search what already happened#

tailcove search checkout-api '"connection refused"' --since 6h --limit 200

tailcove search shop-production level:error --since 1h listing three errors, newest first

Results come newest first. --since takes 15m, 6h or 2d; --from and --to take a time such as 2026-11-30T09:00 for a window in the past. With --json, a quick count of which hosts logged the errors:

tailcove search checkout-api level:error --since 1h --limit 1000 --json | jq -r .host | sort | uniq -c | sort -rn

5. Send a script's output to Tailcove#

tailcove pipe passes standard input straight through and sends each line to a source. It uses the source's ingest token, the one your apps send with, not your login:

export TAILCOVE_SOURCE_TOKEN=your-source-token
./backup.sh 2>&1 | tailcove pipe

cat backup.sh shows a script that only echoes three lines; ./backup.sh 2>&1 | tailcove pipe prints those same lines; a search then shows them stored with INFO and ERROR levels

The level of each line is read from its text (ERROR, warn, [info]), or set for every line with --level. Secrets are masked before anything leaves the machine. If Tailcove can't be reached, the output still passes through and the pipe still exits 0, so it never breaks the script.

That also means the pipeline's exit status is the pipe's. In cron, add set -o pipefail so a failing script still counts as a failure:

SHELL=/bin/bash
TAILCOVE_SOURCE_TOKEN=your-source-token
15 3 * * * set -o pipefail; /usr/local/bin/backup.sh 2>&1 | tailcove pipe >> /var/log/backup.log

Then an alert on the source for level:error tells you when last night's backup failed.

6. Set up a new project#

In a project's folder, tailcove init works out what it's built with, picks a source or makes one, installs the matching client package once you say yes, and sends a test line:

cd my-app
tailcove init

For an app that runs on a server it adds TAILCOVE_TOKEN to .env, without ever replacing one that's there. Leave tailcove tail running in another terminal to watch the test line arrive.

FAQ#

Does tailing use my log quota?

No. tail and search only read. Only pipe and init's test line send lines.

How many tails can I run at once?

A token gets 60 API requests a minute and a tail asks every 2 seconds, so one token comfortably runs a couple. Past that they slow down rather than fail.

How do I sign a machine out?

tailcove logout deletes the saved token on that machine. To stop the token working, revoke it under Settings → API tokens, where it's named "Tailcove CLI on" and the machine's name.

Does it run on Windows?

Not yet. The releases have Linux and macOS builds, amd64 and arm64.

Ready to try it on your own logs?

The Free plan includes a source, live tail, search and alerts. No credit card.