@tim-fs/io-gallery
@tim-fs/io-gallery
Reusable TIM gallery configs and prompt sources.
Gallery entries use a g- prefix so they are easy to distinguish from executable bot names. g-character-sheets currently expands to the req-image-to-image -> ai-image chain with its sheet prompt installed by this package.
Install gallery prompts before running gallery-powered folders:
npx tim-fs init
This copies prompts to ~/.tim/prompts. At runtime TIM reads that folder as the initial prompt source, then overlays workspace _prompts folders as usual. If a gallery config is active and the global prompt folder is missing, TIM raises a clear error.
Import a gallery config:
{
"import": "g-character-sheets"
}
Or use it as a convenience bot:
{
"triggers": {
"create": {
"input.*.png": "g-character-sheets"
},
"update": {
"input.*.png": "g-character-sheets"
}
}
}
Local config still wins after the gallery merge:
{
"import": "g-character-sheets",
"settings": {
"ai-image": {
"output": {
"aspectRatio": "16:9"
}
}
}
}
Eject a convenience folder into a regular TIM folder:
cd /path/to/folder
npx tim-fs eject
This replaces the folder's config.json with the expanded merged config and copies referenced prompts from ~/.tim/prompts into ./_prompts.
Register galleries programmatically:
import { start } from '@tim-fs/core';
import { galleries } from '@tim-fs/io-gallery';
await start({ cwd: process.cwd(), galleries });