npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bluevs/vhcli-tiktok-ads

v0.0.17

Published

TikTok CLI - designed for AI Agent and developers

Downloads

905

Readme

@bluevs/vhcli-tiktok-ads

English | 中文


English

TikTok Marketing API CLI — designed for AI agents and developers.

Installation

npm install -g @bluevs/vhcli-tiktok-ads

Authentication

Tokens are issued by vhcli (Vision Hub CLI). You do not need to handle access tokens directly.

# Fetch a token via vhcli and pass it to ttcli
TOKEN=$(vhcli project account-token \
  --customer-project-id=<PROJECT_ID> \
  --account-id=<ADVERTISER_ID> \
  --format=json | jq -r .access_token)

ttcli --token="$TOKEN" --advertiser-id=<ADVERTISER_ID> auth show

Or persist credentials for repeated use:

ttcli auth set --token="$TOKEN" --advertiser-id=<ADVERTISER_ID>

Mainland China users: TikTok's API requires a proxy. Set HTTPS_PROXY=http://127.0.0.1:7897 (or your local proxy port) before running any command.

Usage

ttcli [command] [flags]

Flags:
  --advertiser-id string   Advertiser ID (overrides env / config)
  --token string           Access token (overrides env / config)
  --human                  Human-readable output (default is JSON)

Output is JSON by default, suitable for piping and AI agent use. Pass --human for readable text.

Commands

| Command | Description | |---|---| | advertiser | Account balance, transactions, budget | | bc | Business Center: accounts, balance, payment portfolio | | campaign-label | Campaign labels / tags | | creative | Creative assets for DM Ads | | file | Ad file library (video, image upload) | | identity | Ad-publishing identities (Spark Ads) | | minis | TikTok Minis (small games / short dramas) | | optimizer | Automated rules | | report | Async reporting tasks | | smart-plus | Smart+ campaigns | | targeting | Interest / behavior / hashtag taxonomy | | tool | Utilities: geo, bid, device, timezone, url-validate, … | | tt-video | TikTok video posts authorized for Spark Ads | | user | Marketing API user info | | auth | Manage credentials | | schema | Dump full command tree (JSON) |

# Explore all commands
ttcli --help
ttcli <command> --help

# Dump full command tree for AI agents
ttcli schema | jq '.subcommands[] | {path, short}'

中文

TikTok 营销 API 命令行工具,专为 AI Agent 和开发者设计。

安装

npm install -g @bluevs/vhcli-tiktok-ads

鉴权

Token 由 vhcli(Vision Hub CLI)发证,无需手动处理 access_token。

# 通过 vhcli 获取 token 并传给 ttcli
TOKEN=$(vhcli project account-token \
  --customer-project-id=<项目ID> \
  --account-id=<广告主ID> \
  --format=json | jq -r .access_token)

ttcli --token="$TOKEN" --advertiser-id=<广告主ID> auth show

或持久化凭据,后续无需每次传入:

ttcli auth set --token="$TOKEN" --advertiser-id=<广告主ID>

国内用户:访问 TikTok API 需要代理。运行命令前设置 HTTPS_PROXY=http://127.0.0.1:7897(或本机代理端口)。

使用方式

ttcli [命令] [参数]

全局参数:
  --advertiser-id string   广告主 ID(覆盖环境变量 / 配置文件)
  --token string           访问令牌(覆盖环境变量 / 配置文件)
  --human                  人类可读输出(默认为 JSON)

默认输出 JSON,适合管道传递和 AI Agent 调用。加 --human 切换为易读文本。

命令列表

| 命令 | 说明 | |---|---| | advertiser | 账户余额、流水、预算 | | bc | Business Center:账户、余额、支付组合 | | campaign-label | 广告系列标签 | | creative | DM 广告创意素材 | | file | 广告素材库(视频、图片上传) | | identity | 广告发布身份(Spark Ads) | | minis | TikTok 小游戏 / 短剧 | | optimizer | 自动化规则 | | report | 异步报表任务 | | smart-plus | Smart+ 广告系列 | | targeting | 兴趣/行为/话题标签分类 | | tool | 工具集:地域、出价、设备、时区、URL 检测等 | | tt-video | 授权用于 Spark Ads 的 TikTok 视频 | | user | 营销 API 用户信息 | | auth | 管理凭据 | | schema | 输出完整命令树(JSON) |

# 查看所有命令
ttcli --help
ttcli <命令> --help

# 输出完整命令树(供 AI Agent 使用)
ttcli schema | jq '.subcommands[] | {path, short}'

License

MIT