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

kimi-video-plugin

v1.0.7

Published

OpenCode plugin for video analysis using Kimi AI

Downloads

704

Readme

OpenCode Kimi Video Plugin

License: MIT

An OpenCode plugin that enables video file analysis using Kimi AI.

Features

  • 🤖 Auto-detection of video files in chat messages
  • 🎬 Support for multiple formats: MP4, MOV, AVI, WEBM, MKV
  • 🔍 Explicit video analysis commands
  • ⚡ Non-interactive Kimi CLI integration

Requirements

Quick Start

1. Install Kimi CLI

# macOS (with Homebrew)
brew install --cask kimi

# Or download from https://kimi.com

Verify installation:

which kimi
# Should output: /usr/local/bin/kimi (or similar)

2. Install the Plugin

Option A: From NPM (when published)

Add to your project's opencode.json:

{
  "plugins": [
    "kimi-video-plugin"
  ]
}

Option B: Local Development

Clone and link locally:

# 1. Clone the repository
git clone https://github.com/mastertyko/opencode-kimivideo.git
cd opencode-kimivideo

# 2. Install dependencies
bun install

# 3. Link for local development
bun link

# 4. In your project directory, link the plugin
bun link kimi-video-plugin

Option C: Copy to OpenCode Plugins

# 1. Clone
git clone https://github.com/mastertyko/opencode-kimivideo.git

# 2. Copy to OpenCode's plugin directory
cp -r opencode-kimivideo ~/.opencode/plugins/kimi-video-plugin

3. Use It

Start OpenCode in your project:

opencode

Then simply ask:

Analysera video ./my-video.mp4

Or:

Analyze this video: /path/to/movie.mkv and tell me about the main characters

Usage Examples

Basic Analysis

Analysera video ./my-video.mp4

Custom Prompt

Analysera video ./film.mp4 med fokus på färgkorrigering och ljussättning

Multiple Videos

Analysera alla videos i ./videos/ mappen

Supported Formats

| Format | Extension | Notes | |--------|-----------|-------| | MP4 | .mp4 | MPEG-4 Part 14 - Most common | | MOV | .mov | QuickTime - Apple devices | | AVI | .avi | Audio Video Interleave | | WebM | .webm | Web-optimized format | | MKV | .mkv | Matroska - High quality |

How It Works

When you request a video analysis:

  1. OpenCode detects the video file path in your message
  2. Plugin validates the file exists and format is supported
  3. Kimi CLI runs in the background:
    kimi --print -y -p "analysera videon /path/to/video.mp4"
  4. Kimi processes the video:
    • Extracts metadata (duration, resolution, codec)
    • Generates keyframes at regular intervals
    • Analyzes each frame with vision AI
  5. Results returned as a comprehensive text analysis

Development

Setup

git clone https://github.com/mastertyko/opencode-kimivideo.git
cd opencode-kimivideo
bun install

Running Tests

bun test

Project Structure

.
├── src/
│   ├── index.ts                # Plugin entry point (exports Plugin function)
│   └── utils/
│       ├── kimi-cli.ts         # Kimi CLI wrapper
│       └── video-detection.ts  # Video file detection
├── .opencode/
│   └── commands/
│       └── analyze_video.json  # Command discovery for OpenCode
├── index.ts                    # Main export (re-exports from src/index)
├── package.json
└── README.md

Creating a Test Video

Don't have a video handy? Create a quick test file:

# With ffmpeg (creates 5-second test video)
ffmpeg -f lavfi -i testsrc=duration=5:size=640x480:rate=30 test-video.mp4

Troubleshooting

"Kimi CLI not found"

# Verify Kimi is installed
which kimi

# If not found, reinstall:
brew install --cask kimi

# Or add to PATH if installed but not found:
export PATH="$PATH:/Applications/Kimi.app/Contents/MacOS"

"Error: File not found"

  • Use absolute paths: /Users/name/video.mp4 instead of ~/video.mp4
  • Ensure the file has read permissions: chmod +r video.mp4
  • Try relative paths from your current directory: ./video.mp4

Analysis Times Out

  • Large files (>1GB) may take 3-5 minutes
  • Check your internet connection (Kimi uses cloud processing)
  • Try with a smaller video file first

Plugin Not Loading

# Check OpenCode's plugin list
opencode plugins list

# Verify plugin is installed
ls ~/.opencode/plugins/

# Restart OpenCode
opencode restart

License

MIT

Contributing

Pull requests welcome! Please ensure tests pass:

bun test