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

deckops

v0.4.2

Published

Deck operate CLI tool - File processing and conversion tools

Readme

Deckops CLI

Deckops CLI is a TypeScript command-line tool for Deckflow file processing workflows (create, translate, compress, convert, extract, OCR, and task management).

TypeScript Node

Features

  • File upload + task creation for Deckflow backend
  • Built-in task polling with timeout and non-blocking mode
  • Browser-based login flow with local callback server
  • Auto re-login on 401 and checkout flow on 402
  • JSON output mode (--json) for automation scripts
  • Interactive REPL mode for repeated operations

Installation

Install globally:

npm install -g deckops

Or run from source in this repository:

npm install
npm run build
node dist/cli.js --help

CLI executable name from this package is deckops.

Quick Start

1) Login (recommended)

deckops login

This command opens a browser, receives the callback at http://localhost:3737, and saves credentials into local config.

2) Basic usage

# Compress
deckops compress presentation.pptx

# OCR
deckops ocr image.jpg --language en

# Convert PPTX to PDF
deckops convert slides.pptx --to pdf

# Generate with text prompt only
deckops create --input-text "请写一份产品发布会方案"

# Translate document (model is required)
deckops translate handbook.docx --from zh --to en --model Standard

# Join multiple PPTX files in order
deckops join part1.pptx part2.pptx part3.pptx

# List recent tasks
deckops task list --limit 10

Commands

Global options

deckops --json <command>
  • --json: machine-readable JSON output

Login

deckops login [--port <port>]
  • Default callback port: 3737

Config

deckops config set-token <token>
deckops config set-space <space-id>
deckops config set-api-base <url>
deckops config show

Task management

deckops task list [--type <type>] [--limit <n>] [--offset <n>]
deckops task get <task-id>
deckops task delete <task-id>

Compress

deckops compress <input-file> [--no-wait] [--timeout <seconds>]

Supported input extensions:

  • Document/archive: .zip, .pptx, .key, .docx, .xlsx
  • Video: .mp4, .avi, .mov, .mkv

OCR

deckops ocr <input-file> [--language <lang>] [--no-wait] [--timeout <seconds>]
  • Default language: zh-hans
  • Supported languages: zh-hans, zh-hant, en, ja, ko, ar, de, es, fr, it, pt, ru
  • Supported input extensions: .jpg, .jpeg, .png

Extract

deckops extract <input-file> [--type <type>] [--no-wait] [--timeout <seconds>]
  • Extract types:
    • fonts -> pptx.getFontInfo
    • text-shapes -> pptx.getTextShapes
  • Auto-detection currently supports .pptx (defaults to pptx.getFontInfo)

Convert

deckops convert <input-files...> --to <format> [--width <number>] [--height <number>] [--need-embed-fonts [boolean]] [--no-wait] [--timeout <seconds>]

Supported output formats:

  • image: .ppt, .pptx, .pdf, .key
  • pdf: .ppt, .pptx, .doc, .docx, .key
  • video: .ppt, .pptx
  • html: .key
  • png: .html, .md
  • pptx: .ppt, .html
  • webp: .jpg, .jpeg, .png

Notes:

  • --width / --height only apply to HTML -> PPTX and HTML -> PNG conversion (.html --to pptx / .html --to png) and will be sent to the backend as task params.
  • --need-embed-fonts only applies to HTML -> PPTX conversion and maps to task param needEmbedFonts (default: false).
  • Multiple input files are currently supported only for HTML -> PPTX conversion.

Create

deckops create [input-files...] [--input-text <text>] [--enable-search [boolean]] [--advanced-model [boolean]] [--fast-mode [boolean]] [--intent <intent>] [--audience <audience>] [--page-count <number>] [--author <name>] [--no-wait] [--timeout <seconds>]

Rules:

  • At least one of --input-text or input files is required.
  • Up to 2 reference files are allowed.
  • Supported file extensions: .html, .pdf, .docx, .pptx, .txt, .md, .mm, .xmind, .ipynb

Example:

deckops create --input-text "写一份面向开发者的 API 设计文档"
deckops create refs.md refs.pdf --input-text "根据参考资料输出总结" --audience "工程团队" --page-count 6

Translate

deckops translate <input-file> --from <language> --to <language> --model <Standard|Pro> [--use-glossary [boolean]] [--image-translate [boolean]] [--no-wait] [--timeout <seconds>]

Rules:

  • Exactly one input file is required.
  • Supported file extensions: .docx, .pptx, .pdf, .xlsx, .key
  • --model is required and must be one of: Standard, Pro

Example:

deckops translate report.docx --from zh --to en --model Standard
deckops translate slides.pdf --from ja --to zh-hans --model Pro

Join (pptx)

deckops join <input-files...> [--name <name>] [--no-wait] [--timeout <seconds>]

Merges multiple .pptx files into a single deck using the pptx.join task. Files are merged in the order given on the command line, so the first file becomes the start of the merged deck.

  • Requires at least 2 .pptx files
  • All inputs must have the .pptx extension
  • --name overrides the task name (defaults to the first input file's base name)

Example:

deckops join cover.pptx chapter-1.pptx chapter-2.pptx appendix.pptx
deckops join a.pptx b.pptx --name combined-deck --timeout 600

Run explicit task type

deckops run <task-type> <input-files...> [--param <key=value>] [--no-wait] [--timeout <seconds>]

--param can be repeated and values are parsed as JSON when possible.

Example:

deckops run convertor.ppt2pdf demo.ppt --param quality="high"
deckops run some.task input.pdf --param retries=3 --param debug=true

REPL

deckops repl

Inside REPL:

deckflow> config show
deckflow> task list
deckflow> exit

Authentication behavior

  • If token or spaceId is missing, most API commands will trigger login flow automatically.
  • On backend 401, client will auto prompt login and retry.
  • On backend 402, client will open browser checkout flow, then continue.

Configuration

Config file path:

  • ~/.deckops/config.json

Common fields:

  • token: auth token
  • spaceId: workspace/space identifier
  • apiBase: API base URL (default: https://app.deckflow.com/v1)
  • signURI: optional sign-in URI field

Example:

{
  "token": "your-auth-token",
  "spaceId": "your-space-id",
  "apiBase": "https://app.deckflow.com/v1"
}

Development

Requirements:

  • Node.js >= 18

Setup:

npm install
npm run build
npm run typecheck
npm run lint
npm test

Useful scripts:

  • npm run build
  • npm run dev
  • npm run test
  • npm run test:unit
  • npm run test:e2e
  • npm run test:coverage
  • npm run lint
  • npm run format
  • npm run typecheck

License

MIT

Links