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

@dimension-studios/ttk-proxy

v1.99.0

Published

CLI tool for TikTok proxy API

Readme

@dimension-studios/ttk-proxy

CLI tool for TikTok Proxy API - A simple command-line interface to interact with the TikTok proxy service.

Installation

npm install -g @dimension-studios/ttk-proxy

Configuration

The CLI uses conf to store your API credentials. You can configure it in two ways:

1. Using Environment Variables (Recommended)

Set the following environment variables:

export TTK_FETCH_API_URL="https://your-api-url.com"
export TTK_FETCH_API_KEY="your-api-key"
export TTK_FETCH_API_SECRET="your-api-secret"

Then run the config command to save them:

ttk-proxy config

2. Using the CLI

ttk-proxy config:set apiUrl "https://your-api-url.com"
ttk-proxy config:set apiKey "your-api-key"
ttk-proxy config:set apiSecret "your-api-secret"

View Current Configuration

ttk-proxy config --show

Clear Configuration

ttk-proxy config --clear

Usage

Call the TikTok Proxy API

Make a call to the TikTok proxy API with a JSON body:

ttk-proxy call '{"shopId":"your-shop-id","url":"https://api.tiktok.com/endpoint","method":"GET"}'

Example with more complex body:

ttk-proxy call '{
  "shopId": "shop-123",
  "url": "https://api.tiktok.com/v1/shops/products",
  "method": "GET",
  "headers": {
    "Content-Type": "application/json"
  },
  "unofficialApi": {
    "addCookieToHeaders": true,
    "signUrl": true
  }
}'

Base64 Support

You can also pass the JSON body as a base64-encoded string. The CLI will automatically detect and decode it:

# First encode your JSON to base64
echo -n '{"shopId":"shop-123","url":"https://api.tiktok.com/endpoint","method":"GET"}' | base64

# Then pass it directly to the CLI
ttk-proxy call "eyJzaG9wSWQiOiJzaG9wLTEyMyIsInVybCI6Imh0dHBzOi8vYXBpLnRpa3Rvay5jb20vZW5kcG9pbnQiLCJtZXRob2QiOiJHRVQifQ=="

This is useful when copying request bodies from logs or other sources where the JSON is already base64-encoded.

List TikTok Proxy Tokens

List all available TikTok proxy tokens:

ttk-proxy list

Output

The CLI provides beautiful, color-coded output using @rharkor/logger:

  • ✅ Success messages in green
  • ❌ Error messages in red
  • ℹ️ Info messages in blue
  • ⚠️ Warning messages in yellow

Example output:

🚀 Calling TikTok Proxy API...
✅ Status: 200 OK

📦 Response:
{
  "code": 0,
  "data": {
    "products": [...]
  },
  "message": "success"
}

API Reference

Commands

ttk-proxy call <body>

Call the TikTok proxy API with a JSON body.

  • Arguments:
    • body (string): Stringified JSON body for the request (can be raw JSON or base64-encoded JSON)

ttk-proxy list

List all TikTok proxy tokens.

ttk-proxy config [options]

Manage configuration.

  • Options:
    • -s, --show: Show current configuration
    • -c, --clear: Clear all configuration

ttk-proxy config:set <key> <value>

Set a configuration value.

  • Arguments:
    • key (string): Configuration key (apiUrl, apiKey, or apiSecret)
    • value (string): Configuration value

Development

Setup

# Install dependencies
npm install

# Build the package
npm run build

# Run type checking
npm run type-check

# Development mode (watch)
npm run dev

Testing Locally

# Link the package globally
npm link

# Now you can use ttk-proxy command
ttk-proxy --help

License

ISC

Author

Dimension Studios

Support

For issues and questions, please open an issue on the GitHub repository.