Skip to content
tt

v0.2.0

tt now runs on the any-cli/kit framework: the same commands serve over HTTP and MCP, and the package works as a tiktok:// resource driver.

tt now runs on the any-cli/kit framework. The commands and the records they print are the same, but each one is declared once and drives the command line, an HTTP server, an MCP tool set, and a resource-URI driver from that single declaration. Nothing about how you read TikTok changed; what changed is how many ways the same read is now exposed.

Serve the same commands

Every command is now available over HTTP and as an MCP tool set, with no extra code:

tt serve --addr :7777    # GET /v1/user/<handle> returns NDJSON
tt mcp                   # speak MCP over stdio

tt mcp lets an agent call video, user, posts, search, and the rest as tools. tt serve puts the same operations behind a small HTTP surface. Both read the same public planes the CLI reads.

Use tt as a resource-URI driver

The package now registers a tiktok domain the way a program registers a database driver with database/sql. A host enables it with one blank import:

import _ "github.com/tamnd/tiktok-cli/tiktok"

Then ant, or any program that links the package, dereferences tiktok:// URIs:

ant get tiktok://user/tiktok                  # the profile record
ant get tiktok://video/7106594312292453675    # one video
ant ls  tiktok://user/tiktok                   # the user's videos
ant cat tiktok://video/7106594312292453675     # just the description text
ant url tiktok://hashtag/minecraft             # the live https URL

Store any run

Every command can now tee its records into a SQLite file as it prints them, so a run is both a stream and a saved dataset:

tt posts @tiktok --db posts.db

Flag changes

The framework brings its own global flags, so a few names moved:

  • --rate replaces --delay for the minimum spacing between requests.
  • --db tees records into a store, and --profile selects a saved profile.
  • --jobs is gone; the read commands page in order rather than fan out.
  • --user-agent, --timeout, --retries, -o/--output, --fields, --template, -n/--limit, and -q/--quiet are unchanged.

One exit code moved to match the framework: a missing handle, video, hashtag, or sound now exits 6 (not found) instead of folding into the empty-result code. Walled surfaces still exit 4, and a valid empty result still exits 3.

Install

go install github.com/tamnd/tiktok-cli/cmd/tt@latest

Or grab a prebuilt binary from the release, or run the container image:

docker run --rm ghcr.io/tamnd/tiktok:0.2.0 --help

Every tagged version builds archives for Linux, macOS, Windows, and FreeBSD, Linux packages (deb, rpm, apk), a multi-arch GHCR image, checksums, SBOMs, and a cosign signature. The binary is pure Go, so there is nothing to install alongside it.