Skip to main content
The discovery commands are currently in planning/development. The CLI entry point references these commands, but the implementation modules do not yet exist in the codebase.

Overview

The discovery command group is planned to provide CLI access to the automated creator discovery pipeline. This will enable developers to trigger discovery jobs, monitor pipeline status, and manage discovery queues from the command line.

Planned Commands

Start Discovery Pipeline

# Planned: Start the discovery pipeline
tiktok-miner discovery start [options]
Options:
  • --mode <auto|manual> - Discovery mode
  • --platform <platform> - Target platform
  • --keywords <keywords> - Discovery keywords
  • --concurrency <number> - Concurrent jobs

Stop Discovery Pipeline

# Planned: Stop the running pipeline
tiktok-miner discovery stop [options]

Pipeline Status

# Planned: Check pipeline status
tiktok-miner discovery status
# Planned: Discover creators from trending topics
tiktok-miner discovery trending [options]
Options:
  • --topic <topic> - Specific trending topic
  • --platform <platform> - Target platform
  • --limit <number> - Maximum creators to discover

Category Exploration

# Planned: Explore creators by category
tiktok-miner discovery explore <category> [options]
Options:
  • --platforms <platforms> - Comma-separated platform list
  • --limit <number> - Creators per platform

Queue Management

# Planned: View discovery queue status
tiktok-miner discovery queue [options]
Options:
  • --status <pending|processing|completed|failed> - Filter by status
  • --priority <high|normal|low> - Filter by priority

Current Workaround

While CLI discovery commands are being implemented, you can:

Use the Web Interface

Navigate to /scraper (Finder page) in the web application to:
  • Enter keywords for creator discovery
  • Run the TikTok pipeline
  • Monitor real-time progress
  • View and manage results

Access Discovery Pipeline via Code

The discovery pipeline is available as a library:
import { DiscoveryPipeline } from '@/lib/discovery/discovery-pipeline';
import { PrismaClient } from '@prisma/client';

const prisma = new PrismaClient();
const pipeline = new DiscoveryPipeline(prisma);

// Start the pipeline
await pipeline.start();

// Get pipeline status
const status = await pipeline.getStatus();
console.log(status);

Query Discovery Data via SQL

bun cli/index.ts query-db "
SELECT 
  id,
  username,
  \"followerCount\",
  \"engagementRate\",
  \"discoveredAt\"
FROM \"TiktokProfile\"
WHERE \"discoveredAt\" > NOW() - INTERVAL '7 days'
ORDER BY \"discoveredAt\" DESC
LIMIT 50
"

Discovery Pipeline Architecture

The discovery pipeline consists of three main stages:
  1. Discovery: Find creators from trending topics, categories, or keywords
  2. Evaluation: Score creators based on engagement and quality metrics
  3. Aggregation: Collect detailed metrics and historical data
See the Discovery Pipeline documentation for detailed architecture information.

Discovery Pipeline

Architecture and implementation details

Keyword Search

Web interface for discovery

Creator Discovery

Automated discovery features

Database Commands

Query discovery results

Implementation Status

Track the implementation of discovery CLI commands in the GitHub repository. Priority features:
  • Pipeline start/stop controls
  • Real-time status monitoring
  • Queue management
  • Trending topic discovery
  • Category exploration
  • Report generation

Contributing

Contributions are welcome! The discovery commands would be implemented in:
app/cli/commands/discovery/
├── start.ts
├── stop.ts
├── status.ts
├── trending.ts
├── explore.ts
├── queue.ts
└── index.ts
See the repository for contribution guidelines and architecture documentation.

Build docs developers (and LLMs) love