Skip to content

Command line ​

The kick formercial commands make, voice and render commercials without opening the editor, which makes them easy to script. Run them from the repository with pnpm kick formercial ….

Commands ​

new ​

bash
pnpm kick formercial new "My Product"

Creates projects/my-product/project.json with one starter scene. The folder name comes from the name: lower case, with anything else turned into -.

bash
pnpm kick formercial new "Learn Python" --preset python-objects

--preset starts from a preset instead: showcase, doodle-light-bulb, typescript-types, javascript-const-let or python-objects.

voice ​

bash
pnpm kick formercial voice my-product

Generates every missing or changed line with edge-tts. Scenes using a recording are left alone.

render ​

bash
pnpm kick formercial render my-product [options]
OptionDefault
--format <f>all16:9, 9:16, 1:1, or all (the project's formats)
--driver <name>FORMERCIAL_DRIVER, or chromium-ffmpegA render driver
--fps <n>FORMERCIAL_FPS, or 30Frames per second: a whole number from 1 to 60
--seconds <n>the whole spotRender only the first N seconds
--origin <url>start oneA running app to render from, like http://127.0.0.1:3000

It voices first (when edge-tts is installed), then renders each format. Without --origin, it starts the app on a free port with hot reload off, and stops it when done.

A project with custom scenes must be trusted first: open it with preview and trust it in the editor.

Before rendering, it lists any doodle words too small to read in the formats being rendered, the same list check gives. They don't stop the render.

check ​

bash
pnpm kick formercial check my-product

Lists doodle labels that end up under 24 pixels tall in any of the project's formats, by scene, block and format, with the smallest label in each. Readers on a phone can't make them out. It assumes the doodle has the scene to itself, so a doodle sharing a scene is smaller still. Make the label larger, give the block a tall drawing, or split a long line.

history, rollback, name ​

bash
pnpm kick formercial history my-product
pnpm kick formercial rollback my-product 12
pnpm kick formercial name my-product 12 v1

List a project's steps, put it back to one, or name one. See History.

drivers ​

bash
pnpm kick formercial drivers

Lists every render driver and whether it can run here, or what's missing.

preview ​

bash
pnpm kick formercial preview my-product

Starts the app and prints the editor's address for that project. Stop it with Ctrl+C.

mcp ​

bash
pnpm kick formercial mcp

Serves the agent tools over stdio, for MCP clients that start the server themselves. See Agents.

Naming a project ​

<project> is either:

  • a name under the projects folder (my-product), or
  • a path to a project folder (../elsewhere/promo or /work/ads/promo): the folder holding its project.json.

The projects folder is projects/, or FORMERCIAL_PROJECTS.

Scripting ​

A project is plain JSON, so a script can write one and render it:

bash
node make-launch-spot.mjs > projects/launch/project.json
pnpm kick formercial render launch --format 9:16

project.json is checked on load, and an error names the field that's wrong. See the project.json reference.

Your own commands ​

The kick formercial commands come from a kick CLI plugin registered in kick.config.ts. Add your own next to it:

ts
// kick.config.ts
import { defineCliPlugin, defineConfig } from '@forinda/kickjs-cli'
import { formercialCliPlugin } from './src/cli/plugin'
import formercialConfig from './src/formercial.config'

const team = defineCliPlugin({
  name: 'team-commands',
  register(program, ctx) {
    program
      .command('weekly-ads')
      .description('Render this week’s spots')
      .action(async () => {
        ctx.log('rendering…')
      })
  },
})

export default defineConfig({
  // …the rest of your config
  plugins: [formercialCliPlugin(formercialConfig), team],
})

Then run pnpm kick weekly-ads. The KickJS CLI plugin guide covers the full API.

Released under the Apache License 2.0.