Skip to content
← Public packages

@kentcdodds/transistor

Authenticated Transistor.fm helpers for shows, episodes, episode metadata, and morning-briefing-ready podcast analytics.

AGENTS.md

128 lines · 3.9 KB · Markdown

@kentcdodds/transistor — agent notes

Human setup and intent live in README.md. This file is for agents: imports, smoke checks, snippets, and edge cases. Secrets by name only — never paste key values. Do not disable live webhooks or jobs.

Secrets

NameScopeRequiredNotes
TRANSISTOR_API_KEYuserYesSent as x-api-key on every request

Host: api.transistor.fm. Placeholder: {{secret:TRANSISTOR_API_KEY|scope=user}}.

Import paths

ExportImport
named helpers + action dispatcherkody:@kentcdodds/transistor
shows (static Kent catalog)kody:@kentcdodds/transistor/shows

Named helpers from the root module: listShows, getShow, patchShow, listEpisodes, getEpisode, createEpisode, updateEpisode, publishEpisode, clearEpisodeSummary, getShowAnalytics, getEpisodesAnalytics, getMorningBriefingSnapshot, getCurrentUser, smokeTest, request / transistorRequest, getOverview.

Prefer named typed imports from kody:@kentcdodds/transistor. The default action dispatcher is compatibility-only. Do not lead with packages.invoke.

Smoke test (read-only)

import { smokeTest } from 'kody:@kentcdodds/transistor'

export default async function main() {
	return await smokeTest()
	// => { user: { id, name }, showCount, shows: [...] }
}

Optional catalog-only (no auth):

import shows from 'kody:@kentcdodds/transistor/shows'

export default async function main() {
	return shows()
	// => { shows: [{ showId, slug, title, ... }] }
}

Common snippets

List shows:

import { listShows } from 'kody:@kentcdodds/transistor'

export default async function main() {
	return await listShows()
}

Create + schedule (mutating — only when explicitly requested):

import { createEpisode, publishEpisode } from 'kody:@kentcdodds/transistor'

export default async function main() {
	const episode = await createEpisode({
		showId: '78601',
		title: 'Episode title',
		description: '<p>Show notes HTML</p>',
		type: 'full',
		number: 16,
		season: 1,
	})
	return await publishEpisode({
		episodeId: episode.id,
		status: 'scheduled',
		publishedAt: '3 May 2026 03:00 MDT',
		confirm: true,
	})
}

Patch show metadata (mutating — requires confirm: true):

import { patchShow } from 'kody:@kentcdodds/transistor'

export default async function main() {
	return await patchShow({
		showId: '78601',
		title: 'Become an Epic Product Engineer',
		website:
			'https://www.epicproduct.engineer/become-an-epic-product-engineer-podcast',
		description: '...',
		confirm: true,
	})
}

Edge cases

  • Episode number 0 is rejected; use type: 'trailer' for specials and number full episodes from 1.
  • Put listener-facing copy in description (show notes). Do not set new summary values; clear legacy summaries with summary: "" or clearEpisodeSummary.
  • createEpisode, updateEpisode, patchShow, and publishEpisode are mutating — use only when explicitly requested. patchShow and publishEpisode require confirm: true.
  • Full-episode video attach remains manual in the Transistor dashboard (API has no video upload).
  • No official Transistor OpenAPI; one compact authenticated request helper against https://api.transistor.fm/v1.
  • Better with Kent Kit emails: after the YouTube URL exists, create the early-access broadcast with createBwkYoutubeBroadcastDraft from @kentcdodds/kit (not bare createBroadcastDraft). See the kit package README section "Better with Kent YouTube episode emails".
  • kcd-youtube repo: agents build local payloads with packages/bepe/scripts/kody-transistor-episode.ts / kody-transistor-show.ts, then run the printed Kody MCP execute module. BWK episode create/schedule prefers @kentcdodds/bwk-publish/schedule-transistor.
  • Never paste TRANSISTOR_API_KEY values into chat or logs.