npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

smartvedit-cli

v0.1.2

Published

kubectl-style CLI for smartvedit — auto-edit your videos (trim pauses, captions, level, remaster, highlights) from the terminal.

Readme

smartvedit-cli

kubectl-style command line interface for smartvedit. Submit auto-editing jobs (trim pauses, captions, level, remaster, highlights), watch them to completion, chain them into pipelines, and manage your video library — all from the terminal.

Install

Global:

npm install -g smartvedit-cli
smartvedit --help

One-off via npx:

npx smartvedit-cli --help

Requires Node.js >= 18.17.

Quickstart

# 1. sign in (opens https://smartvedit.com/cli-login in your browser)
smartvedit login

# 2. list your jobs
smartvedit get jobs

# 3. submit an action against your most recent analyze job
smartvedit create trim-pauses --source --latest ok --wait

# 4. inspect what got produced
smartvedit get videos

How login works

smartvedit login uses a browser loopback handshake — no Firebase SDK is shipped inside the CLI, so the published npm tarball stays small and rotating Firebase keys never requires a new release.

  1. The CLI spins up a one-shot HTTP server on a random free port on 127.0.0.1, with a fresh per-run CSRF state.
  2. It opens https://smartvedit.com/cli-login?port=<p>&state=<s> in your browser.
  3. The page signs you in with Google (via the same Firebase Web SDK the consumer UI already uses), exchanges the Firebase ID token for the app JWT, then POSTs {jwt, state} back to the CLI's loopback.
  4. The CLI verifies the state, writes the JWT to disk (mode 0600), and exits.

Typical round-trip is ~30 seconds. If you're testing against a non-production UI, set CLI_UI_BASE to point at it (e.g. CLI_UI_BASE=http://localhost:5173 smartvedit login).

Commands

| Command | Description | |---|---| | smartvedit login | Firebase Google sign-in (opens a browser tab). | | smartvedit login-password [user] [pass] | Username + password fallback. Prompts if missing. | | smartvedit logout | Forget the cached token. | | smartvedit whoami | Print the signed-in user (GET /me). | | smartvedit get jobs [--status <s>] [-o json\|table] | List all jobs. | | smartvedit get job <id\|--latest [status]> [-o json\|table] | Show one job. | | smartvedit get videos [-o json\|table] | List rendered videos. | | smartvedit describe job <id\|--latest> | Full job + result JSON. | | smartvedit watch job <id\|--latest> | Poll until terminal; prints status transitions. | | smartvedit delete job\|video <id\|--latest> | Cancel-then-delete (kubectl-style). | | smartvedit create trim-pauses --source <ref> [--min-pause N] [--wait] | Cut dead air. | | smartvedit create captions --source <ref> [--font-size N] [--position top\|bottom] [--max-chars N] [--wait] | Auto-transcribe + burn subtitles. | | smartvedit create level --source <ref> [--target-i N] [--target-tp N] [--target-lra N] [--wait] | Loudness normalise (~-14 LUFS). | | smartvedit create remaster --source <ref> [--wait] | Real-ESRGAN upscale + face restore. | | smartvedit create highlights --source <ref> [--preset reel\|quotes] [--wait] | Content-aware highlight reel. | | smartvedit create pipeline --source <ref> --steps a,b,c [--no-wait-final] | Chain several actions; each step's output feeds the next. |

Referencing jobs

You almost never have to type a job id. Anywhere a job ref is expected, pass --latest (the most recent job) or --latest <status> (the most recent job in that status, e.g. --latest ok).

smartvedit watch job --latest
smartvedit create captions --source --latest ok --wait
smartvedit delete job --latest error

--wait semantics

--wait blocks until the job reaches a terminal state, printing status transitions to stderr. Ctrl-C during a wait cancels the in-flight job (DELETE /me/videos/:id, kubectl-style cancel-by-delete) and exits 130.

Pipelines

Chain actions together with create pipeline. Each step submits a fresh job against the previous step's output, waits for terminal status, and moves on. If any step fails, the pipeline halts and exits non-zero.

# trim pauses, then auto-caption the result
smartvedit create pipeline \
  --source --latest ok \
  --steps trim_pauses,captions

# full polish: trim → level → captions, then build a highlights reel
smartvedit create pipeline \
  --source <analyze_id> \
  --steps trim_pauses,level,captions,highlights:reel

Valid steps: trim_pauses, captions, level, remaster, highlights (alias for highlights:reel), highlights:reel, highlights:quotes.

By default the last step also waits — pass --no-wait-final to fire-and-forget the final stage.

Configuration

Environment variables:

| Var | Default | Purpose | |---|---|---| | API_BASE | https://api.smartvedit.com | API base URL. | | CLI_UI_BASE | https://smartvedit.com | UI base URL used by smartvedit login (the loopback handshake opens ${CLI_UI_BASE}/cli-login). Override for staging / local dev. | | SMARTVEDIT_TOKEN | unset | Override the cached JWT (e.g. in CI). | | SMARTVEDIT_TOKEN_FILE | $XDG_CONFIG_HOME/smartvedit/token (fallback ~/.config/smartvedit/token) | Token cache path. Legacy ~/.smartvedit-token is auto-migrated on first run. |

Programmatic use

import { apiGet, apiPost, type JobDetail } from "smartvedit-cli";

const detail = await apiGet<JobDetail>(`/jobs/${id}`);

Releasing

Releases ship from the publish-cli.yml GitHub Actions workflow — manually triggered, npm OIDC trusted publishing (no NPM_TOKEN secret), provenance attestation generated automatically, paired GitHub Release with auto-generated notes.

One-time setup on npmjs.com (done once for smartvedit-cli):

  1. Go to https://www.npmjs.com/package/smartvedit-cli/access → "Trusted Publisher" → "Add Trusted Publisher (GitHub Actions)"
  2. Owner: deemwar-products, Repository: video-ai, Workflow: publish-cli.yml. Leave Environment blank.

Cut a release:

# patch bump (0.1.0 → 0.1.1)
gh workflow run publish-cli.yml -f bump=patch

# minor / major bumps
gh workflow run publish-cli.yml -f bump=minor
gh workflow run publish-cli.yml -f bump=major

# dry-run rehearsal (no publish, no commit, no release)
gh workflow run publish-cli.yml -f bump=patch -f dry_run=true

# publish the version already in package.json without bumping
gh workflow run publish-cli.yml -f bump=none

The workflow runs prepublishOnly first (typecheck + lint + test + build), then bumps package.json + src/version.ts, commits with [skip ci], tags cli-v<version>, pushes to main, publishes with --provenance, and creates a GH Release.

License

MIT