### Install and Run Project Dependencies
Source: https://github.com/ttlequals0/minuspod/blob/main/frontend/README.md
Use these npm commands to install dependencies, start the development server, build for production, and run the linter.
```bash
npm install
```
```bash
npm run dev
```
```bash
npm run build
```
```bash
npm run lint
```
--------------------------------
### Clone Repository and Start Container
Source: https://github.com/ttlequals0/minuspod/blob/main/docs/DEPLOYMENT.md
Follow these steps to clone the repository, set up the environment, and start the application container.
```bash
# Clone repository
git clone https://github.com/ttlequals0/minuspod.git
cd minuspod
# Create .env file
echo "ANTHROPIC_API_KEY=your-key-here" > .env
# Start container
docker-compose up -d
# View logs
docker logs -f minuspod
```
--------------------------------
### Setup whisper.cpp as a Transcription Server
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Clones whisper.cpp, downloads a model, and starts it as a separate server for GPU-accelerated transcription. The API base URL should then be set to http://whisper-server:8765/v1.
```bash
git clone --depth 1 https://github.com/ggml-org/whisper.cpp
bash whisper.cpp/models/download-ggml-model.sh large-v3-turbo
mkdir -p models && mv whisper.cpp/models/ggml-large-v3-turbo.bin models/
docker compose -f docker-compose.whisper.yml up -d
```
--------------------------------
### Configure OpenRouter API Key and Start
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Set up the OpenRouter API key in a .env file and start the service using Docker Compose.
```bash
# Create .env
echo "OPENROUTER_API_KEY=sk-or-v1-your-key-here" > .env
# Start
docker compose -f docker-compose.openrouter.yml up -d
```
--------------------------------
### Add OpenRouter to Existing Setup
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Configure environment variables to use OpenRouter as the LLM provider in an existing setup.
```bash
LLM_PROVIDER=openrouter
OPENROUTER_API_KEY=sk-or-v1-your-key-here
```
--------------------------------
### Start whisper.cpp Docker Server
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Starts the whisper.cpp transcription server using Docker Compose. Ensure the docker-compose.whisper.yml file is present in the current directory.
```bash
docker compose -f docker-compose.whisper.yml up -d
```
--------------------------------
### Docker Compose Setup with Ollama
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Docker Compose setup for MinusPod using a local LLM via Ollama. Requires OPENAI_BASE_URL and OPENAI_MODEL to be configured.
```bash
cat > .env << 'EOF' \
LLM_PROVIDER=ollama \
OPENAI_BASE_URL=http://host.docker.internal:11434/v1 \
OPENAI_MODEL=qwen3:14b \
BASE_URL=http://localhost:8000 \
APP_PASSWORD=your-password-here \
EOF
```
--------------------------------
### Start Claude Code Wrapper Service
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Use this command to start the Claude Code Wrapper service using Docker Compose. Ensure Docker and Docker Compose are installed.
```bash
docker compose --profile wrapper up -d
```
--------------------------------
### Get All Settings
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieves all current runtime configuration settings.
```APIDOC
## GET /api/v1/settings
### Description
Retrieves all current runtime configuration settings, including LLM provider, models, and other parameters.
### Method
GET
### Endpoint
/api/v1/settings
### Response
#### Success Response (200)
(No specific response schema provided in source)
#### Response Example
(No example provided in source)
```
--------------------------------
### Pushover Webhook Configuration Example
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Example selectors for configuring Pushover to extract data from MinusPod's default JSON payload. Pushover evaluates these selectors on its side.
```text
Title | `{{podcast.name}} - {{event}}`
Body | `{{episode.title}}`
`{{episode.ads_removed}} ads removed. Saved {{episode.time_saved}}. Cost {{episode.llm_cost_display}}`
URL | `{{episode.url}}`
URL Title | `Open in MinusPod`
```
--------------------------------
### Docker Compose Setup with Anthropic Claude
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Minimal Docker Compose setup for MinusPod using Anthropic Claude for LLM processing. Requires an ANTHROPIC_API_KEY and APP_PASSWORD.
```bash
cat > .env << 'EOF' \
ANTHROPIC_API_KEY=sk-ant-your-key \
BASE_URL=http://localhost:8000 \
APP_PASSWORD=your-password-here \
MINUSPOD_MASTER_PASSPHRASE=long-random-string-keep-safe \
EOF
mkdir -p data
docker-compose up -d
```
--------------------------------
### Example .env for OpenAI-compatible Mode
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
This example shows how to configure Minuspod to use any OpenAI-compatible LLM endpoint, including the Claude Code Wrapper. The AI model itself is selected in the Minuspod Settings UI.
```dotenv
# LLM Configuration (OpenAI-compatible)
LLM_PROVIDER=openai-compatible
OPENAI_BASE_URL=http://claude-wrapper:8000/v1
OPENAI_API_KEY=not-needed
# Server Configuration
BASE_URL=http://localhost:8000
```
--------------------------------
### Get All Current Settings
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Fetch all current runtime configuration settings for the application. This includes LLM providers, models, and other operational parameters.
```bash
curl -b cookies.txt http://localhost:8000/api/v1/settings
```
--------------------------------
### Authenticate Claude Wrapper
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Run this command to authenticate the Claude wrapper with your Claude account. This is a one-time setup step.
```bash
docker compose --profile wrapper run --rm claude-wrapper claude auth login
```
--------------------------------
### Start Application with Cloudflare Tunnel
Source: https://github.com/ttlequals0/minuspod/blob/main/docs/DEPLOYMENT.md
Configure and start the application using a Cloudflare Tunnel profile for remote access without port forwarding. Ensure the tunnel token is set in the .env file.
```bash
# Set tunnel token in .env
TUNNEL_TOKEN=your-cloudflare-tunnel-token
# Start with tunnel profile
docker-compose --profile tunnel up -d
```
--------------------------------
### Docker Compose Setup with Remote Whisper API
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Docker Compose setup for MinusPod using a remote Whisper API for transcription. Requires API keys and base URL for the Whisper service.
```bash
cat > .env << 'EOF' \
ANTHROPIC_API_KEY=sk-ant-your-key \
WHISPER_BACKEND=openai-api \
WHISPER_API_BASE_URL=https://api.groq.com/openai/v1 \
WHISPER_API_KEY=gsk_your-groq-key \
WHISPER_API_MODEL=whisper-large-v3-turbo \
WHISPER_DEVICE=cpu \
BASE_URL=http://localhost:8000 \
EOF
```
--------------------------------
### Get All Model Pricing Rates
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieves a list of all known model pricing rates. Requires authentication via cookies.txt.
```bash
curl -b cookies.txt http://localhost:8000/api/v1/system/model-pricing
```
--------------------------------
### Configure Audio Analysis Module
Source: https://github.com/ttlequals0/minuspod/blob/main/CHANGELOG.md
Example of enabling and configuring various audio analysis components via database settings. These settings control loudness, music, and speaker detection.
```json
{
"audio_analysis_enabled": true,
"volume_analysis_enabled": true,
"music_detection_enabled": true,
"speaker_analysis_enabled": true,
"volume_threshold_db": -15.0,
"music_confidence_threshold": 0.7,
"monologue_duration_threshold": 45.0
}
```
--------------------------------
### Data Fetching with TanStack Query
Source: https://github.com/ttlequals0/minuspod/blob/main/frontend/README.md
Example of using TanStack Query's `useQuery` hook for fetching data. Ensure `fetchFeeds` is correctly implemented and imported.
```tsx
const { data, isLoading, error } = useQuery({
queryKey: ['feeds'],
queryFn: () => fetchFeeds(),
staleTime: 30000, // 30 seconds
});
```
--------------------------------
### Get System Status
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieves system status information such as uptime, version, feed/episode counts, and storage usage.
```bash
curl -b cookies.txt http://localhost:8000/api/v1/system/status
```
--------------------------------
### Tailwind CSS Dark Mode Implementation
Source: https://github.com/ttlequals0/minuspod/blob/main/frontend/README.md
Example of applying dark mode styles using Tailwind CSS. Ensure dark mode is configured in your Tailwind setup.
```tsx
Content
```
--------------------------------
### Cloudflare WAF Rule Example
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
This rule allows Pocket Casts on the feed host while blocking admin paths. Adjust the User-Agent pattern for your specific application.
```regex
(http.request.full_uri wildcard r"http*://feed.example.com/*" and not http.user_agent wildcard "*Pocket*Casts*") or starts_with(http.request.uri.path, "/ui") or starts_with(http.request.uri.path, "/api")
```
--------------------------------
### Get Episode Transcript
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieves the transcript for a specific episode. Requires cookies.
```bash
curl -b cookies.txt http://localhost:8000/api/v1/feeds/my-podcast/episodes/abc123/transcript
```
--------------------------------
### Get Episode Detail
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Fetches detailed information for a specific episode, including ad markers and confidence scores. Requires cookies.
```bash
curl -b cookies.txt http://localhost:8000/api/v1/feeds/my-podcast/episodes/abc123
```
--------------------------------
### Get Model Pricing
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieves the pricing rates for all known LLM models.
```APIDOC
## GET /api/v1/system/model-pricing
### Description
Retrieves the current pricing rates for all supported LLM models.
### Method
GET
### Endpoint
/api/v1/system/model-pricing
### Response Example
(Schema not provided in source, but expected to contain model identifiers and their associated costs)
```
--------------------------------
### Get Available LLM Models
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieve a list of LLM models available from the currently configured provider. Useful for selecting models during configuration.
```bash
curl -b cookies.txt http://localhost:8000/api/v1/settings/models
```
--------------------------------
### Update Ad Detection Settings (Anthropic)
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Modify ad detection configurations, including LLM provider, specific models, confidence thresholds, and prompts. This example uses Anthropic models.
```bash
curl -b cookies.txt -X PUT http://localhost:8000/api/v1/settings/ad-detection \
-H "Content-Type: application/json" \
-H "X-CSRF-Token: $CSRF" \
-d '{
"llmProvider": "anthropic",
"claudeModel": "claude-sonnet-4-5-20250929",
"verificationModel": "claude-haiku-4-5-20251001",
"chaptersModel": "claude-haiku-4-5-20251001",
"whisperModel": "small",
"whisperBackend": "local",
"whisperLanguage": "en",
"minCutConfidence": 0.80,
"autoProcessEnabled": true
}'
```
--------------------------------
### Safe HTTP GET Request
Source: https://github.com/ttlequals0/minuspod/blob/main/CHANGELOG.md
Python function to perform a safe HTTP GET request with configurable trust tiers and redirect handling. Uses read_response_capped to limit response size.
```python
class TrustTier(enum.Enum):
OPERATOR_CONFIGURED = 1
FEED_CONTENT = 2
class RedirectContext(enum.Enum):
NONE = 0
FOLLOWED = 1
DISALLOWED = 2
def safe_get(url: str, trust_tier: TrustTier, max_bytes: int = 1024 * 1024) -> FetchResult:
"""Performs a safe GET request to the given URL.
Respects trust_tier and limits response size with max_bytes.
"""
try:
with httpx.Client(follow_redirects=True, max_redirects=5) as client:
response = client.get(url)
response.raise_for_status() # Raise an exception for bad status codes
return read_response_capped(response, max_bytes)
except httpx.HTTPStatusError as e:
# Handle HTTP errors
return FetchResult(e.response.status_code, dict(e.response.headers), b'')
except httpx.RequestError as e:
# Handle request errors (e.g., network issues)
return FetchResult(503, {}, f"Request error: {e}".encode())
except ResponseTooLargeError as e:
# Handle response too large error
return FetchResult(413, {}, str(e).encode())
```
--------------------------------
### Run MinusPod with Docker Compose
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Starts the MinusPod application in detached mode using Docker Compose. Access the web UI at http://localhost:8000/ui/ after the containers are running.
```bash
docker-compose up -d
```
--------------------------------
### Get Available LLM Models
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieves a list of LLM models available from the currently configured provider.
```APIDOC
## GET /api/v1/settings/models
### Description
Fetches a list of LLM models that are compatible with the currently configured LLM provider.
### Method
GET
### Endpoint
/api/v1/settings/models
### Response
#### Success Response (200)
(No specific response schema provided in source)
#### Response Example
(No example provided in source)
```
--------------------------------
### Pull Ollama Model
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Use this command to download a specific model to your local Ollama instance. Ensure Ollama is installed and running.
```bash
ollama pull qwen3:14b
```
--------------------------------
### Get Original Transcript
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieves the original, pre-cut transcript for an episode, showing the exact text that was removed. Requires cookies.
```bash
curl -b cookies.txt http://localhost:8000/api/v1/feeds/my-podcast/episodes/abc123/original-transcript
```
--------------------------------
### Liveness Probe Endpoint
Source: https://github.com/ttlequals0/minuspod/blob/main/CHANGELOG.md
Defines the GET /api/v1/health/live endpoint for liveness checks. Returns a simple status ok.
```python
from flask import Blueprint, jsonify
health_bp = Blueprint('health', __name__)
@health_bp.route('/health/live', methods=['GET'])
def liveness_probe():
"""Liveness probe endpoint. Returns 200 OK."""
return jsonify({"status": "ok"}), 200
```
--------------------------------
### Set HuggingFace Token in Docker Compose
Source: https://github.com/ttlequals0/minuspod/blob/main/CHANGELOG.md
Example of how to set the HF_TOKEN environment variable in docker-compose.yml for HuggingFace authentication, required for speaker diarization.
```yaml
services:
app:
build: .
environment:
- HF_TOKEN=YOUR_HUGGINGFACE_TOKEN_HERE
ports:
- "8000:8000"
volumes:
- ./data:/app/data
```
--------------------------------
### Create Environment File and Data Directory
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Sets up the necessary environment variables and creates a data directory for the application. Ensure to replace 'your-key-here' and 'long-random-string-you-will-not-lose' with your actual credentials and passphrase.
```bash
cat > .env << EOF
ANTHROPIC_API_KEY=your-key-here
BASE_URL=http://localhost:8000
APP_PASSWORD=your-password
MINUSPOD_MASTER_PASSPHRASE=long-random-string-you-will-not-lose
EOF
mkdir -p data
```
--------------------------------
### Enable legacy peer dependency resolution in npmrc
Source: https://github.com/ttlequals0/minuspod/blob/main/CHANGELOG.md
This .npmrc file sets the `legacy-peer-deps` flag to `true`. This is a temporary workaround to allow installations with older versions of `vite-plugin-pwa` that have stricter peer dependency requirements with Vite 8.
```ini
legacy-peer-deps=true
# Remove this flag once vite-plugin-pwa publishes vite 8 support.
```
--------------------------------
### System Status Endpoint
Source: https://github.com/ttlequals0/minuspod/blob/main/CHANGELOG.md
Defines the GET /api/v1/system/status endpoint, reporting system security status including crypto readiness and plaintext secret count.
```python
from flask import Blueprint, jsonify, current_app
import sqlite3
system_bp = Blueprint('system', __name__)
@system_bp.route('/system/status', methods=['GET'])
def system_status():
"""Returns system status, including security information."""
# Assume db_conn is available, e.g., via current_app context
db_conn = current_app.config['DB_CONN']
crypto_ready = check_crypto_readiness(db_conn) # Placeholder for actual check
plaintext_count = count_plaintext_secrets(db_conn) # Uses the function defined earlier
return jsonify({
"status": "ok",
"security": {
"cryptoReady": crypto_ready,
"plaintextSecretsCount": plaintext_count
}
})
def check_crypto_readiness(db_conn):
# Placeholder implementation
return True
```
--------------------------------
### Get Processing Status
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Performs a one-shot poll to get the current real-time processing status.
```APIDOC
## GET /api/v1/status
### Description
Retrieves the current processing status of the system, including whether processing is active, the current episode, stage, progress, and queue depth.
### Method
GET
### Endpoint
/api/v1/status
### Response
#### Success Response (200)
- **processing** (boolean) - Indicates if processing is currently active.
- **episode** (object | null) - Information about the currently processing episode, or null if none.
- **title** (string) - The title of the episode.
- **slug** (string) - The slug of the podcast.
- **episodeId** (string) - The unique ID of the episode.
- **stage** (string | null) - The current processing stage (e.g., "Detecting Ads").
- **progress** (integer) - The percentage of progress for the current stage (0-100).
- **queueDepth** (integer) - The number of items waiting in the processing queue.
#### Response Example
```json
{
"processing": true,
"episode": {
"title": "Ep 42: The Answer",
"slug": "my-podcast",
"episodeId": "abc123"
},
"stage": "Detecting Ads",
"progress": 45,
"queueDepth": 2
}
```
```
--------------------------------
### Build Project for Production
Source: https://github.com/ttlequals0/minuspod/blob/main/frontend/README.md
Command to initiate the production build process. The output will be placed in the `../static/ui/` directory.
```bash
npm run build
```
--------------------------------
### Reprocess Episode (Default)
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Triggers reprocessing of a specific episode using the default mode (pattern DB + LLM). Returns HTTP 503 with Retry-After header if processing starts. Requires CSRF token.
```bash
curl -b cookies.txt -X POST \
http://localhost:8000/api/v1/episodes/my-podcast/abc123/reprocess \
-H "Content-Type: application/json" \
-H "X-CSRF-Token: $CSRF" \
-d '{"mode":"reprocess"}'
```
--------------------------------
### Get Contaminated Patterns
Source: https://github.com/ttlequals0/minuspod/blob/main/CHANGELOG.md
Retrieves a list of all active patterns that are contaminated, meaning they contain multiple ad transition phrases. This endpoint is useful for identifying merged multi-sponsor ads that require splitting.
```APIDOC
## GET /patterns/contaminated
### Description
This endpoint retrieves all active patterns that contain multiple ad transition phrases, indicating merged multi-sponsor ads that should be split. The response includes pattern IDs, sponsors, text lengths, and transition counts.
### Method
GET
### Endpoint
/patterns/contaminated
### Response
#### Success Response (200)
- **pattern_id** (integer) - The unique identifier for the pattern.
- **sponsors** (array of strings) - A list of sponsor names associated with the pattern.
- **text_length** (integer) - The total length of the pattern's text.
- **transition_count** (integer) - The number of ad transition phrases detected within the pattern.
### Response Example
{
"patterns": [
{
"pattern_id": 123,
"sponsors": ["Sponsor A", "Sponsor B"],
"text_length": 500,
"transition_count": 3
},
{
"pattern_id": 456,
"sponsors": ["Sponsor C", "Sponsor D", "Sponsor E"],
"text_length": 750,
"transition_count": 5
}
]
}
```
--------------------------------
### Get Auto-Process Queue Status
Source: https://github.com/ttlequals0/minuspod/blob/main/CHANGELOG.md
Retrieves the current status of the auto-process queue. This endpoint provides information about the queue's state, such as the number of pending items and whether processing is currently enabled.
```APIDOC
## GET /system/queue
### Description
Retrieves the status of the auto-process queue.
### Method
GET
### Endpoint
/system/queue
### Response
#### Success Response (200)
- **totalPages** (integer) - The total number of pages available for the queue items.
- **autoProcessEnabled** (boolean) - Indicates if the auto-process feature is globally enabled.
- **autoProcessOverride** (string) - The auto-process override setting for the specific feed.
```
--------------------------------
### Build and Run whisper.cpp on Apple Silicon
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Build the whisper.cpp server natively on Apple Silicon and configure MinusPod to connect to it. The WHISPER_API_BASE_URL uses host.docker.internal for Docker-to-host communication.
```bash
# Download model
git clone --depth 1 https://github.com/ggml-org/whisper.cpp
bash whisper.cpp/models/download-ggml-model.sh large-v3-turbo
# Build and run the server
cd whisper.cpp && make -j
./build/bin/whisper-server \
--host 0.0.0.0 --port 8765 \
--model models/ggml-large-v3-turbo.bin \
--inference-path /v1/audio/transcriptions \
--dtw large.v3.turbo
# Configure MinusPod
WHISPER_BACKEND=openai-api
WHISPER_API_BASE_URL=http://host.docker.internal:8765/v1
WHISPER_DEVICE=cpu
```
--------------------------------
### Restore from Backup
Source: https://github.com/ttlequals0/minuspod/blob/main/docs/DEPLOYMENT.md
Restore the application's database from a backup file by stopping the container, copying the backup, and restarting the container.
```bash
# Stop container
docker-compose stop
# Restore database
cp data/backups/podcast_YYYYMMDD_HHMMSS.db data/podcast.db
# Restart
docker-compose start
```
--------------------------------
### Import OPML
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Imports podcast subscriptions from an OPML file. The file is uploaded as form data. Returns counts of imported, skipped, and failed feeds.
```bash
curl -b cookies.txt -X POST http://localhost:8000/api/v1/feeds/import-opml \
-H "X-CSRF-Token: $CSRF" \
-F "opml=@/path/to/subscriptions.opml"
```
--------------------------------
### List Webhooks
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Lists all configured webhooks. Requires authentication via cookies.txt.
```bash
curl -b cookies.txt http://localhost:8000/api/v1/settings/webhooks
```
--------------------------------
### Project Structure Overview
Source: https://github.com/ttlequals0/minuspod/blob/main/frontend/README.md
An overview of the frontend project's directory structure, highlighting key directories like api, components, context, hooks, and pages.
```tree
src/
├── api/ # API client and types
│ ├── auth.ts # Authentication endpoints
│ ├── client.ts # Base fetch API wrapper
│ ├── feeds.ts # Feed/episode endpoints
│ ├── history.ts # History endpoints
│ ├── patterns.ts # Pattern endpoints
│ ├── search.ts # Search endpoints
│ ├── settings.ts # Settings endpoints
│ ├── sponsors.ts # Sponsor endpoints
│ └── types.ts # TypeScript interfaces
├── components/ # Reusable components
│ ├── EpisodeList.tsx
│ ├── FeedCard.tsx
│ ├── FeedListItem.tsx
│ ├── GlobalStatusBar.tsx
│ ├── Layout.tsx
│ ├── LoadingSpinner.tsx
│ ├── PatternDetailModal.tsx
│ └── AdEditor.tsx
├── context/ # React contexts
│ ├── AuthContext.tsx
│ └── ThemeContext.tsx
├── hooks/ # Custom hooks
│ └── useTranscriptKeyboard.ts
├── pages/ # Route pages
│ ├── AddFeed.tsx
│ ├── Dashboard.tsx
│ ├── EpisodeDetail.tsx
│ ├── FeedDetail.tsx
│ ├── HistoryPage.tsx
│ ├── Login.tsx
│ ├── PatternsPage.tsx
│ ├── Search.tsx
│ └── Settings.tsx
├── App.tsx # Route configuration
├── main.tsx # Entry point
└── index.css # Global styles
```
--------------------------------
### Configure Minuspod to Use Claude Wrapper
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Update your .env file to point Minuspod to the Claude wrapper service. This involves setting the LLM provider and the OpenAI compatible base URL.
```bash
LLM_PROVIDER=openai-compatible
OPENAI_BASE_URL=http://claude-wrapper:8000/v1
OPENAI_API_KEY=not-needed
```
--------------------------------
### Get LLM Token Usage
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieves cumulative LLM token consumption and estimated costs, with a per-model breakdown.
```APIDOC
## GET /api/v1/system/token-usage
### Description
Fetches the total LLM token usage and associated costs, including a detailed breakdown by model.
### Method
GET
### Endpoint
/api/v1/system/token-usage
### Response Example
```json
{
"totalInputTokens": 2841023,
"totalOutputTokens": 312487,
"totalCost": 4.82,
"models": [
{
"modelId": "claude-sonnet-4-5-20250929",
"callCount": 284,
"totalInputTokens": 2641023,
"totalCost": 4.61
}
]
}
```
```
--------------------------------
### Manage Application Logs
Source: https://github.com/ttlequals0/minuspod/blob/main/docs/DEPLOYMENT.md
View and follow application logs using Docker commands. Options include viewing all logs, following in real-time, or displaying the last N lines.
```bash
# View all logs
docker logs minuspod
# Follow logs
docker logs -f minuspod
# Last 100 lines
docker logs --tail 100 minuspod
```
--------------------------------
### Perform Manual Backup
Source: https://github.com/ttlequals0/minuspod/blob/main/docs/DEPLOYMENT.md
Manually back up the application data by stopping the container, archiving the data directory, and then restarting the container.
```bash
# Stop container
docker-compose stop
# Backup data directory
tar -czvf podcast-backup-$(date +%Y%m%d).tar.gz data/
# Restart
docker-compose start
```
--------------------------------
### Get Processing History
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieves paginated processing history, which can be filtered by status and podcast slug, and sorted by processing time.
```APIDOC
## GET /api/v1/history
### Description
Fetches a paginated list of past processing jobs, with options to filter by completion status, podcast, and sort order.
### Method
GET
### Endpoint
/api/v1/history
### Query Parameters
- **status** (string) - Optional - Filter history by processing status (e.g., "completed").
- **podcast_slug** (string) - Optional - Filter history by podcast slug.
- **limit** (integer) - Optional - The maximum number of items to return per page (default 50).
- **page** (integer) - Optional - The page number to retrieve (default 1).
- **sort_by** (string) - Optional - The field to sort the results by (e.g., "processed_at").
- **sort_dir** (string) - Optional - The direction of sorting ("asc" or "desc", default "desc").
### Response
#### Success Response (200)
- **history** (array) - A list of processing job objects.
- **id** (integer) - Unique identifier for the job.
- **podcastTitle** (string) - Title of the podcast.
- **episodeTitle** (string) - Title of the episode.
- **status** (string) - Completion status of the job.
- **adsDetected** (integer) - Number of ads detected.
- **processingDurationSeconds** (number) - Duration of processing in seconds.
- ... (other fields may be present)
- **total** (integer) - The total number of processing jobs matching the criteria.
- **totalPages** (integer) - The total number of pages available.
#### Response Example
```json
{
"history": [
{
"id": 1,
"podcastTitle": "My Podcast",
"episodeTitle": "Ep 42",
"status": "completed",
"adsDetected": 3,
"processingDurationSeconds": 42.5
}
],
"total": 38,
"totalPages": 1
}
```
```
--------------------------------
### Get Ad Pattern Health
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Check the health of ad patterns, identifying issues like oversized or contaminated patterns.
```bash
# Get pattern health (oversized/contaminated patterns)
curl -b cookies.txt http://localhost:8000/api/v1/patterns/health
```
--------------------------------
### List Sponsor Normalization Rules
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieve all currently configured sponsor normalization rules. This is useful for auditing or understanding existing patterns.
```bash
curl -b cookies.txt http://localhost:8000/api/v1/sponsors/normalizations
```
--------------------------------
### Update Dockerfile for Image Optimization
Source: https://github.com/ttlequals0/minuspod/blob/main/CHANGELOG.md
Illustrates Dockerfile optimizations including pre-installing PyTorch with specific CUDA builds, using `--no-install-recommends`, and cleaning caches.
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
python3-pip \
python3-dev \
build-essential \
libsndfile1 \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir --upgrade pip
# Pre-install PyTorch with specific CUDA build
RUN pip install --no-cache-dir torch==2.8.0+cu124 torchaudio==2.8.0+cu124 \
&& pip install --no-cache-dir pyannote.audio>=3.1.0,<4.0.0 \
&& pip install --no-cache-dir librosa soundfile
# Clean up pip cache and pycache
RUN rm -rf /root/.cache/pip && find /app/src -type d -name '__pycache__' -exec rm -rf {} +
# Remove unused packages
RUN apt-get purge -y wget && apt-get autoremove -y && apt-get clean
```
--------------------------------
### Get Ad Pattern Statistics
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieve statistics for ad patterns, including total counts, active/inactive status, and breakdown by scope.
```bash
# Get pattern statistics
curl -b cookies.txt http://localhost:8000/api/v1/patterns/stats
```
--------------------------------
### Preview Models for a Different Provider
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Query available models for a provider without changing the current settings. Use the `provider` query parameter to specify the target provider.
```bash
curl -b cookies.txt "http://localhost:8000/api/v1/settings/models?provider=openrouter"
```
--------------------------------
### Configure MinusPod for Groq API
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Configure MinusPod to use Groq's cloud-based Whisper transcription service. Requires API key and specifies the model to use.
```bash
WHISPER_BACKEND=openai-api
WHISPER_API_BASE_URL=https://api.groq.com/openai/v1
WHISPER_API_KEY=gsk_your_key_here
WHISPER_API_MODEL=whisper-large-v3-turbo
WHISPER_DEVICE=cpu
```
--------------------------------
### Update Application Image and Container
Source: https://github.com/ttlequals0/minuspod/blob/main/docs/DEPLOYMENT.md
Update the application to the latest version by pulling the newest Docker image and recreating the container. Database migrations are handled automatically on startup.
```bash
# Pull latest image
docker pull ttlequals0/minuspod:latest
# Recreate container
docker-compose up -d
# Database migrations run automatically on startup
```
--------------------------------
### Check MinusPod Health Status
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Use the readiness probe to verify database and storage accessibility. A separate liveness probe is available for high-frequency polling.
```bash
# Readiness check
curl http://localhost:8000/api/v1/health
# {"status":"healthy","checks":{"database":true,"storage":true},"version":"2.0.18"}
```
```bash
# Liveness check (no side effects, safe for per-second polling)
curl http://localhost:8000/api/v1/health/live
# {"status":"ok"}
```
--------------------------------
### Configure Audiobookshelf SSRF Whitelist
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Add your MinusPod hostname or IP to Audiobookshelf's SSRF_REQUEST_FILTER_WHITELIST to prevent requests from being blocked. This is a comma-separated list of domains excluded from Audiobookshelf's SSRF filter.
```bash
SSRF_REQUEST_FILTER_WHITELIST=minuspod.local,192.168.1.100
```
--------------------------------
### Get Paginated Processing History
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieve a paginated list of processed episodes. Supports filtering by status and podcast slug, and sorting by processing time.
```bash
curl -b cookies.txt \
"http://localhost:8000/api/v1/history?status=completed&podcast_slug=my-podcast&limit=50&page=1&sort_by=processed_at&sort_dir=desc"
```
--------------------------------
### Export OPML (Original URLs)
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Exports a list of original source URLs for all podcast feeds. Useful for backups or migrations. Output is saved to a file.
```bash
curl -b cookies.txt \
"http://localhost:8000/api/v1/feeds/export-opml?mode=original" \
-o minuspod-feeds.opml
```
--------------------------------
### Configure Custom Audio Assets
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
To use a custom audio file for ad replacements, place your MP3 in the 'assets' directory and uncomment the volume mount in docker-compose.yml. The container must be restarted after changes.
```yaml
volumes:
- ./data:/app/data
- ./assets:/app/assets:ro # Uncomment this line
```
--------------------------------
### Configure MinusPod for Docker whisper.cpp
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Set environment variables in MinusPod to connect to the locally running whisper.cpp Docker server. WHISPER_DEVICE=cpu is used to prevent MinusPod from attempting local GPU initialization.
```bash
WHISPER_BACKEND=openai-api
WHISPER_API_BASE_URL=http://whisper-server:8765/v1
WHISPER_DEVICE=cpu
```
--------------------------------
### Update Ad Detection Settings (Ollama)
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Switch the LLM provider to Ollama for local model inference. Requires specifying the base URL for the Ollama service.
```bash
curl -b cookies.txt -X PUT http://localhost:8000/api/v1/settings/ad-detection \
-H "Content-Type: application/json" \
-H "X-CSRF-Token: $CSRF" \
-d '{"llmProvider":"ollama","openaiBaseUrl":"http://host.docker.internal:11434/v1","claudeModel":"qwen3:14b"}'
```
--------------------------------
### One-Shot Status Poll
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Make a single request to the status endpoint to get the current processing status, including episode details, stage, progress, and queue depth.
```bash
curl -b cookies.txt http://localhost:8000/api/v1/status
```
--------------------------------
### Manage Ad Pattern Activation
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Toggle a pattern's active status without deleting it. This is useful for temporarily disabling patterns, for example, due to excessive false positives.
```bash
# Toggle a pattern inactive (stops it from matching without deleting)
curl -b cookies.txt -X PUT http://localhost:8000/api/v1/patterns/42 \
-H "Content-Type: application/json" \
-H "X-CSRF-Token: $CSRF" \
-d '{"is_active":false,"disabled_reason":"Too many false positives on show X"}'
```
--------------------------------
### SQL Query for Episode and Podcast Join
Source: https://github.com/ttlequals0/minuspod/blob/main/CHANGELOG.md
Demonstrates fixing SQL queries that incorrectly used a 'slug' column instead of 'podcast_id' for joining episodes with the podcasts table.
```sql
SELECT e.* FROM episodes e JOIN podcasts p ON e.podcast_id = p.id WHERE e.processing_status = 'stuck';
```
--------------------------------
### Check NVIDIA Runtime and GPU Visibility
Source: https://github.com/ttlequals0/minuspod/blob/main/docs/DEPLOYMENT.md
Verify if the Docker environment is configured with the NVIDIA runtime and if the GPU is accessible within the running container.
```bash
# Check NVIDIA runtime
docker info | grep -i nvidia
# Check GPU visibility in container
docker exec minuspod nvidia-smi
```
--------------------------------
### View Current Model Pricing
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Retrieve the current model pricing information from the API.
```bash
curl http://your-server:8000/api/v1/system/model-pricing
```
--------------------------------
### Export OPML (Modified URLs)
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Exports a list of ad-free MinusPod URLs for all podcast feeds, suitable for importing into other podcast applications. Output is saved to a file.
```bash
curl -b cookies.txt \
"http://localhost:8000/api/v1/feeds/export-opml?mode=modified" \
-o minuspod-feeds-modified.opml
```
--------------------------------
### Download whisper.cpp Model
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Clone the whisper.cpp repository and download the large-v3-turbo GGML model. This model is then moved to a local 'models' directory for use with the Dockerized server.
```bash
git clone --depth 1 https://github.com/ggml-org/whisper.cpp
bash whisper.cpp/models/download-ggml-model.sh large-v3-turbo
mkdir -p models && mv whisper.cpp/models/ggml-large-v3-turbo.bin models/
```
--------------------------------
### Get LLM Token Usage
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieves cumulative LLM token usage and estimated cost, with a breakdown per model. Pricing information is refreshed automatically every 24 hours. Requires authentication via cookies.txt.
```bash
curl -b cookies.txt http://localhost:8000/api/v1/system/token-usage
```
--------------------------------
### Export Patterns for Backup
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Use this command to export all patterns to a JSON file before performing a replace import. This creates a round-trip backup.
```bash
curl -b cookies.txt https://your-minuspod/api/v1/patterns/export?include_corrections=true > patterns-backup.json
```
--------------------------------
### Create Webhook
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Creates a new webhook. Supports custom Jinja2 templating for the payload. Requires authentication via cookies.txt and CSRF token. Content-Type must be application/json.
```bash
curl -b cookies.txt -X POST http://localhost:8000/api/v1/settings/webhooks \
-H "Content-Type: application/json" \
-H "X-CSRF-Token: $CSRF" \
-d '{ "url": "https://ntfy.sh/my-topic", "events": ["Episode Processed"], "payloadTemplate": "{\"topic\":\"my-topic\",\"title\":\"{{ podcast.name }} - {{ episode.title }}\",\"message\":\"Removed {{ episode.ads_removed }} ads. Saved {{ episode.time_saved }}. Cost {{ episode.llm_cost_display }}\",\"actions\":[ {\"action\":\"view\",\"label\":\"Open Episode\",\"url\":\"{{ episode.url }}\"}]}' }
```
--------------------------------
### Restart Minuspod Service
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
After configuring Minuspod to use the Claude wrapper, restart the Minuspod service to apply the changes.
```bash
docker compose up -d minuspod
```
--------------------------------
### Auto-Create Patterns for Unmatched Sponsors
Source: https://github.com/ttlequals0/minuspod/blob/main/CHANGELOG.md
Enhances `record_verification_misses` to automatically create podcast-scoped patterns for unmatched sponsors when transcript segments are available. This prevents verification misses from being dropped and ensures that new sponsors are learned.
```python
src/pattern_service.py
```
```python
src/verification_pass.py
```
```python
src/main_app/processing.py
```
--------------------------------
### List Webhooks
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieves a list of all configured webhooks.
```APIDOC
## GET /api/v1/settings/webhooks
### Description
Lists all currently configured webhooks, including their URLs, events they subscribe to, and payload templates.
### Method
GET
### Endpoint
/api/v1/settings/webhooks
### Response Example
(Schema not provided in source, but expected to be an array of webhook configurations)
```
--------------------------------
### Preload Active Pattern Sponsors
Source: https://github.com/ttlequals0/minuspod/blob/main/CHANGELOG.md
Introduces `Database.get_active_pattern_sponsors()` to efficiently preload active pattern sponsors once per call. This optimizes the N-ads-per-episode loop by avoiding per-ad database SELECT statements.
```python
src/database/patterns.py
```
--------------------------------
### Run Individual Local Test
Source: https://github.com/ttlequals0/minuspod/blob/main/smoke/README.md
Execute a single local test script. Ensure the LOCAL_BASE environment variable is set to the local container's address.
```bash
LOCAL_BASE=http://localhost:8001 ./smoke/local/01-health.sh
```
--------------------------------
### Search Podcasts via PodcastIndex.org
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Searches for podcasts using PodcastIndex.org. Requires API credentials to be set in MinusPod's settings. Requires authentication via cookies.txt.
```bash
curl -b cookies.txt "http://localhost:8000/api/v1/podcast-search?q=cortex"
```
--------------------------------
### Download Encrypted Database Backup
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Downloads a SQLite database backup. The backup is encrypted if MINUSPOD_MASTER_PASSPHRASE is set. Requires authentication via cookies.txt.
```bash
curl -b cookies.txt http://localhost:8000/api/v1/system/backup -o backup.db.enc
```
--------------------------------
### Create Webhook
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Creates a new webhook subscription for specified events.
```APIDOC
## POST /api/v1/settings/webhooks
### Description
Creates a new webhook subscription. You can specify the URL, the events to trigger on, and a Jinja2 template for the payload.
### Method
POST
### Endpoint
/api/v1/settings/webhooks
### Headers
- **Content-Type**: application/json
- **X-CSRF-Token**: string - Required - CSRF token for authentication.
### Request Body
- **url** (string) - Required - The URL to send webhook notifications to.
- **events** (array of strings) - Required - A list of events to trigger notifications for (e.g., 'Episode Processed').
- **payloadTemplate** (string) - Optional - A Jinja2 template string for customizing the webhook payload.
### Request Example
```bash
curl -b cookies.txt -X POST http://localhost:8000/api/v1/settings/webhooks \
-H "Content-Type: application/json" \
-H "X-CSRF-Token: $CSRF" \
-d '{
"url": "https://ntfy.sh/my-topic",
"events": ["Episode Processed"],
"payloadTemplate": "{\"topic\":\"my-topic\",\"title\":\"{{ podcast.name }} - {{ episode.title }}\",\"message\":\"Removed {{ episode.ads_removed }} ads. Saved {{ episode.time_saved }}. Cost {{ episode.llm_cost_display }}\"}"
}'
```
```
--------------------------------
### Configure VAD Gap Detection Thresholds
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Adjust VAD gap detection thresholds via environment variables or the API. Raising the mid threshold can prevent aggressive cutting on specific podcasts.
```bash
VAD_GAP_MID_MIN_SECONDS=15
```
--------------------------------
### Check Application Health
Source: https://github.com/ttlequals0/minuspod/blob/main/docs/DEPLOYMENT.md
Use this command to verify if the application is running and its components are healthy. The expected response indicates the status of database, storage, and queue.
```bash
# Check health
curl http://localhost:8000/api/v1/health
# Expected response
{
"status": "healthy",
"checks": {
"database": true,
"storage": true,
"queue_available": true
}
}
```
--------------------------------
### Health Check
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Endpoints to check the readiness and liveness of the MinusPod server. The readiness probe verifies database and storage connectivity, returning 503 if either is down. The liveness probe always returns 200 as long as the process is running.
```APIDOC
## Health Check
### Description
Readiness probe that verifies the database and storage directory are reachable; returns 503 when either is down. A separate liveness probe (`/health/live`) always returns 200 as long as the process is running and is safe for high-frequency polling.
### Readiness Check
```bash
curl http://localhost:8000/api/v1/health
# {"status":"healthy","checks":{"database":true,"storage":true},"version":"2.0.18"}
```
### Liveness Check
```bash
curl http://localhost:8000/api/v1/health/live
# {"status":"ok"}
```
```
--------------------------------
### Absolute Imports with Path Alias
Source: https://github.com/ttlequals0/minuspod/blob/main/frontend/README.md
Illustrates using the `@/` path alias for absolute imports, improving code readability and maintainability. Configure this alias in your build tool (e.g., Vite).
```tsx
import { fetchFeeds } from '@/api/feeds';
import { LoadingSpinner } from '@/components/LoadingSpinner';
```
--------------------------------
### Configure MinusPod for OpenAI Whisper API
Source: https://github.com/ttlequals0/minuspod/blob/main/README.md
Configure MinusPod to use the official OpenAI Whisper API. Requires an API key and specifies the model.
```bash
WHISPER_BACKEND=openai-api
WHISPER_API_BASE_URL=https://api.openai.com/v1
WHISPER_API_KEY=sk-your_key_here
WHISPER_API_MODEL=whisper-1
WHISPER_DEVICE=cpu
```
--------------------------------
### SQLite Online Backup Helper
Source: https://github.com/ttlequals0/minuspod/blob/main/CHANGELOG.md
Python utility for performing online backups of SQLite databases with strict file permissions.
```python
def backup_sqlite_db(db_path: str, backup_path: str):
"""Performs an online backup of the SQLite database to backup_path.
Ensures the backup file has tight file permissions (0o600).
"""
conn = sqlite3.connect(db_path)
try:
conn.execute("BEGIN IMMEDIATE")
backup_conn = sqlite3.connect(backup_path)
conn.backup(backup_conn)
backup_conn.commit()
backup_conn.close()
conn.commit()
# Set strict file permissions for the backup file
os.chmod(backup_path, 0o600)
except sqlite3.Error as e:
conn.rollback()
raise e
finally:
conn.close()
```
--------------------------------
### List Sponsors
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieve a list of all sponsors, including their IDs, names, aliases, and categories. Aliases are used for name normalization.
```bash
# List all sponsors
curl -b cookies.txt http://localhost:8000/api/v1/sponsors
```
--------------------------------
### List Ad Patterns
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieve a list of active ad patterns, optionally filtering by scope (all, network, or podcast). Patterns are organized by scope and used for matching before LLM analysis.
```bash
# List all active patterns
curl -b cookies.txt "http://localhost:8000/api/v1/patterns?scope=all&active_only=true"
```
```bash
# Filter by scope
curl -b cookies.txt "http://localhost:8000/api/v1/patterns?scope=podcast"
```
```bash
curl -b cookies.txt "http://localhost:8000/api/v1/patterns?scope=network"
```
--------------------------------
### Improve Short Sponsor Brand Recognition
Source: https://github.com/ttlequals0/minuspod/blob/main/CHANGELOG.md
Updates `learn_from_detections` Gate B to recognize short sponsor brands if they are in the sponsor registry, have an active pattern, or are in `KNOWN_SHORT_BRANDS`. This prevents real brands like Xero and Venmo from being incorrectly rejected.
```python
src/ad_detector.py
```
```python
src/utils/constants.py
```
--------------------------------
### Search All Content
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Performs a full-text search across all content (episodes, podcasts, patterns, sponsors) with relevance ranking and text snippets. Supports filtering by content type. Requires authentication via cookies.txt.
```bash
curl -b cookies.txt "http://localhost:8000/api/v1/search?q=squarespace&limit=20"
```
```bash
curl -b cookies.txt "http://localhost:8000/api/v1/search?q=betterhelp&type=pattern"
```
```bash
curl -b cookies.txt "http://localhost:8000/api/v1/search?q=interview&type=episode"
```
--------------------------------
### View Auto-Process Queue
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Displays the current auto-processing queue for episodes.
```bash
curl -b cookies.txt http://localhost:8000/api/v1/system/queue
```
--------------------------------
### Per-Podcast Stats
Source: https://context7.com/ttlequals0/minuspod/llms.txt
Retrieves statistics for each podcast. Requires authentication via cookies.txt.
```bash
curl -b cookies.txt http://localhost:8000/api/v1/stats/by-podcast
```