imgpptx
v0.5.2
Published
CLI and TypeScript client for imgpptx - Bidirectional document conversion between Images/PDF and PowerPoint
Maintainers
Readme
imgpptx
TypeScript/JavaScript client and CLI for imgpptx - Bidirectional document conversion between Images/PDF and PowerPoint.
Features
- Interactive CLI with guided workflows
- TypeScript client for programmatic access
- Remote API support - connect to self-hosted or cloud imgpptx servers
- Cross-platform - works on Windows, macOS, and Linux
Installation
Quick Install (all platforms)
npm install -g imgpptxWindows Setup (Automated)
If you don't have Node.js installed, use our setup scripts:
PowerShell (Recommended):
# Download and run the setup script
irm https://raw.githubusercontent.com/zeidalqadri/imgpptx/main/npm-package/scripts/setup-imgpptx.ps1 | iex
# Or if you have the repo cloned:
.\scripts\setup-imgpptx.ps1Command Prompt (Batch):
:: Download and run, or if you have the repo:
scripts\setup-imgpptx.batThe setup scripts will:
- Check for Node.js installation
- Install Node.js via winget if missing
- Install imgpptx globally
- Verify the installation
Usage
Interactive Mode
imgpptxThis launches an interactive menu with options:
- Round-trip conversion (PPTX → Images → PPTX)
- Images to PPTX
- PDF to PPTX
- PPTX to Images
- Configure API endpoint
Direct Commands
# Convert images to PPTX
imgpptx img2pptx image1.png image2.jpg -o presentation.pptx
# With AI-powered text extraction
imgpptx img2pptx slides/*.png -o output.pptx --decompose
# Convert PDF to PPTX
imgpptx pdf2pptx document.pdf -o slides.pptx
# Convert PPTX to images
imgpptx pptx2img presentation.pptx -o ./slides/
# Show help
imgpptx --helpProgrammatic Usage (TypeScript)
import { ImgPptxClient } from 'imgpptx';
const client = new ImgPptxClient({
baseUrl: 'http://localhost:8887',
});
// Check API health
const health = await client.health();
console.log('API Status:', health.status);
// Convert images to PPTX
const result = await client.imagesToPptx({
images: ['slide1.png', 'slide2.png'],
decompose: true, // AI-powered text extraction
});
console.log('Output:', result.outputPath);Configuration
API Endpoint
By default, the CLI uses http://localhost:8887. You can configure a different endpoint:
# Set via environment variable
export IMGPPTX_API_URL=http://your-server:8887
# Or configure interactively
imgpptx
# Select "Configure API endpoint"Environment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| IMGPPTX_API_URL | API server URL | http://localhost:8887 |
Self-Hosting
The imgpptx API server is a Python FastAPI application. See the main repository for server setup instructions.
Quick Server Start
# Install Python package
pip install imgpptx[ai]
# Start server
uvicorn imgpptx.api.server:app --host 0.0.0.0 --port 8887Requirements
- Node.js 18.0.0 or later
- imgpptx API server (for conversion features)
License
MIT
