assctl

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2026 License: MIT

README

assctl

Go Reference CI coverage version license imported by Docker Pulls

Your subtitles already have timing. Now make the damn things look good. assctl creates, inspects, edits, validates, and themes Advanced SubStation Alpha (ASS) files, from a terminal or your own Go code.

Contents

Install

Go 1.26 or newer.

go install github.com/psyb0t/assctl/cmd/assctl@latest
assctl fonts-install

Or use the Docker image, which ships assctl, FFmpeg with libass and every preset font:

docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/work" psyb0t/assctl \
  captions --preset tiktok-bold --spec timing.json --output captions.ass
docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/work" --entrypoint ffmpeg psyb0t/assctl \
  -i input.mp4 -vf ass=captions.ass -c:a copy output.mp4

See Docker for tags and details.

Quick start

assctl inspect captions.ass
assctl theme --preset ivory-navy --output styled.ass captions.ass
assctl position --text-position portrait-lower-middle --output moved.ass styled.ass
assctl validate styled.ass

theme updates the style definitions and preserves the original dialogue, event timing, inline tags, and unrelated sections. Use --style NAME to theme one style. Use - to read or write through a pipe.

create builds a script from typed JSON. captions turns already timed text into styled captions. edit changes selected script settings, style columns, and individual events. tags generates override blocks for karaoke, drawing, fades, clipping, and animation. See the CLI guide for examples and the JSON shape.

Presets

Pick a whole look, including the font, colors, background, outline, shadow, and placement. Tweak any of it when the defaults aren't your thing.

Preset Text and background Secondary karaoke color
black-gold Bold white text, opaque black box Gold
ivory-navy Ivory serif text, navy box Sky blue
mint-plum Bold mint text, plum box Peach
clean White text, black outline, clear background Sky blue
tiktok-bold TikTok Sans Bold, white with a black outline, lower-middle Yellow
reels-bold Barlow Condensed ExtraBold, white with a black outline, lower-middle Yellow
shorts-impact Anton, yellow with a black outline, lower-middle White
social-center Anton, white with a black outline, centered Yellow
social-box TikTok Sans Bold, white on translucent black, lower-middle Yellow
social-hook Barlow Condensed ExtraBold, yellow with a black outline, upper-center White
the-bold THE BOLD FONT free version, white with a black outline, lower-middle Yellow

Run assctl presets --json to see the full values. Use one of those objects as a starting point for --theme-file with captions or theme. Inline overrides in an existing subtitle still take effect.

Social presets keep text inside the safe area TikTok, YouTube Shorts and Instagram Reels publish for their buttons and captions, on a vertical video of any size. assctl safe-area FILE checks any subtitle file against one platform or all three. Fonts download from their upstream sources through fonts-install, or straight into the subtitle file with --embed-preset-fonts, so the machine that renders the video needs no installed fonts. See font licenses, source downloads, and positioning.

Use --text-position with captions, create, or theme to choose placement independently of appearance. assctl positions lists the layouts. Existing event positioning still takes precedence. See text positions.

Go package

go get github.com/psyb0t/assctl/pkg/ass

Use ass.Parse and Document.Apply for edits, or ass.NewScript and Script.Encode to create a script. See the Go guide.

Agent integrations

The skill documents how to use the installed command on local subtitle files.

claude plugin marketplace add psyb0t/agents
claude plugin install assctl@psyb0t

codex plugin marketplace add psyb0t/agents
codex plugin add assctl@psyb0t

openclaw skills install @psyb0t/assctl

Documentation

The assctl documentation covers the CLI and Go library.

Guide What you need
Installation Install with Go or Docker, update, and prepare fonts
CLI Commands, flags, and JSON examples
Presets and fonts Palettes, backgrounds, font installation, and embedded fonts
Text positions Independent placement, platform safe areas, margins, and override precedence
ASS features Tags, drawing, karaoke, effects, embedded fonts, libass extensions, headers, and wrapping modes
Go library Create and edit scripts in Go
Agents Skills and plugin setup
Troubleshooting Input, font, and output errors
Development Build, test, docs, and releases

Development

make check
make test-coverage
make sec
make docs

The Makefile runs Go checks in the same development image locally and in CI. Branch pushes check the source. Version tags wait for that commit's default-branch checks before the release and ClawHub publish. See development and releases.

Sponsor

Sponsor on GitHub

Buy Me a Coffee

License

MIT.

Directories

Path Synopsis
cmd
assctl command
internal
pkg/fonts
Package fonts installs the font files required by assctl's built-in presets.
Package fonts installs the font files required by assctl's built-in presets.
pkg
ass
Package ass reads, writes, and styles Advanced SubStation Alpha subtitles.
Package ass reads, writes, and styles Advanced SubStation Alpha subtitles.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL