egaki 0.6.0 → 0.7.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/CHANGELOG.md +140 -9
- package/dist/cli/cache-utils.d.ts +33 -0
- package/dist/cli/cache-utils.d.ts.map +1 -0
- package/dist/cli/cache-utils.js +157 -0
- package/dist/cli/cached-generate.d.ts +105 -0
- package/dist/cli/cached-generate.d.ts.map +1 -0
- package/dist/cli/cached-generate.js +208 -0
- package/dist/cli/cached-generate.test.d.ts +11 -0
- package/dist/cli/cached-generate.test.d.ts.map +1 -0
- package/dist/cli/cached-generate.test.js +431 -0
- package/dist/cli/cartesia-provider.d.ts +16 -0
- package/dist/cli/cartesia-provider.d.ts.map +1 -0
- package/dist/cli/cartesia-provider.js +184 -0
- package/dist/cli/chatgpt-auth.d.ts.map +1 -0
- package/dist/cli/cli.d.ts +4 -0
- package/dist/cli/cli.d.ts.map +1 -0
- package/dist/{cli.js → cli/cli.js} +626 -600
- package/dist/cli/clone-generate.d.ts +26 -0
- package/dist/cli/clone-generate.d.ts.map +1 -0
- package/dist/cli/clone-generate.js +148 -0
- package/dist/cli/credentials.d.ts.map +1 -0
- package/dist/{credentials.js → cli/credentials.js} +20 -0
- package/dist/cli/elevenlabs-speech-provider.d.ts +26 -0
- package/dist/cli/elevenlabs-speech-provider.d.ts.map +1 -0
- package/dist/cli/elevenlabs-speech-provider.js +199 -0
- package/dist/cli/generate.d.ts +140 -0
- package/dist/cli/generate.d.ts.map +1 -0
- package/dist/cli/generate.js +604 -0
- package/dist/cli/generate.test.d.ts +2 -0
- package/dist/cli/generate.test.d.ts.map +1 -0
- package/dist/cli/generate.test.js +131 -0
- package/dist/cli/login.d.ts.map +1 -0
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +7 -0
- package/dist/{model-catalog.d.ts → cli/model-catalog.d.ts} +6 -0
- package/dist/cli/model-catalog.d.ts.map +1 -0
- package/dist/{model-catalog.js → cli/model-catalog.js} +714 -4
- package/dist/{models.d.ts → cli/models.d.ts} +12 -5
- package/dist/cli/models.d.ts.map +1 -0
- package/dist/{models.js → cli/models.js} +58 -57
- package/dist/cli/open-browser.d.ts.map +1 -0
- package/dist/cli/openai-speech-provider.d.ts +3 -0
- package/dist/cli/openai-speech-provider.d.ts.map +1 -0
- package/dist/cli/openai-speech-provider.js +28 -0
- package/dist/cli/separation-generate.d.ts +34 -0
- package/dist/cli/separation-generate.d.ts.map +1 -0
- package/dist/cli/separation-generate.js +117 -0
- package/dist/cli/speech-catalog.d.ts +35 -0
- package/dist/cli/speech-catalog.d.ts.map +1 -0
- package/dist/cli/speech-catalog.js +195 -0
- package/dist/cli/speech-generate.d.ts +86 -0
- package/dist/cli/speech-generate.d.ts.map +1 -0
- package/dist/cli/speech-generate.js +156 -0
- package/dist/cli/speech-models.d.ts +8 -0
- package/dist/cli/speech-models.d.ts.map +1 -0
- package/dist/cli/speech-models.js +109 -0
- package/dist/cli/speech-provider.test.d.ts +2 -0
- package/dist/cli/speech-provider.test.d.ts.map +1 -0
- package/dist/cli/speech-provider.test.js +197 -0
- package/dist/cli/subscription.d.ts.map +1 -0
- package/dist/cli/transcription-catalog.d.ts +35 -0
- package/dist/cli/transcription-catalog.d.ts.map +1 -0
- package/dist/cli/transcription-catalog.js +192 -0
- package/dist/cli/transcription-generate.d.ts +62 -0
- package/dist/cli/transcription-generate.d.ts.map +1 -0
- package/dist/cli/transcription-generate.js +144 -0
- package/dist/cli/transcription-models.d.ts +9 -0
- package/dist/cli/transcription-models.d.ts.map +1 -0
- package/dist/cli/transcription-models.js +100 -0
- package/dist/cli/transcription-providers.d.ts +22 -0
- package/dist/cli/transcription-providers.d.ts.map +1 -0
- package/dist/cli/transcription-providers.js +290 -0
- package/dist/cli/video-model-catalog.d.ts.map +1 -0
- package/dist/cli/xai-auth.d.ts.map +1 -0
- package/dist/{xai-auth.js → cli/xai-auth.js} +1 -1
- package/dist/vite/angled-screen.d.ts +57 -0
- package/dist/vite/angled-screen.d.ts.map +1 -0
- package/dist/vite/angled-screen.js +115 -0
- package/dist/vite/app.d.ts +51 -0
- package/dist/vite/app.d.ts.map +1 -0
- package/dist/vite/app.js +150 -0
- package/dist/vite/bands-shader.d.ts +47 -0
- package/dist/vite/bands-shader.d.ts.map +1 -0
- package/dist/vite/bands-shader.js +267 -0
- package/dist/vite/code-block.d.ts +107 -0
- package/dist/vite/code-block.d.ts.map +1 -0
- package/dist/vite/code-block.js +641 -0
- package/dist/vite/components.d.ts +36 -0
- package/dist/vite/components.d.ts.map +1 -0
- package/dist/vite/components.js +113 -0
- package/dist/vite/dispersion-rings-shader.d.ts +44 -0
- package/dist/vite/dispersion-rings-shader.d.ts.map +1 -0
- package/dist/vite/dispersion-rings-shader.js +282 -0
- package/dist/vite/easing-curves.d.ts +129 -0
- package/dist/vite/easing-curves.d.ts.map +1 -0
- package/dist/vite/easing-curves.js +584 -0
- package/dist/vite/easing-curves.test.d.ts +2 -0
- package/dist/vite/easing-curves.test.d.ts.map +1 -0
- package/dist/vite/easing-curves.test.js +200 -0
- package/dist/vite/generated-media-client.d.ts +35 -0
- package/dist/vite/generated-media-client.d.ts.map +1 -0
- package/dist/vite/generated-media-client.js +76 -0
- package/dist/vite/keyframes.d.ts +129 -0
- package/dist/vite/keyframes.d.ts.map +1 -0
- package/dist/vite/keyframes.js +194 -0
- package/dist/vite/layout-editor.d.ts +45 -0
- package/dist/vite/layout-editor.d.ts.map +1 -0
- package/dist/vite/layout-editor.js +587 -0
- package/dist/vite/layout-transition.d.ts +136 -0
- package/dist/vite/layout-transition.d.ts.map +1 -0
- package/dist/vite/layout-transition.js +581 -0
- package/dist/vite/liquid-gradient-shader.d.ts +62 -0
- package/dist/vite/liquid-gradient-shader.d.ts.map +1 -0
- package/dist/vite/liquid-gradient-shader.js +413 -0
- package/dist/vite/mdx-client.d.ts +15 -0
- package/dist/vite/mdx-client.d.ts.map +1 -0
- package/dist/vite/mdx-client.js +265 -0
- package/dist/vite/mdx-parse.d.ts +102 -0
- package/dist/vite/mdx-parse.d.ts.map +1 -0
- package/dist/vite/mdx-parse.js +251 -0
- package/dist/vite/mdx-provided-components.d.ts +18 -0
- package/dist/vite/mdx-provided-components.d.ts.map +1 -0
- package/dist/vite/mdx-provided-components.js +14 -0
- package/dist/vite/mdx-video.d.ts +327 -0
- package/dist/vite/mdx-video.d.ts.map +1 -0
- package/dist/vite/mdx-video.js +596 -0
- package/dist/vite/mdx-video.test.d.ts +9 -0
- package/dist/vite/mdx-video.test.d.ts.map +1 -0
- package/dist/vite/mdx-video.test.js +1945 -0
- package/dist/vite/media-components.d.ts +45 -0
- package/dist/vite/media-components.d.ts.map +1 -0
- package/dist/vite/media-components.js +355 -0
- package/dist/vite/media-duration-store.d.ts +66 -0
- package/dist/vite/media-duration-store.d.ts.map +1 -0
- package/dist/vite/media-duration-store.js +204 -0
- package/dist/vite/player-page.d.ts +35 -0
- package/dist/vite/player-page.d.ts.map +1 -0
- package/dist/vite/player-page.js +720 -0
- package/dist/vite/render-client.d.ts +18 -0
- package/dist/vite/render-client.d.ts.map +1 -0
- package/dist/vite/render-client.js +67 -0
- package/dist/vite/sdk.d.ts +221 -0
- package/dist/vite/sdk.d.ts.map +1 -0
- package/dist/vite/sdk.js +355 -0
- package/dist/vite/server-components.d.ts +55 -0
- package/dist/vite/server-components.d.ts.map +1 -0
- package/dist/vite/server-components.js +156 -0
- package/dist/vite/server-mdx.d.ts +74 -0
- package/dist/vite/server-mdx.d.ts.map +1 -0
- package/dist/vite/server-mdx.js +259 -0
- package/dist/vite/shader-renderer.d.ts +48 -0
- package/dist/vite/shader-renderer.d.ts.map +1 -0
- package/dist/vite/shader-renderer.js +411 -0
- package/dist/vite/store-hooks.d.ts +12 -0
- package/dist/vite/store-hooks.d.ts.map +1 -0
- package/dist/vite/store-hooks.js +93 -0
- package/dist/vite/store.d.ts +75 -0
- package/dist/vite/store.d.ts.map +1 -0
- package/dist/vite/store.js +52 -0
- package/dist/vite/store.test.d.ts +6 -0
- package/dist/vite/store.test.d.ts.map +1 -0
- package/dist/vite/store.test.js +172 -0
- package/dist/vite/tweakpane-hook.d.ts +94 -0
- package/dist/vite/tweakpane-hook.d.ts.map +1 -0
- package/dist/vite/tweakpane-hook.js +450 -0
- package/dist/vite/vite-plugin.d.ts +28 -0
- package/dist/vite/vite-plugin.d.ts.map +1 -0
- package/dist/vite/vite-plugin.js +538 -0
- package/dist/vite/wave-gradient-shader.d.ts +41 -0
- package/dist/vite/wave-gradient-shader.d.ts.map +1 -0
- package/dist/vite/wave-gradient-shader.js +207 -0
- package/package.json +101 -24
- package/skills/egaki/SKILL.md +162 -1
- package/src/cli/cache-utils.ts +169 -0
- package/src/cli/cached-generate.test.ts +531 -0
- package/src/cli/cached-generate.ts +348 -0
- package/src/cli/cartesia-provider.ts +249 -0
- package/src/{cli.ts → cli/cli.ts} +836 -884
- package/src/cli/clone-generate.ts +202 -0
- package/src/{credentials.ts → cli/credentials.ts} +20 -0
- package/src/cli/elevenlabs-speech-provider.ts +243 -0
- package/src/cli/generate.test.ts +166 -0
- package/src/cli/generate.ts +912 -0
- package/src/cli/main.ts +8 -0
- package/src/{model-catalog.ts → cli/model-catalog.ts} +787 -58
- package/src/{models.ts → cli/models.ts} +65 -86
- package/src/cli/openai-speech-provider.ts +34 -0
- package/src/cli/separation-generate.ts +187 -0
- package/src/cli/speech-catalog.ts +253 -0
- package/src/cli/speech-generate.ts +275 -0
- package/src/cli/speech-models.ts +146 -0
- package/src/cli/speech-provider.test.ts +226 -0
- package/src/cli/transcription-catalog.ts +250 -0
- package/src/cli/transcription-generate.ts +214 -0
- package/src/cli/transcription-models.ts +136 -0
- package/src/cli/transcription-providers.ts +427 -0
- package/src/{xai-auth.ts → cli/xai-auth.ts} +1 -1
- package/src/vite/angled-screen.tsx +214 -0
- package/src/vite/app.tsx +197 -0
- package/src/vite/bands-shader.tsx +319 -0
- package/src/vite/code-block.tsx +939 -0
- package/src/vite/components.tsx +278 -0
- package/src/vite/dispersion-rings-shader.tsx +331 -0
- package/src/vite/easing-curves.test.ts +232 -0
- package/src/vite/easing-curves.ts +743 -0
- package/src/vite/generated-media-client.tsx +121 -0
- package/src/vite/keyframes.tsx +347 -0
- package/src/vite/layout-editor.tsx +709 -0
- package/src/vite/layout-transition.tsx +706 -0
- package/src/vite/liquid-gradient-shader.tsx +474 -0
- package/src/vite/mdx-client.tsx +420 -0
- package/src/vite/mdx-parse.ts +343 -0
- package/src/vite/mdx-provided-components.ts +19 -0
- package/src/vite/mdx-video.test.tsx +2219 -0
- package/src/vite/mdx-video.tsx +976 -0
- package/src/vite/media-components.tsx +473 -0
- package/src/vite/media-duration-store.ts +225 -0
- package/src/vite/motion-timing.ts +194 -0
- package/src/vite/player-page.tsx +1107 -0
- package/src/vite/render-client.ts +84 -0
- package/src/vite/sdk.ts +598 -0
- package/src/vite/server-components.tsx +241 -0
- package/src/vite/server-mdx.ts +285 -0
- package/src/vite/shader-renderer.tsx +535 -0
- package/src/vite/store-hooks.ts +117 -0
- package/src/vite/store.test.ts +202 -0
- package/src/vite/store.ts +115 -0
- package/src/vite/styles.css +21 -0
- package/src/vite/tweakpane-hook.tsx +593 -0
- package/src/vite/virtual-modules.d.ts +30 -0
- package/src/vite/vite-plugin.ts +584 -0
- package/src/vite/wave-gradient-shader.tsx +253 -0
- package/README.md +0 -370
- package/dist/antigravity-auth.d.ts +0 -15
- package/dist/antigravity-auth.d.ts.map +0 -1
- package/dist/antigravity-auth.js +0 -544
- package/dist/antigravity-image.d.ts +0 -11
- package/dist/antigravity-image.d.ts.map +0 -1
- package/dist/antigravity-image.js +0 -285
- package/dist/chatgpt-auth.d.ts.map +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/credentials.d.ts.map +0 -1
- package/dist/gateway-model-candidates.generated.d.ts +0 -11
- package/dist/gateway-model-candidates.generated.d.ts.map +0 -1
- package/dist/gateway-model-candidates.generated.js +0 -64
- package/dist/login.d.ts.map +0 -1
- package/dist/model-catalog.d.ts.map +0 -1
- package/dist/models.d.ts.map +0 -1
- package/dist/open-browser.d.ts.map +0 -1
- package/dist/subscription.d.ts.map +0 -1
- package/dist/video-model-catalog.d.ts.map +0 -1
- package/dist/xai-auth.d.ts.map +0 -1
- /package/dist/{chatgpt-auth.d.ts → cli/chatgpt-auth.d.ts} +0 -0
- /package/dist/{chatgpt-auth.js → cli/chatgpt-auth.js} +0 -0
- /package/dist/{credentials.d.ts → cli/credentials.d.ts} +0 -0
- /package/dist/{login.d.ts → cli/login.d.ts} +0 -0
- /package/dist/{login.js → cli/login.js} +0 -0
- /package/dist/{open-browser.d.ts → cli/open-browser.d.ts} +0 -0
- /package/dist/{open-browser.js → cli/open-browser.js} +0 -0
- /package/dist/{subscription.d.ts → cli/subscription.d.ts} +0 -0
- /package/dist/{subscription.js → cli/subscription.js} +0 -0
- /package/dist/{video-model-catalog.d.ts → cli/video-model-catalog.d.ts} +0 -0
- /package/dist/{video-model-catalog.js → cli/video-model-catalog.js} +0 -0
- /package/dist/{xai-auth.d.ts → cli/xai-auth.d.ts} +0 -0
- /package/src/{chatgpt-auth.ts → cli/chatgpt-auth.ts} +0 -0
- /package/src/{login.ts → cli/login.ts} +0 -0
- /package/src/{open-browser.ts → cli/open-browser.ts} +0 -0
- /package/src/{subscription.ts → cli/subscription.ts} +0 -0
- /package/src/{video-model-catalog.ts → cli/video-model-catalog.ts} +0 -0
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* WaveGradientShader — animated noise-driven gradient with wave distortion.
|
|
5
|
+
*
|
|
6
|
+
* Port of Framer's GradientWave shader module for Remotion/egaki.
|
|
7
|
+
* Original source:
|
|
8
|
+
* https://framerusercontent.com/modules/qbISo04IgXwHvt1f08Bw/PqHx9uwswPwEixzYIrpZ/GradientWave.js
|
|
9
|
+
*
|
|
10
|
+
* A 4-color gradient is warped through seed-dependent noise rotation and
|
|
11
|
+
* wave distortion. The seed controls flow directions, harmonic frequencies,
|
|
12
|
+
* and phase offsets, so each seed produces a visually distinct pattern.
|
|
13
|
+
* Two layers (rotated at seed-derived angles) are blended with a vertical
|
|
14
|
+
* smoothstep, producing a rich organic gradient that evolves over time.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type { CSSProperties } from 'react'
|
|
18
|
+
import { defineShader } from './shader-renderer.tsx'
|
|
19
|
+
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
// Props
|
|
22
|
+
// ---------------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
export interface WaveGradientShaderProps {
|
|
25
|
+
/** Color palette for the gradient (max 4). Hex strings like "#FF3624". */
|
|
26
|
+
colors?: string[]
|
|
27
|
+
/** Seed for noise and flow variation. Different seeds = different patterns. */
|
|
28
|
+
seed?: number
|
|
29
|
+
/** Animation speed multiplier. 0 = frozen, 1.5 = default, 3 = fast. */
|
|
30
|
+
waveSpeed?: number
|
|
31
|
+
/** Horizontal wave frequency. Controls how many waves fit across the X axis. */
|
|
32
|
+
waveFreqX?: number
|
|
33
|
+
/** Vertical wave frequency. Controls how many waves fit across the Y axis. */
|
|
34
|
+
waveFreqY?: number
|
|
35
|
+
/** Wave propagation angle in degrees. Rotates the entire wave pattern. */
|
|
36
|
+
waveAngle?: number
|
|
37
|
+
/** Wave distortion amplitude. Higher = more extreme warping. */
|
|
38
|
+
waveAmplitude?: number
|
|
39
|
+
/** Smoothstep mask softness. Controls how sharply wave edges blend. */
|
|
40
|
+
maskSoftness?: number
|
|
41
|
+
/** Mix amount between rotated noise and wave warp. 0 = pure rotation, 1 = pure wave. */
|
|
42
|
+
blendAmount?: number
|
|
43
|
+
style?: CSSProperties
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// ---------------------------------------------------------------------------
|
|
47
|
+
// Fragment shader body
|
|
48
|
+
// ---------------------------------------------------------------------------
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Raw GLSL fragment body from GradientWave.js.
|
|
52
|
+
* The defineShader engine prepends #version, precision, v_uv, fragColor,
|
|
53
|
+
* uniform declarations, and built-in uniforms automatically.
|
|
54
|
+
*
|
|
55
|
+
* Algorithm overview:
|
|
56
|
+
* 1. Noise rotation: seed-derived hash noise determines a rotation angle
|
|
57
|
+
* per pixel, creating an organic swirling base pattern
|
|
58
|
+
* 2. Wave warp: UV coordinates are distorted by a seed-modulated wave
|
|
59
|
+
* function with configurable frequency, angle, amplitude, and softness
|
|
60
|
+
* 3. Layer blend: the rotated UVs and warped UVs are mixed via blendAmount,
|
|
61
|
+
* then two color layers (each a smoothstep gradient between 2 colors)
|
|
62
|
+
* are combined with a vertical smoothstep for the final output
|
|
63
|
+
* 4. Tone mapping: a subtle S-curve (col*col + 0.5*sqrt(col)) is mixed in
|
|
64
|
+
* at 30% to add richness
|
|
65
|
+
*/
|
|
66
|
+
const FRAGMENT_SOURCE = `
|
|
67
|
+
#define S(a,b,t) smoothstep(a,b,t)
|
|
68
|
+
|
|
69
|
+
mat2 Rot(float a) {
|
|
70
|
+
float s = sin(a), c = cos(a);
|
|
71
|
+
return mat2(c, -s, s, c);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
vec2 hash(vec2 p) {
|
|
75
|
+
float s = u_seed;
|
|
76
|
+
vec2 k1 = vec2(2127.1 + s * 13.37, 81.17 + s * 7.31);
|
|
77
|
+
vec2 k2 = vec2(1269.5 + s * 11.13, 283.37 + s * 5.79);
|
|
78
|
+
p = vec2(dot(p, k1), dot(p, k2));
|
|
79
|
+
return fract(sin(p) * (43758.5453 + s * 1.618));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
float noise(in vec2 p) {
|
|
83
|
+
vec2 i = floor(p);
|
|
84
|
+
vec2 f = fract(p);
|
|
85
|
+
vec2 u = f * f * (3.0 - 2.0 * f);
|
|
86
|
+
float n = mix(
|
|
87
|
+
mix(dot(-1.0 + 2.0 * hash(i), f),
|
|
88
|
+
dot(-1.0 + 2.0 * hash(i + vec2(1.0, 0.0)), f - vec2(1.0, 0.0)), u.x),
|
|
89
|
+
mix(dot(-1.0 + 2.0 * hash(i + vec2(0.0, 1.0)), f - vec2(0.0, 1.0)),
|
|
90
|
+
dot(-1.0 + 2.0 * hash(i + vec2(1.0, 1.0)), f - vec2(1.0, 1.0)), u.x),
|
|
91
|
+
u.y
|
|
92
|
+
);
|
|
93
|
+
return 0.5 + 0.5 * n;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
vec3 getColor(int idx) {
|
|
97
|
+
if (u_colors_length < 1) return vec3(0.0);
|
|
98
|
+
int safeIdx = clamp(idx, 0, u_colors_length - 1);
|
|
99
|
+
return u_colors[safeIdx].rgb;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
float seedF(float base) {
|
|
103
|
+
return base * (1.0 + 0.5 * sin(u_seed * 3.17 + base));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
vec2 warpUV(vec2 uv) {
|
|
107
|
+
float t = u_time * u_waveSpeed;
|
|
108
|
+
|
|
109
|
+
float angleOffset = sin(u_seed * 2.73) * 30.0;
|
|
110
|
+
mat2 dirRot = Rot(radians(u_waveAngle + angleOffset));
|
|
111
|
+
vec2 ruv = dirRot * uv;
|
|
112
|
+
|
|
113
|
+
float fxMod = seedF(u_waveFreqX);
|
|
114
|
+
float fyMod = seedF(u_waveFreqY);
|
|
115
|
+
|
|
116
|
+
float phaseX = fract(sin(u_seed * 7.19) * 437.58) * 6.2832;
|
|
117
|
+
float phaseY = fract(cos(u_seed * 3.41) * 291.37) * 6.2832;
|
|
118
|
+
|
|
119
|
+
// Core wave with seed-dependent harmonics
|
|
120
|
+
float harmonic = sin(u_seed * 1.23) * 0.5;
|
|
121
|
+
float a = fyMod * ruv.y - sin(ruv.x * fxMod + ruv.y - t + phaseX);
|
|
122
|
+
a += harmonic * sin(ruv.x * fxMod * 2.0 + ruv.y * 0.5 + t * 0.7 + phaseY);
|
|
123
|
+
|
|
124
|
+
// Smoothstep mask
|
|
125
|
+
a = smoothstep(
|
|
126
|
+
cos(a) * u_maskSoftness,
|
|
127
|
+
sin(a) * u_maskSoftness + 3.,
|
|
128
|
+
cos(a - fyMod * ruv.y) - sin(a - fxMod * ruv.x)
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
a *= u_waveAmplitude;
|
|
132
|
+
|
|
133
|
+
uv = cos(a) * uv + sin(a) * vec2(-uv.y, uv.x);
|
|
134
|
+
return uv;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
void main() {
|
|
138
|
+
vec2 fragCoord = v_uv * u_resolution;
|
|
139
|
+
vec2 uv = fragCoord / u_resolution.xy;
|
|
140
|
+
float ratio = u_resolution.x / u_resolution.y;
|
|
141
|
+
float t = u_time * u_waveSpeed;
|
|
142
|
+
|
|
143
|
+
vec2 tuv = uv - 0.5;
|
|
144
|
+
|
|
145
|
+
vec2 seedShift = vec2(sin(u_seed * 4.37), cos(u_seed * 5.91)) * 100.0;
|
|
146
|
+
float degree = noise(vec2(t * 0.1, tuv.x * tuv.y) + seedShift);
|
|
147
|
+
tuv.y *= 1.0 / ratio;
|
|
148
|
+
tuv *= Rot(radians((degree - 0.5) * 720.0 + 180.0));
|
|
149
|
+
tuv.y *= ratio;
|
|
150
|
+
|
|
151
|
+
// Seed-rotate uv2 before warping
|
|
152
|
+
vec2 uv2 = (fragCoord * 2.0 - u_resolution.xy) / (u_resolution.x + u_resolution.y) * 2.0;
|
|
153
|
+
float preRotAngle = fract(sin(u_seed * 5.63) * 173.29) * 6.2832;
|
|
154
|
+
uv2 *= Rot(preRotAngle);
|
|
155
|
+
vec2 warped = warpUV(uv2) * 0.5 + 0.5;
|
|
156
|
+
|
|
157
|
+
vec2 blendUV = mix(tuv, warped - 0.5, u_blendAmount);
|
|
158
|
+
|
|
159
|
+
float layerRot1 = -5.0 + sin(u_seed * 1.83) * 20.0;
|
|
160
|
+
float layerRot2 = 10.0 + cos(u_seed * 2.47) * 20.0;
|
|
161
|
+
|
|
162
|
+
vec3 c0 = getColor(0);
|
|
163
|
+
vec3 c1 = getColor(1);
|
|
164
|
+
vec3 c2 = getColor(2);
|
|
165
|
+
vec3 c3 = getColor(3);
|
|
166
|
+
|
|
167
|
+
vec3 layer1 = mix(c0, c2, S(-0.3, 0.3, (blendUV * Rot(radians(layerRot1))).x));
|
|
168
|
+
vec3 layer2 = mix(c3, c1, S(-0.3, 0.3, (blendUV * Rot(radians(layerRot2))).x));
|
|
169
|
+
vec3 col = mix(layer1, layer2, S(0.3, -0.3, blendUV.y));
|
|
170
|
+
|
|
171
|
+
col = mix(col, col * col + 0.5 * sqrt(col), 0.3);
|
|
172
|
+
|
|
173
|
+
fragColor = vec4(col, 1.0);
|
|
174
|
+
}
|
|
175
|
+
`
|
|
176
|
+
|
|
177
|
+
// ---------------------------------------------------------------------------
|
|
178
|
+
// Component
|
|
179
|
+
// ---------------------------------------------------------------------------
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Property controls matching the original Framer GradientWave module.
|
|
183
|
+
* Ranges, defaults, and step sizes are preserved from the original.
|
|
184
|
+
*/
|
|
185
|
+
export const WaveGradientShader = defineShader({
|
|
186
|
+
title: 'WaveGradientShader',
|
|
187
|
+
fragment: FRAGMENT_SOURCE,
|
|
188
|
+
propertyControls: {
|
|
189
|
+
colors: {
|
|
190
|
+
type: 'array',
|
|
191
|
+
control: { type: 'color' },
|
|
192
|
+
maxCount: 4,
|
|
193
|
+
maxVisible: 4,
|
|
194
|
+
defaultValue: ['#FF3624', '#9EABFF', '#FFAE00', '#E29EFF'],
|
|
195
|
+
},
|
|
196
|
+
seed: {
|
|
197
|
+
type: 'number',
|
|
198
|
+
defaultValue: 32,
|
|
199
|
+
min: 0,
|
|
200
|
+
max: 100,
|
|
201
|
+
step: 1,
|
|
202
|
+
},
|
|
203
|
+
waveSpeed: {
|
|
204
|
+
type: 'number',
|
|
205
|
+
defaultValue: 1.5,
|
|
206
|
+
min: 0,
|
|
207
|
+
max: 3,
|
|
208
|
+
step: 0.01,
|
|
209
|
+
},
|
|
210
|
+
waveFreqX: {
|
|
211
|
+
type: 'number',
|
|
212
|
+
defaultValue: 0.9,
|
|
213
|
+
min: 0.1,
|
|
214
|
+
max: 6,
|
|
215
|
+
step: 0.1,
|
|
216
|
+
},
|
|
217
|
+
waveFreqY: {
|
|
218
|
+
type: 'number',
|
|
219
|
+
defaultValue: 6,
|
|
220
|
+
min: 0.1,
|
|
221
|
+
max: 6,
|
|
222
|
+
step: 0.1,
|
|
223
|
+
},
|
|
224
|
+
waveAngle: {
|
|
225
|
+
type: 'number',
|
|
226
|
+
defaultValue: 105,
|
|
227
|
+
min: -180,
|
|
228
|
+
max: 180,
|
|
229
|
+
step: 1,
|
|
230
|
+
},
|
|
231
|
+
waveAmplitude: {
|
|
232
|
+
type: 'number',
|
|
233
|
+
defaultValue: 2.1,
|
|
234
|
+
min: 0.5,
|
|
235
|
+
max: 3,
|
|
236
|
+
step: 0.01,
|
|
237
|
+
},
|
|
238
|
+
maskSoftness: {
|
|
239
|
+
type: 'number',
|
|
240
|
+
defaultValue: 0.74,
|
|
241
|
+
min: 0.01,
|
|
242
|
+
max: 2,
|
|
243
|
+
step: 0.01,
|
|
244
|
+
},
|
|
245
|
+
blendAmount: {
|
|
246
|
+
type: 'number',
|
|
247
|
+
defaultValue: 0.54,
|
|
248
|
+
min: 0,
|
|
249
|
+
max: 1,
|
|
250
|
+
step: 0.01,
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
}) as React.FC<WaveGradientShaderProps>
|
package/README.md
DELETED
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
# egaki
|
|
2
|
-
|
|
3
|
-
Generate AI images and videos from the terminal with one command.
|
|
4
|
-
|
|
5
|
-
`egaki` is a TypeScript CLI built on the Vercel AI SDK and goke. It supports
|
|
6
|
-
Google Imagen, Gemini image-capable models, video generation (Veo, Kling, Wan,
|
|
7
|
-
Bytedance Seedance, xAI Grok), and model discovery with pricing.
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
pnpm add -g egaki
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Quick start
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
egaki login
|
|
19
|
-
egaki image "a watercolor fox reading a map" -o fox.png
|
|
20
|
-
egaki video "a paper boat drifting on a calm lake at sunrise" -o boat.mp4
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
### Quick start with ChatGPT auth
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
egaki login --provider chatgpt
|
|
27
|
-
egaki image "a dreamy studio ghibli style bakery at sunrise" -m gpt-image-1.5 -o bakery.png
|
|
28
|
-
egaki image "change the red jacket to a blue jacket" -m gpt-image-1.5 --input portrait.png -o portrait-blue.png
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## CLI examples
|
|
32
|
-
|
|
33
|
-
### Generate an image from text
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
egaki image "cinematic mountain village at sunrise" -o village.png
|
|
37
|
-
egaki image "isometric floating city, detailed, soft colors" -m imagen-4.0-generate-001
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Edit with an input image
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
egaki image "add a red scarf and make it winter" --input portrait.jpg -o portrait-winter.png
|
|
44
|
-
egaki image "turn this into a manga panel" --input https://example.com/photo.jpg -o manga.png
|
|
45
|
-
egaki image "change the red square to a blue square" -m gpt-image-1.5 --input input.png -o output.png
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### Inpainting with a mask
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
egaki image "replace the sky with dramatic storm clouds" --input landscape.png --mask mask.png -o storm.png
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Generate multiple images
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
egaki image "minimal logo concepts for a cat cafe" -n 4 -o logo.png
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Control composition
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
egaki image "cyberpunk alley at night" --aspect-ratio 16:9
|
|
64
|
-
egaki image "polaroid-style travel photo" --aspect-ratio 4:5
|
|
65
|
-
egaki image "wide landscape matte painting" -m gpt-image-1.5 --aspect-ratio 3:2 -o wide.png
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Use Google Cloud billing via Vertex AI
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
egaki login --provider vertex --key AIza...
|
|
72
|
-
egaki image "editorial sneaker photo on white seamless" -m vertex/imagen-4.0-generate-001 -o sneaker.png
|
|
73
|
-
egaki video "storm over mountains" -m vertex/veo-3.1-fast-generate-001 --duration 6 -o storm.mp4
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Pipe image output to other tools
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
egaki image "flat icon of a fox" --stdout | magick - -resize 512x512 fox-icon.png
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
### Generate a video from text
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
egaki video "a paper boat drifting on a calm lake at sunrise" -o boat.mp4
|
|
88
|
-
egaki video "timelapse of a stormy sea, cinematic" -m veo-3.1-generate-001 --duration 8 -o storm.mp4
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### Generate with a cheap model
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
# Kling v2.5 Turbo — fast and inexpensive
|
|
95
|
-
egaki video "a cat walking on a rooftop at night" -m klingai/kling-v2.5-turbo-t2v --duration 5 -o cat.mp4
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### Image-to-video
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
# Animate a still image (model must support i2v)
|
|
102
|
-
egaki video "slowly animate the clouds" --input photo.jpg -m klingai/kling-v2.6-i2v -o animated.mp4
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Control resolution and aspect ratio
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
egaki video "aerial drone shot over a city grid" \
|
|
109
|
-
-m veo-3.1-fast-generate-001 \
|
|
110
|
-
--aspect-ratio 16:9 \
|
|
111
|
-
--resolution 1080p \
|
|
112
|
-
--duration 6 \
|
|
113
|
-
-o city.mp4
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### Generate multiple videos
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
egaki video "waves crashing on cliffs at golden hour" -n 2 -o waves.mp4
|
|
120
|
-
# writes waves.mp4 and waves-1.mp4
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Pipe video output to other tools
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
egaki video "looping rain animation" --stdout | ffmpeg -i pipe:0 -vf fps=12 rain.gif
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
### xAI Grok image generation
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
# Basic text-to-image
|
|
135
|
-
egaki image "a fox wearing armor in a misty forest" -m grok-imagine-image -o fox.png
|
|
136
|
-
|
|
137
|
-
# High quality + 2K resolution
|
|
138
|
-
egaki image "product photo of a ceramic vase on linen" \
|
|
139
|
-
-m grok-imagine-image-pro \
|
|
140
|
-
--quality high \
|
|
141
|
-
--resolution 2k \
|
|
142
|
-
-o vase.png
|
|
143
|
-
|
|
144
|
-
# Edit an existing image
|
|
145
|
-
egaki image "add dramatic storm clouds to the sky" \
|
|
146
|
-
-m grok-imagine-image \
|
|
147
|
-
--input landscape.jpg \
|
|
148
|
-
-o landscape-storm.png
|
|
149
|
-
|
|
150
|
-
# Generate multiple variations
|
|
151
|
-
egaki image "abstract geometric pattern" -m grok-imagine-image -n 3 -o pattern.png
|
|
152
|
-
# writes pattern-0.png, pattern-1.png, pattern-2.png
|
|
153
|
-
|
|
154
|
-
# Control aspect ratio and output format
|
|
155
|
-
egaki image "vertical phone wallpaper, aurora borealis" \
|
|
156
|
-
-m grok-imagine-image \
|
|
157
|
-
--aspect-ratio 9:16 \
|
|
158
|
-
--output-format jpeg \
|
|
159
|
-
-o wallpaper.jpg
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### xAI Grok video generation
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
# Basic text-to-video
|
|
166
|
-
egaki video "a paper airplane gliding through clouds" \
|
|
167
|
-
-m grok-imagine-video \
|
|
168
|
-
--duration 5 \
|
|
169
|
-
-o airplane.mp4
|
|
170
|
-
|
|
171
|
-
# Text-to-video with resolution and aspect ratio
|
|
172
|
-
egaki video "cinematic drone shot over a city at sunset" \
|
|
173
|
-
-m grok-imagine-video \
|
|
174
|
-
--duration 8 \
|
|
175
|
-
--resolution 720p \
|
|
176
|
-
--aspect-ratio 16:9 \
|
|
177
|
-
-o city.mp4
|
|
178
|
-
|
|
179
|
-
# Image-to-video (animate a still image)
|
|
180
|
-
egaki video "slowly pan across the scene with gentle wind" \
|
|
181
|
-
-m grok-imagine-video \
|
|
182
|
-
--input photo.jpg \
|
|
183
|
-
--duration 5 \
|
|
184
|
-
-o animated.mp4
|
|
185
|
-
|
|
186
|
-
# Video editing (modify an existing video — pass the source via --input)
|
|
187
|
-
egaki video "make it look like a watercolor painting" \
|
|
188
|
-
-m grok-imagine-video \
|
|
189
|
-
--mode edit-video \
|
|
190
|
-
--input ./original.mp4 \
|
|
191
|
-
-o edited.mp4
|
|
192
|
-
|
|
193
|
-
# Video extension (continue from last frame)
|
|
194
|
-
egaki video "the camera keeps moving forward" \
|
|
195
|
-
-m grok-imagine-video \
|
|
196
|
-
--mode extend-video \
|
|
197
|
-
--input ./clip.mp4 \
|
|
198
|
-
-o extended.mp4
|
|
199
|
-
|
|
200
|
-
# Reference-to-video (R2V): generate a video guided by 1-7 reference images.
|
|
201
|
-
# The images act as style and content references (not as the first frame).
|
|
202
|
-
# Accepts local files or URLs; local files are uploaded automatically.
|
|
203
|
-
egaki video "the model walks down a white runway wearing the outfit from the reference" \
|
|
204
|
-
-m grok-imagine-video \
|
|
205
|
-
--mode reference-to-video \
|
|
206
|
-
--reference-images ./model-face.jpg \
|
|
207
|
-
--reference-images ./outfit.jpg \
|
|
208
|
-
--duration 8 \
|
|
209
|
-
-o runway.mp4
|
|
210
|
-
|
|
211
|
-
# Low-res draft for quick iteration
|
|
212
|
-
egaki video "test animation concept" \
|
|
213
|
-
-m grok-imagine-video \
|
|
214
|
-
--duration 3 \
|
|
215
|
-
--resolution 480p \
|
|
216
|
-
-o draft.mp4
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### xAI Grok auth
|
|
220
|
-
|
|
221
|
-
```bash
|
|
222
|
-
# Option 1: direct API key
|
|
223
|
-
egaki login --provider xai --key xai-...
|
|
224
|
-
|
|
225
|
-
# Option 2: Grok Build subscription (browser OAuth)
|
|
226
|
-
egaki login --provider xai-oauth
|
|
227
|
-
|
|
228
|
-
# Check auth status
|
|
229
|
-
egaki login --show
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
### Discover models and pricing
|
|
235
|
-
|
|
236
|
-
```bash
|
|
237
|
-
egaki models
|
|
238
|
-
egaki models --type video
|
|
239
|
-
egaki models --type image
|
|
240
|
-
egaki models --provider google
|
|
241
|
-
egaki models --json
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
---
|
|
245
|
-
|
|
246
|
-
### Advanced image examples
|
|
247
|
-
|
|
248
|
-
```bash
|
|
249
|
-
# Deterministic result (models that support seed)
|
|
250
|
-
egaki image "studio product shot of a ceramic mug" \
|
|
251
|
-
-m imagen-4.0-generate-001 \
|
|
252
|
-
--seed 42 \
|
|
253
|
-
-o mug-seed-42.png
|
|
254
|
-
|
|
255
|
-
# High quality Gemini image generation with 4K output
|
|
256
|
-
egaki image "architectural concept art, brutalist library interior" \
|
|
257
|
-
-m gemini-2.5-flash-image \
|
|
258
|
-
--image-size 4K \
|
|
259
|
-
--aspect-ratio 16:9 \
|
|
260
|
-
-o library-4k.png
|
|
261
|
-
|
|
262
|
-
# Multi-reference edit (pass --input multiple times)
|
|
263
|
-
egaki image "blend style from first image and color palette from second" \
|
|
264
|
-
--input style-reference.jpg \
|
|
265
|
-
--input palette-reference.jpg \
|
|
266
|
-
-m nano-banana-pro-preview \
|
|
267
|
-
-o hybrid-style.png
|
|
268
|
-
|
|
269
|
-
# JSON mode for automation/pipelines
|
|
270
|
-
egaki image "futuristic sneaker concept" \
|
|
271
|
-
-m gpt-image-1.5 \
|
|
272
|
-
--json \
|
|
273
|
-
-o sneaker.png
|
|
274
|
-
|
|
275
|
-
# Batch generation with indexed output names
|
|
276
|
-
egaki image "mascot variations, flat vector look" \
|
|
277
|
-
-m gpt-image-1-mini \
|
|
278
|
-
-n 6 \
|
|
279
|
-
-o mascot.png
|
|
280
|
-
# writes mascot-0.png ... mascot-5.png
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
## Model quick reference
|
|
284
|
-
|
|
285
|
-
### Image models
|
|
286
|
-
|
|
287
|
-
| Model ID | Best for | Example command |
|
|
288
|
-
| --- | --- | --- |
|
|
289
|
-
| `imagen-4.0-ultra-generate-001` | High-quality prompt-to-image with seed + ratio | `egaki image "luxury perfume ad on marble" -m imagen-4.0-ultra-generate-001 --aspect-ratio 3:4 --seed 7 -o perfume.png` |
|
|
290
|
-
| `gemini-3.1-flash-image-preview` | Fast, cheap text+image edits with wide aspect-ratio support | `egaki image "turn into manga splash page" -m gemini-3.1-flash-image-preview --input portrait.jpg --aspect-ratio 4:1 -o manga-wide.png` |
|
|
291
|
-
| `nano-banana-pro-preview` | Highest-fidelity Google text+image output | `egaki image "fashion editorial, dramatic rim light" -m nano-banana-pro-preview --input model.jpg --image-size 2K -o editorial.png` |
|
|
292
|
-
| `gpt-image-1.5` | OpenAI image generation with strong editing/inpainting | `egaki image "replace background with neon city" -m gpt-image-1.5 --input product.png --mask bg-mask.png -o product-neon.png` |
|
|
293
|
-
| `fal-ai/flux/schnell` | Very fast low-cost ideation batches | `egaki image "logo sketch, geometric fox" -m fal-ai/flux/schnell -n 8 -o fox-logo.png` |
|
|
294
|
-
|
|
295
|
-
### Video models
|
|
296
|
-
|
|
297
|
-
| Model ID | Best for | Example command |
|
|
298
|
-
| --- | --- | --- |
|
|
299
|
-
| `veo-3.1-generate-001` | Highest quality video with audio, up to 4K | `egaki video "rainy Tokyo street at night" -m veo-3.1-generate-001 --duration 8 -o tokyo.mp4` |
|
|
300
|
-
| `veo-3.1-fast-generate-001` | Fast Veo with 720p–4K, good for iteration | `egaki video "abstract paint patterns" -m veo-3.1-fast-generate-001 --duration 5 -o paint.mp4` |
|
|
301
|
-
| `vertex/veo-3.1-generate-001` | Same as above, routed through Vertex AI | `egaki video "rainy Tokyo street" -m vertex/veo-3.1-generate-001 --duration 8 -o tokyo.mp4` |
|
|
302
|
-
| `klingai/kling-v2.5-turbo-t2v` | Cheap, fast Kling text-to-video | `egaki video "a paper boat on a pond" -m klingai/kling-v2.5-turbo-t2v --duration 5 -o boat.mp4` |
|
|
303
|
-
| `bytedance/seedance-v1.5-pro` | Bytedance, audio support, three resolutions | `egaki video "timelapse of clouds above mountains" -m bytedance/seedance-v1.5-pro -o clouds.mp4` |
|
|
304
|
-
| `grok-imagine-video` | xAI video with editing, extension, R2V | `egaki video "a dog catching a frisbee" -m grok-imagine-video --duration 5 -o dog.mp4` |
|
|
305
|
-
|
|
306
|
-
## Feature support by model family
|
|
307
|
-
|
|
308
|
-
- **Google Imagen (`imagen-*`)**: supports `--seed`, `--aspect-ratio`, `--input`, `--mask`, `-n`
|
|
309
|
-
- **Google Gemini image models**: supports `--input`, `--aspect-ratio`, `--image-size`; usually no `--seed`
|
|
310
|
-
- **OpenAI image models**: strong editing and inpainting; size controls are model-specific
|
|
311
|
-
- **BFL image models (`flux-*`)**: Kontext/Pro variants via AI Gateway subscription
|
|
312
|
-
- **Recraft models (`recraft-*`)**: v2/v3/v4 families available via AI Gateway subscription
|
|
313
|
-
- **xAI image models (`grok-imagine-*`)**: `--quality`, `--resolution`, `--output-format`, `--input` for editing, `-n` for batches. Auth via API key or Grok Build OAuth
|
|
314
|
-
- **Vertex models (`vertex/*`)**: same models as Google AI Studio, routed through Vertex AI / Google Cloud billing
|
|
315
|
-
- **Google Veo video models**: up to 4K, audio optional, duration 4–8s
|
|
316
|
-
- **Kling video models**: mode (std/pro), audio on v2.6+, image-to-video support
|
|
317
|
-
- **Bytedance Seedance**: 480p–1080p, audio support on v1.5-pro
|
|
318
|
-
- **xAI Grok video (`grok-imagine-video`)**: 480p–720p, 1–15s, i2v, video editing, video extension, R2V from reference images
|
|
319
|
-
|
|
320
|
-
## Subscription and usage
|
|
321
|
-
|
|
322
|
-
egaki supports **both** authentication modes:
|
|
323
|
-
|
|
324
|
-
- **BYOK (bring your own keys):** add provider keys with `egaki login` per provider.
|
|
325
|
-
- **ChatGPT auth:** log in with `egaki login --provider chatgpt` to use the ChatGPT/Codex backend for supported OpenAI image generation and editing flows.
|
|
326
|
-
- **xAI Grok Build auth:** log in with `egaki login --provider xai-oauth` to use your Grok Build subscription for xAI image and video generation.
|
|
327
|
-
- **Egaki subscription:** use one `egaki_...` key to access all supported models without managing keys for each provider.
|
|
328
|
-
- **Google vs Vertex:** bare model IDs (e.g. `imagen-4.0-generate-001`) use Google AI Studio. Prefix with `vertex/` (e.g. `vertex/imagen-4.0-generate-001`) to route through Vertex AI / Google Cloud billing.
|
|
329
|
-
|
|
330
|
-
```bash
|
|
331
|
-
# Subscribe and get a checkout URL
|
|
332
|
-
egaki subscribe --email user@example.com --plan pro
|
|
333
|
-
|
|
334
|
-
# Subscribe without email prefill
|
|
335
|
-
egaki subscribe --plan pro
|
|
336
|
-
|
|
337
|
-
# Save your Egaki key after checkout
|
|
338
|
-
egaki login --provider egaki --key egaki_...
|
|
339
|
-
|
|
340
|
-
# BYOK examples (direct provider keys)
|
|
341
|
-
egaki login --provider google --key AIza...
|
|
342
|
-
egaki login --provider vertex --key AIza...
|
|
343
|
-
|
|
344
|
-
# ChatGPT OAuth for Codex-backed image generation/editing
|
|
345
|
-
egaki login --provider chatgpt
|
|
346
|
-
egaki image "turn this product shot into a clay render" -m gpt-image-1.5 --input product.png -o product-clay.png
|
|
347
|
-
|
|
348
|
-
# Check subscription usage / cancel
|
|
349
|
-
egaki usage
|
|
350
|
-
egaki unsubscribe
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
## Help
|
|
354
|
-
|
|
355
|
-
```bash
|
|
356
|
-
egaki --help
|
|
357
|
-
egaki image --help
|
|
358
|
-
egaki video --help
|
|
359
|
-
egaki models --help
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
## Auth and billing
|
|
363
|
-
|
|
364
|
-
- `egaki login` stores provider keys in `~/.config/egaki/credentials.json`.
|
|
365
|
-
- `egaki subscribe`, `egaki usage`, and `egaki unsubscribe` manage Egaki plans.
|
|
366
|
-
- Video costs are tracked per-second based on model, resolution, and duration.
|
|
367
|
-
|
|
368
|
-
## License
|
|
369
|
-
|
|
370
|
-
MIT
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type AntigravityAuth = {
|
|
2
|
-
email?: string;
|
|
3
|
-
refresh: string;
|
|
4
|
-
access: string;
|
|
5
|
-
expires: number;
|
|
6
|
-
projectId?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare function refreshAntigravityToken(auth: AntigravityAuth): Promise<AntigravityAuth | Error>;
|
|
9
|
-
export declare function getValidAntigravityAccessToken(auth: AntigravityAuth, onRefresh?: (updated: AntigravityAuth) => void): Promise<{
|
|
10
|
-
accessToken: string;
|
|
11
|
-
projectId: string;
|
|
12
|
-
} | Error>;
|
|
13
|
-
export declare function antigravityOAuthLogin(): Promise<AntigravityAuth>;
|
|
14
|
-
export declare function antigravityOAuthFromCallbackUrl(callbackUrl: string): Promise<AntigravityAuth>;
|
|
15
|
-
//# sourceMappingURL=antigravity-auth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"antigravity-auth.d.ts","sourceRoot":"","sources":["../src/antigravity-auth.ts"],"names":[],"mappings":"AAgCA,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAqUD,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,GAAG,KAAK,CAAC,CAuCrG;AAED,wBAAsB,8BAA8B,CAClD,IAAI,EAAE,eAAe,EACrB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,GAC7C,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,KAAK,CAAC,CAoD7D;AAsKD,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,eAAe,CAAC,CAsCtE;AAED,wBAAsB,+BAA+B,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAiBnG"}
|