@mrgoonie/multix 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/LICENSE +21 -0
- package/README.md +180 -0
- package/dist/cli.js +2234 -0
- package/package.json +71 -0
- package/skill/SKILL.md +156 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.0.1] - 2026-05-02
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial release — TypeScript/ESM port of Python `ai-multimodal` skill scripts.
|
|
12
|
+
- `multix gemini` — analyze, transcribe, extract, generate images (Nano Banana / Imagen 4), generate-video (Veo, experimental).
|
|
13
|
+
- `multix minimax` — image, video (async polling), speech (TTS), music generation.
|
|
14
|
+
- `multix openrouter` — image generation via chat completions API with fallback model support.
|
|
15
|
+
- `multix media` — optimize video/audio/images (ffmpeg + ImageMagick), split long videos, batch process directories.
|
|
16
|
+
- `multix doc` — convert PDFs, Office docs, images to Markdown via Gemini Files API.
|
|
17
|
+
- `multix check` — diagnostics: tooling presence, API key validation, Gemini live ping, setup hints.
|
|
18
|
+
- Shared core: env loader (layered .env), result type, HTTP client (globalThis.fetch), output dir, ANSI logger.
|
|
19
|
+
- Vitest unit + smoke tests (103 tests); GitHub Actions CI on Node 20/22 × Ubuntu/Windows.
|
|
20
|
+
- Companion `skill/SKILL.md` for Claude Code skill catalog.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 multix-cli contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# multix
|
|
2
|
+
|
|
3
|
+
AI multimodal CLI — generate images/video/speech/music, analyze and transcribe media files, convert documents to Markdown, and optimize media with ffmpeg/ImageMagick.
|
|
4
|
+
|
|
5
|
+
Supports **Gemini** (analyze, transcribe, generate, Veo video), **MiniMax** (image, video, speech, music), and **OpenRouter** (image generation).
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @mrgoonie/multix
|
|
11
|
+
# or run without installing:
|
|
12
|
+
npx -p @mrgoonie/multix multix --help
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Requirements:** Node >= 20. For media commands: `ffmpeg` and `magick` (ImageMagick 7+) on PATH.
|
|
16
|
+
|
|
17
|
+
## Quick start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Check your setup
|
|
21
|
+
multix check
|
|
22
|
+
|
|
23
|
+
# Generate an image with Gemini
|
|
24
|
+
multix gemini generate --prompt "A sunset over mountains" --aspect-ratio 16:9
|
|
25
|
+
|
|
26
|
+
# Analyze an image
|
|
27
|
+
multix gemini analyze --files photo.jpg --prompt "Describe this"
|
|
28
|
+
|
|
29
|
+
# Convert a PDF to Markdown
|
|
30
|
+
multix doc convert --input report.pdf
|
|
31
|
+
|
|
32
|
+
# Optimize a video to 100MB
|
|
33
|
+
multix media optimize --input video.mp4 --output out.mp4 --target-size 100
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Environment variables
|
|
37
|
+
|
|
38
|
+
Set at least one provider key. Add to `.env` in your project root or `~/.multix/.env`.
|
|
39
|
+
|
|
40
|
+
| Variable | Required | Purpose |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| `GEMINI_API_KEY` | For Gemini | [AI Studio](https://aistudio.google.com/apikey) |
|
|
43
|
+
| `OPENROUTER_API_KEY` | For OpenRouter | [OpenRouter](https://openrouter.ai/settings/keys) |
|
|
44
|
+
| `MINIMAX_API_KEY` | For MiniMax | [MiniMax](https://platform.minimax.io/user-center/basic-information/interface-key) |
|
|
45
|
+
| `MULTIX_OUTPUT_DIR` | No | Override default output dir (`./multix-output`) |
|
|
46
|
+
| `OPENROUTER_IMAGE_MODEL` | No | Default OpenRouter model |
|
|
47
|
+
| `OPENROUTER_FALLBACK_MODELS` | No | Comma-separated fallback model ids |
|
|
48
|
+
| `IMAGE_GEN_MODEL` | No | Override Gemini image generation model |
|
|
49
|
+
| `VIDEO_GEN_MODEL` | No | Override Gemini video generation model |
|
|
50
|
+
| `MULTIMODAL_MODEL` | No | Override Gemini analysis model |
|
|
51
|
+
|
|
52
|
+
Priority: `process.env` > `cwd/.env` > `~/.multix/.env`.
|
|
53
|
+
|
|
54
|
+
## Commands
|
|
55
|
+
|
|
56
|
+
### `multix check`
|
|
57
|
+
|
|
58
|
+
Validate setup: tooling (ffmpeg, magick), API keys, Gemini live ping.
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
multix check [--verbose]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Exits 0 if at least one provider key is configured. Exits 1 if no keys found or Gemini auth fails.
|
|
65
|
+
|
|
66
|
+
### `multix gemini`
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Analyze files (images, video, audio, documents)
|
|
70
|
+
multix gemini analyze --files photo.jpg video.mp4 [--prompt <str>] [--model <id>] [--format text|json|csv|markdown] [--output <path>] [-v]
|
|
71
|
+
|
|
72
|
+
# Transcribe audio/video
|
|
73
|
+
multix gemini transcribe --files audio.mp3 [--prompt <str>] [--model <id>] [--format <fmt>] [-v]
|
|
74
|
+
|
|
75
|
+
# Extract structured information
|
|
76
|
+
multix gemini extract --files report.pdf --prompt "Extract tables as JSON" [--format json] [-v]
|
|
77
|
+
|
|
78
|
+
# Generate images
|
|
79
|
+
multix gemini generate --prompt "A mountain lake" [--model <id>] [--aspect-ratio 16:9] [--num-images 1] [--size 1K|2K|4K] [--output <path>] [-v]
|
|
80
|
+
|
|
81
|
+
# Generate video [EXPERIMENTAL — requires billing]
|
|
82
|
+
multix gemini generate-video --prompt "Ocean waves" [--model veo-3.1-generate-preview] [--resolution 720p|1080p] [--aspect-ratio 16:9] [--reference-images first.png last.png] [-v]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Gemini models:**
|
|
86
|
+
- Analysis: `gemini-2.5-flash` (default)
|
|
87
|
+
- Image gen: `gemini-3.1-flash-image-preview` (Nano Banana 2, fastest), `gemini-3-pro-image-preview` (4K text), `imagen-4.0-generate-001` (production)
|
|
88
|
+
- Video: `veo-3.1-generate-preview` (requires billing)
|
|
89
|
+
|
|
90
|
+
**Aspect ratios:** `1:1 2:3 3:2 3:4 4:3 4:5 5:4 9:16 16:9 21:9`
|
|
91
|
+
|
|
92
|
+
### `multix minimax`
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Generate image
|
|
96
|
+
multix minimax generate --prompt "A cat in space" [--model image-01] [--aspect-ratio 1:1] [--num-images 1] [-v]
|
|
97
|
+
|
|
98
|
+
# Generate video (async, polls until done)
|
|
99
|
+
multix minimax generate-video --prompt "A dancer" [--model MiniMax-Hailuo-2.3] [--duration 6|10] [--resolution 720P|1080P] [--first-frame <url>] [-v]
|
|
100
|
+
|
|
101
|
+
# Text-to-speech
|
|
102
|
+
multix minimax generate-speech (--text|--prompt) <str> [--model speech-2.8-hd] [--voice <id>] [--emotion neutral] [--output-format mp3|wav|flac|pcm] [-v]
|
|
103
|
+
|
|
104
|
+
# Music generation
|
|
105
|
+
multix minimax generate-music [--lyrics <str>] [--prompt <str>] [--model music-2.5] [--output-format mp3] [-v]
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**MiniMax models:** `image-01`, `MiniMax-Hailuo-2.3`, `speech-2.8-hd`, `music-2.5` (and more — see `--help`)
|
|
109
|
+
|
|
110
|
+
### `multix openrouter`
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
multix openrouter generate --prompt "Retro robot" [--model google/gemini-3.1-flash-image-preview] [--aspect-ratio 1:1] [--image-size <sz>] [--num-images 1] [-v]
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Fallback models from `OPENROUTER_FALLBACK_MODELS` (CSV) are appended to the payload automatically.
|
|
117
|
+
|
|
118
|
+
### `multix media`
|
|
119
|
+
|
|
120
|
+
Requires `ffmpeg` (video/audio) and `magick` (images) on PATH.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Optimize single file
|
|
124
|
+
multix media optimize --input <file> --output <file> [--target-size <MB>] [--quality <n>] [--max-width <px>] [--bitrate <rate>] [--resolution <WxH>] [-v]
|
|
125
|
+
|
|
126
|
+
# Split video into chunks
|
|
127
|
+
multix media split --input <video> [--output-dir ./chunks] [--chunk-duration 3600] [-v]
|
|
128
|
+
|
|
129
|
+
# Batch optimize a directory
|
|
130
|
+
multix media batch --input-dir <dir> --output-dir <dir> [--quality 85] [--max-width 1920] [--bitrate 64k] [-v]
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Defaults:** quality=85, max-width=1920, bitrate=64k, chunk-duration=3600s.
|
|
134
|
+
**Video:** uses libx264 CRF encoding. Image optimization uses ImageMagick (replaces Pillow).
|
|
135
|
+
|
|
136
|
+
### `multix doc`
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
multix doc convert --input <files...> [--output <path>] [--auto-name] [--model gemini-2.5-flash] [--prompt <str>] [-v]
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Converts PDFs, DOCX/XLSX/PPTX, images, and HTML/text files to Markdown via Gemini.
|
|
143
|
+
Multiple inputs are concatenated with `---` separators into a single output.
|
|
144
|
+
|
|
145
|
+
**Default output:** `./multix-output/document-extraction.md`
|
|
146
|
+
|
|
147
|
+
## Output
|
|
148
|
+
|
|
149
|
+
All generated files are saved to `./multix-output/` by default. Override with `MULTIX_OUTPUT_DIR`.
|
|
150
|
+
|
|
151
|
+
## Troubleshooting
|
|
152
|
+
|
|
153
|
+
**No API key found:** Run `multix check` — it prints setup instructions.
|
|
154
|
+
|
|
155
|
+
**ffmpeg not found:** Install per your OS:
|
|
156
|
+
- Linux: `sudo apt-get install ffmpeg`
|
|
157
|
+
- macOS: `brew install ffmpeg`
|
|
158
|
+
- Windows: https://ffmpeg.org/download.html
|
|
159
|
+
|
|
160
|
+
**magick not found:**
|
|
161
|
+
- Linux: `sudo apt-get install imagemagick`
|
|
162
|
+
- macOS: `brew install imagemagick`
|
|
163
|
+
- Windows: https://imagemagick.org/script/download.php
|
|
164
|
+
|
|
165
|
+
**Gemini free tier limitation:** Image/video generation requires billing. Enable at https://aistudio.google.com/apikey or use Google Cloud $300 free credits.
|
|
166
|
+
|
|
167
|
+
**MiniMax video times out:** Default timeout is 10 minutes. Long videos may take longer.
|
|
168
|
+
|
|
169
|
+
## Contributing
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
git clone https://github.com/mrgoonie/multix-cli
|
|
173
|
+
npm install
|
|
174
|
+
npm run build
|
|
175
|
+
npm test
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## License
|
|
179
|
+
|
|
180
|
+
MIT — see [LICENSE](LICENSE).
|