litevision 0.1.0 → 0.2.0
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/README.md +25 -11
- package/dist/cli.js +2034 -493
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# litevision
|
|
2
2
|
|
|
3
|
-
Let an AI agent generate images through models you already pay for.
|
|
3
|
+
Let an AI agent generate images and videos through models you already pay for.
|
|
4
4
|
|
|
5
|
-
litevision is a local [MCP](https://modelcontextprotocol.io) server. You configure your own Providers (OpenAI, Gemini, Venice, APIMart, or any compatible relay) once, in a settings page on your own machine. Your Agent (Claude Code, Codex, …) then generates images with them and gets back file paths. Your API keys never pass through the conversation.
|
|
5
|
+
litevision is a local [MCP](https://modelcontextprotocol.io) server. You configure your own Providers (OpenAI, Gemini, Venice, APIMart, Together AI, or any compatible relay) once, in a settings page on your own machine. Your Agent (Claude Code, Codex, …) then generates images and videos with them and gets back file paths. Your API keys never pass through the conversation.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -24,9 +24,19 @@ Any other MCP client: run `npx -y litevision` as a stdio server, for example:
|
|
|
24
24
|
}
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
### The litevision Skill
|
|
28
|
+
|
|
29
|
+
The server tells your Agent the rules it must keep. How to get good results (writing prompts, checking each result against your request, when to suggest a Comparison or new Model Notes) is in the litevision Skill, [`skills/litevision/SKILL.md`](skills/litevision/SKILL.md), drafted from the Model makers' own prompting guides. Install it with [`skills`](https://github.com/vercel-labs/skills):
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx skills add levyxdev/litevision
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Add `-g` to install it for your user instead of the current project, and `-a` to choose which Agents get it. The Skill changes only with a litevision release: run `npx skills update` after upgrading litevision. Without it, your Agent still keeps the rules, but writes prompts its own way.
|
|
36
|
+
|
|
27
37
|
## Set up
|
|
28
38
|
|
|
29
|
-
Ask your Agent to generate an image. While nothing is configured, it calls `open_settings`, which opens the settings page in your browser. You can also open it yourself:
|
|
39
|
+
Ask your Agent to generate an image. While nothing is configured, it calls `open_settings`, which opens the settings page in your browser. You can also open it yourself, from your Agent's prompt menu (in Claude Code, the `/mcp__litevision__settings` command) or from a terminal:
|
|
30
40
|
|
|
31
41
|
```bash
|
|
32
42
|
npx -y litevision settings
|
|
@@ -35,7 +45,7 @@ npx -y litevision settings
|
|
|
35
45
|
The page listens on `127.0.0.1` only, behind a one-time token, and shuts down after a few idle minutes. On it you:
|
|
36
46
|
|
|
37
47
|
1. **Add a Provider**: a name, a base URL, and its API key (the Credential). "Test connection" checks the key.
|
|
38
|
-
2. **Add Models**: an Alias your Agent will use (e.g. `gpt-image-cheap`), the Provider's model id,
|
|
48
|
+
2. **Add Models**: an Alias your Agent will use (e.g. `gpt-image-cheap`), the Provider's model id, the Protocol it speaks, and whether it makes images or videos (filled in for you when the Provider's model list says):
|
|
39
49
|
|
|
40
50
|
| Protocol | For |
|
|
41
51
|
| --- | --- |
|
|
@@ -43,19 +53,23 @@ The page listens on `127.0.0.1` only, behind a one-time token, and shuts down af
|
|
|
43
53
|
| `gemini` | Google's Gemini API (Interactions API) |
|
|
44
54
|
| `venice` | Venice |
|
|
45
55
|
| `apimart` | APIMart |
|
|
56
|
+
| `together` | Together AI, images and videos. Models Together passes through to their makers (FLUX, Google, Qwen, …) work only once you turn on "Passthrough models" in Together's organization settings, which sends your prompts for them to those makers. |
|
|
46
57
|
|
|
47
|
-
3. **Pick a default image Model** and, optionally, write Model Notes ("photoreal, cheap, bad at Chinese text") so the Agent knows when to choose each one.
|
|
58
|
+
3. **Pick a default image Model** (and a default video Model) and, optionally, write Model Notes ("photoreal, cheap, bad at Chinese text") so the Agent knows when to choose each one.
|
|
48
59
|
|
|
49
|
-
The page also shows the Job history, with the images and any Ratings you gave.
|
|
60
|
+
The page also shows the Job history, with the images and videos and any Ratings you gave, and lets you rate a Job or one of its results.
|
|
50
61
|
|
|
51
62
|
## Tools
|
|
52
63
|
|
|
53
64
|
| Tool | What it does |
|
|
54
65
|
| --- | --- |
|
|
55
|
-
| `generate_image` | Generates images from a prompt, optionally with reference images, an aspect ratio and Provider-specific `provider_options`. Saves them and returns the file paths. |
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
66
|
+
| `generate_image` | Generates images from a prompt, optionally with reference images, an aspect ratio and Provider-specific `provider_options`. Saves them and returns the file paths, with the size each image actually came out at. |
|
|
67
|
+
| `generate_video` | Generates a video from a prompt, optionally with a first and last frame, reference images, an aspect ratio, a duration and a resolution. Saves it and returns the file path, with its actual size and length. |
|
|
68
|
+
| `generate_comparison` | Starts 2 to 4 Jobs of one Modality together, differing in prompt, Model or both, so you can choose among the results. The Agent starts one only when you ask for it or agree to it. |
|
|
69
|
+
| `get_job` | Waits for, or reports on, a Job that was still running when `generate_image`, `generate_video` or `generate_comparison` returned. |
|
|
70
|
+
| `list_models` | Lists the configured Models with their Modality, capabilities, Model Notes, docs link and Known-good Options (the `provider_options` that worked); for one Model, also their values, options made suspect by a bad Rating or a result that did not match, its five most recent Ratings, the Picks of up to five Comparisons it took part in (most recently picked first), and the Provider's parameter schema. |
|
|
71
|
+
| `pick_result` | Records your Pick when you choose among a Comparison's results; choosing again replaces it. A Pick says which you prefer, not that it is good, so it does not change Known-good Options. You can also pick in the settings page's Job history, which shows a Comparison's Jobs together. |
|
|
72
|
+
| `rate_job` | Records your verdict on a Job or on one of its results (good or bad, plus a reason) when you state one. A bad Rating of the whole Job, or of its only result, makes the options that Job used suspect until a good one uses them again. |
|
|
59
73
|
| `update_model_notes` | Replaces a Model's Notes, only with text you agreed to. You can undo it in the settings page. |
|
|
60
74
|
| `open_settings` | Opens the settings page. |
|
|
61
75
|
|
|
@@ -65,7 +79,7 @@ The page also shows the Job history, with the images and any Ratings you gave.
|
|
|
65
79
|
| --- | --- |
|
|
66
80
|
| Providers, Models (`config.json`) and Credentials (`credentials.json`, mode 600) | `~/.config/litevision/` |
|
|
67
81
|
| Job history (`jobs.jsonl`) and cached Model capabilities | `~/.local/share/litevision/` |
|
|
68
|
-
| Generated images, unless the Agent passes `output_path` | `~/litevision/outputs/<date>/` |
|
|
82
|
+
| Generated images and videos, unless the Agent passes `output_path` | `~/litevision/outputs/<date>/` |
|
|
69
83
|
|
|
70
84
|
## Develop
|
|
71
85
|
|