CLI and TypeScript client for imgpptx - Bidirectional document conversion between Images/PDF and PowerPoint
npm install imgpptxTypeScript/JavaScript client and CLI for imgpptx - Bidirectional document conversion between Images/PDF and PowerPoint.
- 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
``bash`
npm install -g imgpptx
If you don't have Node.js installed, use our setup scripts:
PowerShell (Recommended):
`powershellDownload and run the setup script
irm https://raw.githubusercontent.com/zeidalqadri/imgpptx/main/npm-package/scripts/setup-imgpptx.ps1 | iex
Command Prompt (Batch):
`batch
:: Download and run, or if you have the repo:
scripts\setup-imgpptx.bat
`The setup scripts will:
1. Check for Node.js installation
2. Install Node.js via winget if missing
3. Install imgpptx globally
4. Verify the installation
Usage
$3
`bash
imgpptx
`This launches an interactive menu with options:
- Round-trip conversion (PPTX → Images → PPTX)
- Images to PPTX
- PDF to PPTX
- PPTX to Images
- Configure API endpoint
$3
`bash
Convert images to PPTX
imgpptx img2pptx image1.png image2.jpg -o presentation.pptxWith AI-powered text extraction
imgpptx img2pptx slides/*.png -o output.pptx --decomposeConvert PDF to PPTX
imgpptx pdf2pptx document.pdf -o slides.pptxConvert PPTX to images
imgpptx pptx2img presentation.pptx -o ./slides/Show help
imgpptx --help
`$3
`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
$3
By default, the CLI uses
http://localhost:8887. You can configure a different endpoint:`bash
Set via environment variable
export IMGPPTX_API_URL=http://your-server:8887Or configure interactively
imgpptx
Select "Configure API endpoint"
`$3
| 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.
$3
`bash
Install Python package
pip install imgpptx[ai]Start server
uvicorn imgpptx.api.server:app --host 0.0.0.0 --port 8887
``- Node.js 18.0.0 or later
- imgpptx API server (for conversion features)
MIT