@velven/cli 0.2.1 → 0.4.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 +109 -0
- package/README.md +238 -70
- package/dist/velven.js +2313 -504
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,114 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
- `velven create send` lets Velven pick how much to do when you pass neither `--effort` nor `--plan`/`--no-plan`:
|
|
6
|
+
a quick change, a full build it playtests and fixes, or a plan when you ask for one. Its line before sending reads "Velven picks how much to do: about 20 credits for a small change, at most
|
|
7
|
+
1500 held. You have 3200 available.", or on a project that never built "about 51 credits for a first build (its
|
|
8
|
+
pictures are made before the first preview)". With `--effort` or a plan flag the turn is as before; a later
|
|
9
|
+
message with neither flag is Velven's pick again (the help no longer says the flags are kept for every message).
|
|
10
|
+
- `--build` sends the message as Build it: no more questions, Velven fills in what the plan leaves open. Words beyond
|
|
11
|
+
a bare build (`--build "make it 2D"`) change the plan first, then it is built; `--build "Build it"` builds the plan as
|
|
12
|
+
it is, at once.
|
|
13
|
+
- `--ref <file>` (up to 4) uploads a reference picture (up to 10 MB) to the project and attaches it to the message:
|
|
14
|
+
the picture goes straight to Velven's storage through a link, then Velven keeps it. `--ref ref-3` sends a picture
|
|
15
|
+
the project already keeps, with no upload. A refused picture stops the CLI with Velven's sentence and exit 4, before
|
|
16
|
+
anything is sent; one over 10 MB is refused before it is uploaded.
|
|
17
|
+
- Following a turn Velven routes says "Started: Velven is choosing the work", then what it chose in words, with the
|
|
18
|
+
work and the reason on standard error. A question prints with its numbered choices and the commands that answer it.
|
|
19
|
+
- `velven create refs` lists the project's reference pictures (id, when added, size, how many messages carried each),
|
|
20
|
+
and `velven create refs rm <ref-n>` deletes one. A send whose picture finds the project's 16 full names both.
|
|
21
|
+
- A question Velven asks is printed once, with its choices: the turn's reply, the same question, is no longer printed
|
|
22
|
+
again at the end. `velven create watch <turn>` names the turn's own project in how to answer it, not the current one.
|
|
23
|
+
- A picture refused because the project has given out all 999 picture numbers stops with its own sentence and
|
|
24
|
+
`reference_numbers_used`, without the hint about removing a picture.
|
|
25
|
+
- `velven create stats` heads a routed group with its work ("quick fast first builds", "standard full later builds",
|
|
26
|
+
"quick interview turns", "quick routed plan turns"), and `velven create show --timeline` names a routed turn's work
|
|
27
|
+
and first build from its router step.
|
|
28
|
+
- `velven create new` without `--genre` makes an open game: Velven follows your idea instead of arcade's rules
|
|
29
|
+
(`--genre arcade` holds a project to them). Without `--engine`, Velven picks 2D (`phaser`) or 3D (`three`) from your
|
|
30
|
+
idea, 3D unless it is clearly 2D. A project made with `--engine` keeps its engine.
|
|
31
|
+
- A new game starts with a short conversation: Velven asks a question or two (2D or 3D, the style, at most four in
|
|
32
|
+
all), each with numbered choices and `Just build it: velven create send --build "Just build it"` (the style question
|
|
33
|
+
also offers `--ref <file>`), then sketches a short plan, printed as a card with `Build it: velven create send --build
|
|
34
|
+
"Build it"`. `velven create plan` prints the project's plan again (`--json` too).
|
|
35
|
+
- Following a build prints its plain steps ("Designing your game", "Painting the art", "Building the world", "Trying it
|
|
36
|
+
out", "Polishing", "Finishing up"), a first build's design once it is settled ("Designing <title>: <pitch>" with its
|
|
37
|
+
style and palette), and each picture as it lands ("Painted sky (1024 by 512)" and a link to it). The plan and the
|
|
38
|
+
brief as they are written are printed only with `watch --json`.
|
|
39
|
+
- A message sent while a turn runs on the project waits behind it instead of being refused (the CLI asks for that:
|
|
40
|
+
`queue=true` on the estimate, `queue: true` on the message; Velven still refuses a send that does not ask, as it
|
|
41
|
+
refused 0.3.0's): "Queued: it runs after the turn that is running. velven create queue lists what waits." (exit 0;
|
|
42
|
+
`--json` prints `{ ok, queued }`). It starts when that turn ends, and following that turn prints "Your next message
|
|
43
|
+
is running: velven create watch <turn>". `velven create queue` lists the waiting messages (and any Velven could not
|
|
44
|
+
start, with why); `velven create queue rm <id>` removes one.
|
|
45
|
+
- `velven create stats` heads a new game's plan turns "quick draft turns", and `velven create show --timeline` names a
|
|
46
|
+
draft or interview turn from its interviewer step.
|
|
47
|
+
- After a turn that ends with a playable game, following it prints "Where it could go next:" with two to four short
|
|
48
|
+
suggestions Velven wrote for this game, and the command that sends the first one; send any of them as an ordinary
|
|
49
|
+
message.
|
|
50
|
+
- `velven create usage` lists what each of your turns held and used, newest first (`--project <id>` for one project,
|
|
51
|
+
`--before <turn>` for the page before, `--json`).
|
|
52
|
+
- When Velven kept a turn quick because the day's credits would not cover more, its route line says so in words. A
|
|
53
|
+
reply may end "You're running low on credits for today." and, after a question, the CLI now prints what follows the
|
|
54
|
+
question in the reply.
|
|
55
|
+
- `velven create stats` adds a line under each group saying how the next message reacted to its turns (moved on,
|
|
56
|
+
corrected it, asked for checks), when any was labelled.
|
|
57
|
+
- On a project that never built, a message without `--build` is priced as what Velven answers it with first: "about 2
|
|
58
|
+
credits for a question or a short plan"; with `--build`, as a first build.
|
|
59
|
+
- A message sent while a turn runs that starts at once (the turn ended as it was queued) is followed as a turn ("Turn
|
|
60
|
+
<id> is on its way.", or "Turn <id> waits for room on Velven and starts on its own." when Velven's daily room holds
|
|
61
|
+
it back); one Velven refused when it came to start prints why and exits 4, instead of "Queued".
|
|
62
|
+
- "Your next message is running" names the project ("on project <id>") when the message that started waited on
|
|
63
|
+
another of your projects.
|
|
64
|
+
- When a new game's first build stops before it made the game (nothing saved, or only its design), the CLI prints
|
|
65
|
+
`Try again: velven create send --build "Build it"` under the reply.
|
|
66
|
+
|
|
67
|
+
## 0.3.0
|
|
68
|
+
|
|
69
|
+
- `velven create show --timeline` draws a turn's timeline as a text waterfall: every phase, step, model and tool call
|
|
70
|
+
with its bar, start and time, the critical path marked with `*`. `--turn <id>` picks the turn (the current project's
|
|
71
|
+
newest by default), `--all` lists every tool call and screenshot (past 20 under one line they fold into one), and
|
|
72
|
+
`--json` prints the timeline. Its first line names the turn's live link, first change (the engine programmer's first
|
|
73
|
+
write that landed) and first playable preview.
|
|
74
|
+
- `velven create stats`, for Velven's admins: p50 and p90 over recent turns by effort, plan mode and engine (the first
|
|
75
|
+
live link, the first change, the first playable preview, the whole turn, each phase, each job's cost and time, the single steps worth
|
|
76
|
+
comparing). `--days <n>` and `--origin <origin>` choose the turns; `--json` prints them as they come.
|
|
77
|
+
- Following a turn says how long things took: a step of a second or more gets a line with its parts, each tool call's
|
|
78
|
+
line ends with its time, and the engine programmer's done line says its run's time, model steps, tool calls and images.
|
|
79
|
+
- A project's first build is priced and named apart. `velven create send` says "A quick first build (its pictures are
|
|
80
|
+
made before the first preview): about 51 credits, at most 400." when the estimate says the turn is the project's
|
|
81
|
+
first build, `velven create show --timeline` calls such a turn "a quick first build", and `velven create stats` heads
|
|
82
|
+
its groups "quick first builds", "quick later builds", "quick build turns" (turns from before first builds were told
|
|
83
|
+
apart) and "quick plan turns". An older Velven's answers, without these fields, read as before.
|
|
84
|
+
- A version holds up to 512 MB and 5,000 files when you're signed in, so a game engine's web export fits. Without an
|
|
85
|
+
account it's still 50 MB and 1,000 files.
|
|
86
|
+
- A file over 32 MB is sent in parts of 32 MB, each through its own upload link. A dropped upload resumes where it
|
|
87
|
+
stopped: the next `velven publish` sends only the parts Velven doesn't have yet. After a failed upload, the parts
|
|
88
|
+
already on their way are let finish before the CLI stops.
|
|
89
|
+
- `velven dev` gives the page cross-origin isolation by the rule publishing uses. When the folder has a WebAssembly
|
|
90
|
+
module with shared memory (a threaded export, found in `.wasm`, `.wasm.br`, `.wasm.gz` and `.wasm.unityweb` files)
|
|
91
|
+
or `velven.json` sets `"crossOriginIsolated": true`, every response carries
|
|
92
|
+
`Document-Isolation-Policy: isolate-and-credentialless` and the start lines say so. Otherwise nothing changes.
|
|
93
|
+
- `velven.json` takes `crossOriginIsolated` (`true` or `false`), sent with the publish.
|
|
94
|
+
- `velven dev` serves a `.unityweb` file the way Velven does: compressed with gzip or brotli (read from its first
|
|
95
|
+
bytes), it's served with the type of the name inside and its encoding; otherwise as plain bytes. `.mem` and `.basis`
|
|
96
|
+
files are served as bytes, `.wgsl` as text.
|
|
97
|
+
- Following a turn of `velven create` prints more as it happens: what each step changed, the live link while the
|
|
98
|
+
game is being built, each playtest's preview link (the first playable one, minutes before the end), its screenshots,
|
|
99
|
+
its clip and whether its checks passed (the judge's verdict follows as its own line).
|
|
100
|
+
- `velven create`, for Velven's game builder: `new` starts a project, `send` sends it a message and follows the turn
|
|
101
|
+
(the estimate first, then a question in a terminal unless `--yes`; `--effort`, `--plan` and `--no-plan` are sent only
|
|
102
|
+
when given; `--detach` returns at once), `watch` follows a turn again, `cancel` stops one, and `list`, `show` and
|
|
103
|
+
`credits` read your projects and credits. The current project and last turn are saved per Velven in
|
|
104
|
+
`~/.config/velven/create.json`.
|
|
105
|
+
- Following a turn reconnects from the last event it saw, and gives up only after five failed attempts in a row, so a
|
|
106
|
+
turn that waits a long time for room on Velven is followed to its end. Ctrl+C stops following; the turn goes on.
|
|
107
|
+
- `--json` prints one object for `new`, `send` (the finished turn), `list`, `show` and `credits`; `watch --json` prints
|
|
108
|
+
one event per line.
|
|
109
|
+
- Exit codes: refusals from the builder (not enough credits, closed, busy, too many turns, effort not available) are 4;
|
|
110
|
+
a failed or cancelled turn is 1.
|
|
111
|
+
|
|
3
112
|
## 0.2.1
|
|
4
113
|
|
|
5
114
|
- A `clip` in `velven.json` must be 5 to 10 seconds long. The CLI reads the length from the file's header and stops with
|
package/README.md
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
# @velven/cli
|
|
2
2
|
|
|
3
|
-
Publish a folder to [Velven](https://velven.ai), the community marketplace for spaces built with AI. Velven hosts
|
|
4
|
-
and gives you a private preview link
|
|
5
|
-
within seconds.
|
|
3
|
+
Publish a folder to [Velven](https://velven.ai), the community marketplace for spaces built with AI. Velven hosts your
|
|
4
|
+
files and gives you a private preview link. `--prod` puts the version live on its own Velven page, with the SDK added,
|
|
5
|
+
usually within seconds.
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
npx @velven/cli login
|
|
9
|
-
npx @velven/cli publish ./dist # a private preview
|
|
10
|
-
npx @velven/cli publish ./dist --prod # live on its Velven page
|
|
9
|
+
npx @velven/cli publish ./dist # makes a private preview and prints its link
|
|
10
|
+
npx @velven/cli publish ./dist --prod # puts it live on its Velven page
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Or install it
|
|
13
|
+
Or install it with `npm install -g @velven/cli`, then run `velven`. You need Node 20 or later. It has no dependencies.
|
|
14
14
|
|
|
15
15
|
## velven.json
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Your listing comes from `velven.json` in the folder you publish. The file stays on your machine. It's never uploaded,
|
|
18
|
+
and neither is a `velven.json` in any folder below, whatever its letter case.
|
|
18
19
|
|
|
19
20
|
```json
|
|
20
21
|
{
|
|
@@ -26,23 +27,25 @@ The listing comes from `velven.json` in the folder you publish. It stays on your
|
|
|
26
27
|
}
|
|
27
28
|
```
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
missing, `velven publish` asks for it
|
|
31
|
-
and
|
|
30
|
+
Three fields are required: `title`, `type` (`game`, `world`, `tool` or `wonder`) and `devices` (`desktop`, `mobile`,
|
|
31
|
+
`vr`). If one is missing and you're in a terminal, `velven publish` asks for it and saves your answer in `velven.json`.
|
|
32
|
+
Anywhere else, it stops and lists each missing field.
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
The optional fields are `description`, `engine`, `ai_tools`, `models`, `how_made` and `source_url`, plus these for
|
|
35
|
+
hosting:
|
|
34
36
|
|
|
35
37
|
| Key | What it does |
|
|
36
38
|
| --- | --- |
|
|
37
|
-
| `entry` | The page to open,
|
|
38
|
-
| `spa` | `true` serves the entry page for any path without a file
|
|
39
|
-
| `sdk` | `false`
|
|
40
|
-
| `
|
|
39
|
+
| `entry` | The page to open, if it isn't `index.html` |
|
|
40
|
+
| `spa` | Set to `true` for client-side routing: Velven serves the entry page for any path without a file |
|
|
41
|
+
| `sdk` | Set to `false` to stop Velven adding the SDK's script tag, for example when you bundle `@velven/sdk` yourself |
|
|
42
|
+
| `crossOriginIsolated` | Set to `true` when your page's own JavaScript needs `SharedArrayBuffer`. Velven finds a threaded WebAssembly module by itself, so a threaded export from a game engine doesn't need it |
|
|
43
|
+
| `start` | How to get past your start screen, so Velven can look at the space and record its clip: `{ "click": "Play" }`, `{ "click": [x, y] }` or `{ "key": "Space" }` |
|
|
41
44
|
| `thumbnail` | A picture in the folder for your space's tile. JPEG, PNG or WebP, up to 2 MB and 4096 pixels on each side |
|
|
42
45
|
| `clip` | A video in the folder that your tile plays on hover. MP4 or WebM, up to 3 MB and 5 to 10 seconds long. Without a `thumbnail`, its first frame is the picture |
|
|
43
46
|
| `boards`, `achievements`, `stats`, `toasts` | Leaderboards, achievements and stats, declared as in the SDK docs |
|
|
44
|
-
| `space` |
|
|
45
|
-
| `claim` |
|
|
47
|
+
| `space` | The first publish writes it. Later publishes update that space |
|
|
48
|
+
| `claim` | A publish without an account writes it. It updates the unlisted page until you claim it |
|
|
46
49
|
|
|
47
50
|
`velven publish` checks `thumbnail` and `clip` before it uploads anything. Each one must be:
|
|
48
51
|
|
|
@@ -62,84 +65,249 @@ keeps what your space shows. That includes a clip you recorded again or uploaded
|
|
|
62
65
|
Your thumbnail and clip follow the same content policy as your space. They must show your space itself, not something
|
|
63
66
|
unrelated or misleading.
|
|
64
67
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
### Leaving files out
|
|
69
|
+
|
|
70
|
+
A `.velvenignore` file leaves files out. Write one pattern per line. You can use `*`, `**` and `?`, `folder/` for
|
|
71
|
+
folders, and `#` for comments.
|
|
72
|
+
|
|
73
|
+
Some files are always left out: dotfiles, `node_modules` and every `velven.json`, in any letter case. So is a name that
|
|
74
|
+
ends in a dot or a space, or contains `:` or `~`. The CLI lists each one it leaves out.
|
|
75
|
+
|
|
76
|
+
The CLI follows a link to a file or folder inside the folder. A linked folder's files go up under the link's name. A
|
|
77
|
+
link is left out when it points outside the folder, at a file that is always left out, or back up to a folder it sits
|
|
78
|
+
in. The CLI lists each link it leaves out.
|
|
79
|
+
|
|
80
|
+
`velven dev` serves files by the same rules, `.velvenignore` included. Paths must match the letter case in the folder,
|
|
81
|
+
the same as on the live version, so `Assets/Hero.png` doesn't open `assets/hero.png`.
|
|
82
|
+
|
|
83
|
+
A version can hold up to 512 MB and 5,000 files. A file over 32 MB is sent in parts, and a dropped upload resumes
|
|
84
|
+
where it stopped: publish again and only the parts Velven doesn't have are sent.
|
|
85
|
+
|
|
86
|
+
### Threaded exports
|
|
87
|
+
|
|
88
|
+
A threaded export (a WebAssembly module with shared memory, such as an engine's export with threads turned on) needs
|
|
89
|
+
cross-origin isolation to run. Velven reads your modules when it stores a version and gives that version isolation by
|
|
90
|
+
itself. `"crossOriginIsolated": true` in `velven.json` does the same for a page whose own JavaScript needs
|
|
91
|
+
`SharedArrayBuffer`.
|
|
92
|
+
|
|
93
|
+
`velven dev` follows the same rule. At start it reads every `.wasm`, `.wasm.br`, `.wasm.gz` and `.wasm.unityweb` file
|
|
94
|
+
the publish would send, and `velven.json`. When either asks for isolation, every response carries
|
|
95
|
+
`Document-Isolation-Policy: isolate-and-credentialless` and the CLI prints "Cross-origin isolated". Otherwise it sends
|
|
96
|
+
no such header, so what runs in `velven dev` runs the same once published.
|
|
97
|
+
|
|
98
|
+
A `.unityweb` file is served the way Velven serves it: when its first bytes show gzip or brotli, with the type of the
|
|
99
|
+
name inside (`game.wasm.unityweb` as WebAssembly) and that encoding; otherwise as plain bytes.
|
|
100
|
+
|
|
101
|
+
### Programs, installers and coin miners
|
|
102
|
+
|
|
103
|
+
Velven never serves a program, an installer or a coin miner. Before it uploads anything, `velven publish` checks every
|
|
104
|
+
file in three ways:
|
|
105
|
+
|
|
106
|
+
- It reads the start of each file. A Windows, Linux or Mac program is refused, whatever its name.
|
|
107
|
+
- It checks each name: `.exe`, `.scr`, `.msi`, `.dmg`, `.pkg`, `.app`, `.apk`, `.deb`, `.rpm`, `.jar`, `.bat`,
|
|
108
|
+
`.cmd`, `.ps1`, `.vbs`. For a compressed file such as `setup.exe.gz` or `setup.exe.br`, it checks the name inside.
|
|
109
|
+
- It reads the text of scripts, pages and WebAssembly for a coin miner. It leaves a compressed file's text to Velven,
|
|
110
|
+
which reads it uncompressed.
|
|
111
|
+
|
|
112
|
+
If it finds one, it stops with exit 4 (`refused_file`) and names the file:
|
|
77
113
|
`dist/setup.exe is a Windows program; Velven does not serve programs. Remove it or add it to .velvenignore.`
|
|
78
|
-
|
|
79
|
-
|
|
114
|
+
|
|
115
|
+
The upload on velven.ai checks the same way. Velven also reads the whole version again after the upload, and refuses it
|
|
116
|
+
with exit 6 if it has one of these in it.
|
|
80
117
|
|
|
81
118
|
## Commands
|
|
82
119
|
|
|
83
120
|
| Command | What it does |
|
|
84
121
|
| --- | --- |
|
|
85
|
-
| `velven login` | Sign in
|
|
86
|
-
| `velven logout` |
|
|
87
|
-
| `velven whoami` |
|
|
88
|
-
| `velven publish [dir]` | Upload the folder
|
|
89
|
-
| `velven versions` |
|
|
90
|
-
| `velven rollback [version]` | Put an earlier version live again
|
|
91
|
-
| `velven dev [dir]` | Serve the folder on `localhost` and play it on Velven
|
|
92
|
-
| `velven reset` | Delete the space's sandbox data: `--scores --saves --achievements --content --rooms` (default
|
|
122
|
+
| `velven login` | Sign in. It shows a code and opens velven.ai so you can approve it |
|
|
123
|
+
| `velven logout` | Sign this computer out |
|
|
124
|
+
| `velven whoami` | Show who you're signed in as |
|
|
125
|
+
| `velven publish [dir]` | Upload the folder as a private preview, sending only files Velven doesn't already have. With `--prod`, put it live on its Velven page |
|
|
126
|
+
| `velven versions` | List the space's versions. `*` marks the live one |
|
|
127
|
+
| `velven rollback [version]` | Put an earlier version live again. Leave out the version and it asks which one |
|
|
128
|
+
| `velven dev [dir]` | Serve the folder on `localhost` and play it on Velven. Scores and saves go to the sandbox |
|
|
129
|
+
| `velven reset` | Delete the space's sandbox data: `--scores --saves --achievements --content --rooms` (all of them by default), `--player <handle>` |
|
|
93
130
|
|
|
94
131
|
`velven publish` options:
|
|
95
132
|
|
|
96
|
-
- Without `--prod
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
- `--
|
|
106
|
-
|
|
133
|
+
- Without `--prod`, you get a private preview. The link works for 24 hours, and scores and saves made there go to the
|
|
134
|
+
sandbox.
|
|
135
|
+
- `--prod` publishes the version live on the space's Velven page. Most versions are live when the command ends. A
|
|
136
|
+
refused one prints the reason, naming the file, and exits 6. Sometimes a version waits on Velven, usually for less
|
|
137
|
+
than a minute, and the CLI prints a link to follow it.
|
|
138
|
+
- `--wait` waits in the terminal for the preview link. With `--prod`, it waits until a version that's waiting goes
|
|
139
|
+
live. A refused version prints the reason. A version Velven couldn't judge prints what Velven saw, and a start hint
|
|
140
|
+
usually fixes it. Either way, you can ask for a review from the printed link. The exception is a program or a miner,
|
|
141
|
+
which is never served: remove the file and publish again.
|
|
142
|
+
- `--title`, `--type`, `--devices desktop,mobile`, `--description` and `--engine` override `velven.json` for this run
|
|
143
|
+
only.
|
|
144
|
+
- `--yes` never asks for missing fields. It fails and lists them instead.
|
|
145
|
+
- `--json` prints one JSON object, for scripts and agents. It also works on `whoami` and `versions`.
|
|
146
|
+
|
|
147
|
+
`versions`, `rollback` and `reset` act on the space named in `velven.json` in the current folder. Use `--space <slug>`
|
|
148
|
+
to pick another.
|
|
107
149
|
|
|
108
|
-
|
|
150
|
+
## Making a game with velven create
|
|
151
|
+
|
|
152
|
+
`velven create` talks to Velven's game builder: you describe a game in a sentence, and Velven's agents write it, build
|
|
153
|
+
it and give you a preview link to play. It needs an account, since every turn spends credits.
|
|
154
|
+
|
|
155
|
+
```sh
|
|
156
|
+
velven create new "Petal Drift"
|
|
157
|
+
velven create send "a cozy game where you grow a garden on a floating island"
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
| Command | What it does |
|
|
161
|
+
| --- | --- |
|
|
162
|
+
| `velven create new [title]` | Start a project. It becomes the current project. Without `--genre` it is an open game: Velven follows your idea (`--genre arcade` holds it to arcade's rules). Without `--engine`, Velven picks 2D (`phaser`) or 3D (`three`) from your idea: 3D unless it is clearly 2D |
|
|
163
|
+
| `velven create send <text>` | Send the current project a message. Velven picks how much to do unless you pass `--effort` or a plan flag. The CLI prints the estimate, asks before sending in a terminal, then follows the turn to its end. `--build` builds now, `--ref <file>` attaches a picture (`--ref ref-3` one the project keeps). Sent while a turn runs on the project, the message waits and runs when that turn ends (followed at once when that turn ended as it was sent; exit 4 with why when Velven refused it) |
|
|
164
|
+
| `velven create plan` | A new game's short plan: what the game is, how it plays, its look, what is in it, how it ends. `--project <id>` picks another project |
|
|
165
|
+
| `velven create queue` | The messages waiting behind the running turn, in the order they run, and any Velven could not start with why. `--project <id>` picks another project |
|
|
166
|
+
| `velven create queue rm <id>` | Remove a waiting message before it runs |
|
|
167
|
+
| `velven create watch [turn]` | Follow a turn, by default the last one you sent or watched. `--from <n>` starts from that event |
|
|
168
|
+
| `velven create cancel [turn]` | Stop a turn. What it finished is saved, and unused credits come back |
|
|
169
|
+
| `velven create list` | Your projects. `*` marks the current one |
|
|
170
|
+
| `velven create show [project]` | A project, its newest turn and a fresh preview link (it works for 24 hours) |
|
|
171
|
+
| `velven create show --timeline` | The newest turn's timeline as a waterfall (see below). `--turn <id>` picks another turn, `--all` lists every tool call |
|
|
172
|
+
| `velven create refs` | The project's reference pictures: each id, when it was added, its size and how many messages carried it. `--project <id>` picks another project |
|
|
173
|
+
| `velven create refs rm <ref-n>` | Delete a reference picture, sent or not. The messages that carried it keep its number, and the number is never given to another picture |
|
|
174
|
+
| `velven create credits` | Your credits: today's allowance, your balance, what open turns hold, and the latest entries |
|
|
175
|
+
| `velven create usage` | What each of your turns held and used, newest first. `--project <id>` keeps one project's, `--before <turn>` reads the page before (the last line names it), `--json` prints the page |
|
|
176
|
+
| `velven create stats` | For Velven's admins: p50 and p90 over recent turns. `--days <n>` (1 to 90, 7 by default), `--origin <origin>` |
|
|
177
|
+
|
|
178
|
+
`velven create send` options:
|
|
179
|
+
|
|
180
|
+
- Without `--effort`, `--plan` or `--no-plan`, Velven picks the turn's work from your message: a quick change, a full
|
|
181
|
+
build that it also playtests and fixes, or a plan. The CLI prints "Velven picks how much to do: about 20 credits
|
|
182
|
+
for a small change, at most 1500 held." first (on a project that never built, the figure is a first build's, and
|
|
183
|
+
the line says so); what is not spent comes back when the turn ends. Effort and plan mode then stay as the project
|
|
184
|
+
had them.
|
|
185
|
+
- A new game starts with a short conversation: Velven asks what matters most and is still open (2D or 3D, the style,
|
|
186
|
+
at most four questions in all, fewer for a specific idea), then sketches a short plan. A question comes with
|
|
187
|
+
numbered choices and how to answer it: send a choice, your own words, or `--build "Just build it"`; the style
|
|
188
|
+
question also takes a picture with `--ref <file>`. The line names the turn's own project, also when you follow it
|
|
189
|
+
with `velven create watch` from another. The plan prints as a card (the title, the pitch, 2D or 3D and the camera,
|
|
190
|
+
how it plays, the look and palette, what is in it, how it ends, a score or not); send a change in words to reshape
|
|
191
|
+
it, or `--build "Build it"` to build it. `velven create plan` prints it again.
|
|
192
|
+
- `--build` builds now: no more questions, and Velven fills in what the plan leaves open (writing the plan first when
|
|
193
|
+
there is none). Words beyond a bare build change the plan first (`--build "make it 2D"`: the plan is written again
|
|
194
|
+
in 2D, then built); `--build "Build it"` builds the plan as it is. Velven still picks how much to do.
|
|
195
|
+
- `--ref <file>` attaches a reference picture (PNG, JPEG or WebP, up to 10 MB, up to 4 on a message): the CLI uploads
|
|
196
|
+
each to the project first (straight to Velven's storage through a link Velven gives, then Velven keeps it), then
|
|
197
|
+
sends the message with them. `--ref ref-3` sends a picture the project already keeps, by the id Velven printed when
|
|
198
|
+
it was attached, with no upload. Velven's agents read a picture's style, a character or a game's screen from it. A
|
|
199
|
+
picture Velven refuses, or one over 10 MB, stops the CLI with its sentence and exit 4, before the message is sent.
|
|
200
|
+
A project keeps up to 16 pictures. One no message carried goes a day after it was last uploaded; a sent one stays
|
|
201
|
+
until you delete it. When a project is full, the CLI says so and names `velven create refs` and
|
|
202
|
+
`velven create refs rm <ref-n>`. A project that has given out all 999 picture numbers takes no new one (exit 4,
|
|
203
|
+
`reference_numbers_used`): start a new project.
|
|
204
|
+
- `--effort quick|standard|deep` sets how much the turn may do, in place of Velven's pick. A quick turn writes and
|
|
205
|
+
builds the game. A standard turn also plays it and has its code reviewed. Deep is not available yet.
|
|
206
|
+
- `--plan` turns on plan mode, in place of Velven's pick: the turn writes or updates the project's design document and
|
|
207
|
+
changes no game files. `--no-plan` turns it off.
|
|
208
|
+
- The project keeps the effort and plan mode you last passed, for a later message that passes only one of them (with
|
|
209
|
+
`--effort` alone, a new standard or deep effort turns plan mode on, quick turns it off). A message with neither is
|
|
210
|
+
Velven's pick again, whatever you passed before; the CLI sends them only when you pass them.
|
|
211
|
+
- `--yes` sends without asking. Outside a terminal, the CLI never asks.
|
|
212
|
+
- `--detach` sends the message and returns at once. Follow the turn later with `velven create watch`.
|
|
213
|
+
- `--project <id>` sends to a project other than the current one.
|
|
214
|
+
- A message sent while a turn runs on the project waits behind it (at most five a project), holding no credits, and
|
|
215
|
+
starts on its own when that turn ends: the CLI prints "Queued: it runs after the turn that is running." and exits 0.
|
|
216
|
+
`velven create queue` lists what waits, `velven create queue rm <id>` removes one; cancelling the running turn
|
|
217
|
+
leaves the queue as it is. Following the turn that ends prints "Your next message is running: velven create watch
|
|
218
|
+
<turn>" (with "on project <id>" when the message that started waited on another of your projects; one waiting on
|
|
219
|
+
the same project starts first). A queued message that starts at once but waits for room on Velven says "Turn <id>
|
|
220
|
+
waits for room on Velven and starts on its own.", as any such send.
|
|
221
|
+
|
|
222
|
+
The CLI says what the turn does as it goes. What the agents write goes to standard output, and their progress goes to
|
|
223
|
+
standard error. When Velven picked the work, it says so in words first ("I'll make the change."; when the day's
|
|
224
|
+
credits kept it from a fuller turn, "I'll make the change. I kept this one quick to save credits."), with the work it
|
|
225
|
+
picked and why on standard error. On a build it prints the plain step it is at ("Designing your game", "Painting the art", "Building the world", "Trying it out", "Polishing", "Finishing up"), and on a first build the design as it is settled ("Designing Petal Drift: ..." with its style and palette) and each picture once it lands ("Painted sky (1024 by 512)" with a link to look at it). You see what each step changed, the live link while the game is being built, each playtest's preview
|
|
226
|
+
link (the first playable one, before the turn ends), its screenshots and its clip. When the turn ends, it prints the reply (when the turn asked a question, which it already printed with its choices, only what follows it), then, after a turn that ended with a playable game, "Where it could go next:" with two to four short suggestions for this game and the command that sends the first (`velven create send "Add a boss at the end"`; each is an ordinary message), then the preview link and the credits used. A reply may end with one sentence on what the turn took from your pictures, and with "You're running low on credits for today." when what is left would not cover another small change. A turn that stops at
|
|
227
|
+
its credit cap or time limit saves what it finished and ends with exit 0. A failed turn costs nothing. When a new game's
|
|
228
|
+
first build stops before it made the game (it saved nothing, or only its design), the reply ends "Press Build it to try
|
|
229
|
+
again." and the CLI prints `Try again: velven create send --build "Build it"`; "try again" typed after it builds too.
|
|
230
|
+
|
|
231
|
+
When Velven is busy, a turn waits for room and starts on its own. The CLI prints "Still waiting for room on Velven."
|
|
232
|
+
and keeps following it, however long it waits. If the connection drops, the CLI reconnects and carries on where it
|
|
233
|
+
left off. After five failed attempts in a row it stops with exit 1, and the turn goes on: `velven create watch` follows
|
|
234
|
+
it again.
|
|
235
|
+
|
|
236
|
+
Ctrl+C stops following the turn, but the turn goes on. The CLI prints how to watch or cancel it, and exits 1.
|
|
237
|
+
|
|
238
|
+
While it follows a turn, the CLI also says how long things took: a step of a second or more gets a line with its
|
|
239
|
+
parts (` openWorkspace 10.9 s: sandbox.get 4.1 s, setup 0.1 s, describe 0.4 s`), each tool call's line ends with its
|
|
240
|
+
time, and the engine programmer's last line says how its run went (`Engine programmer done in 3 min 12 s: 14 model
|
|
241
|
+
steps, 28 tool calls, 6 images`).
|
|
242
|
+
|
|
243
|
+
`velven create show --timeline` draws a turn's timeline once the turn has ended: every phase, step, model call, tool
|
|
244
|
+
call, Sandbox call, build, upload and playtest stage, one line each under the line it belongs to, with a 60-column bar
|
|
245
|
+
on the turn's clock, when it started, how long it took and the figures that matter (tokens and time to first token for
|
|
246
|
+
a model call, files and bytes for an upload). `*` marks the critical path: the spans that set when the turn ended.
|
|
247
|
+
The first line names the turn's live link, its first change (the engine programmer's first write that landed, the
|
|
248
|
+
moment the live link shows the game instead of the template) and its first playable preview, `-` for one it never had.
|
|
249
|
+
More than 20 tool calls or screenshots under one line fold into one; `--all` lists each. Without `--turn` it reads the
|
|
250
|
+
newest turn of the current project, or of the project you name.
|
|
251
|
+
|
|
252
|
+
`velven create stats` is for Velven's admins (anyone else is told so, with exit 4). It prints one table for each effort,
|
|
253
|
+
plan mode, engine and, for the turns Velven routed, the work it picked ("quick fast first builds", "standard full later
|
|
254
|
+
builds", "quick interview turns", "quick draft turns" for a new game's short plan) over the turns created in the last `--days` days (`--origin` keeps the turns sent from one place:
|
|
255
|
+
`web`, `api`, `cli`, `mcp` or `benchmark`): how many finished and failed, p50 and p90 of the first live link, the first
|
|
256
|
+
change, the first playable preview and the whole turn, each phase, each job's cost in credits and USD cents and its model time, and the
|
|
257
|
+
single steps worth comparing, longest first. Under a group's heading, "the next message:" says how the message after its turns reacted to them, as Velven's router labelled it (moved on, corrected it, asked for checks), when any was labelled.
|
|
258
|
+
|
|
259
|
+
With `--json`, `new`, `send`, `list`, `show`, `plan`, `queue`, `credits`, `usage` and `stats` print one JSON object, and `send` prints only the
|
|
260
|
+
finished turn (or the waiting message, `queued`, when it was queued); `show --timeline --json` prints the turn's id and its timeline (`started_at` and the spans). `watch --json`
|
|
261
|
+
is different: it prints each event of the turn as it comes, one JSON object per line (the plan and the brief as they are written included, which text mode leaves out until the last).
|
|
262
|
+
|
|
263
|
+
The current project and the last turn are saved in `~/.config/velven/create.json`, one set for each Velven
|
|
264
|
+
`VELVEN_API` points at.
|
|
109
265
|
|
|
110
266
|
## Without an account
|
|
111
267
|
|
|
112
|
-
`velven publish` works before you sign in. It makes an **unlisted page** on Velven
|
|
113
|
-
|
|
114
|
-
token and a claim link
|
|
115
|
-
the
|
|
116
|
-
|
|
117
|
-
|
|
268
|
+
`velven publish` works before you sign in. It makes an **unlisted page** on Velven. The page is live as soon as Velven
|
|
269
|
+
publishes it and has every SDK feature, but it isn't listed anywhere on Velven until you claim it. The CLI prints the
|
|
270
|
+
page's address, a claim token and a claim link. It saves the token in `velven.json` as `"claim"`, so publishing again
|
|
271
|
+
from the folder updates the same page.
|
|
272
|
+
|
|
273
|
+
Sometimes the CLI can't write `velven.json`, because the file is read-only or you can't write to the folder. It tells
|
|
274
|
+
you, prints what to put in the file, and carries on with the publish. That's the token, or the slug as `"space"` if
|
|
275
|
+
you're signed in. With `--json`, the message is in `notSaved`.
|
|
276
|
+
|
|
277
|
+
An unclaimed page is deleted 7 days after its first publish.
|
|
278
|
+
|
|
279
|
+
To claim it, open the claim link, or run `velven login` and publish again from the folder. The page becomes yours and
|
|
280
|
+
goes on Velven, and `"space"` replaces `"claim"` in `velven.json`.
|
|
281
|
+
|
|
282
|
+
Claimed it in the browser? Run `velven login` before you publish again. Otherwise:
|
|
283
|
+
|
|
284
|
+
- Signed out, publishing with the claimed page's token exits 3 (`claim_spent`).
|
|
285
|
+
- If it was claimed while the CLI was uploading, the version was never finished. The CLI exits 3 and tells you to run
|
|
286
|
+
`velven login` and publish again.
|
|
287
|
+
- If it was claimed while the CLI was waiting with `--wait`, it exits 3 with a link to the space's Files tab, where the
|
|
288
|
+
version carries on.
|
|
118
289
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
before publishing again: signed out, the claimed page's token exits 3 (`claim_spent`); claimed while the CLI uploads,
|
|
122
|
-
the version was never finished, so it exits 3 saying to run `velven login` and publish again; claimed while it waits
|
|
123
|
-
with `--wait`, it exits 3 with the space's Files tab link, where the version goes on. Without an account a version
|
|
124
|
-
holds at most 50 MB and 1,000 files, and `--prod` needs you to sign in. By publishing you agree to Velven's Terms: https://velven.ai/terms
|
|
290
|
+
Without an account, a version can hold up to 50 MB and 1,000 files, and `--prod` needs you to sign in. By publishing,
|
|
291
|
+
you agree to Velven's Terms: https://velven.ai/terms
|
|
125
292
|
|
|
126
293
|
## In CI
|
|
127
294
|
|
|
128
|
-
Set `VELVEN_TOKEN` to a token from `velven login` (in `~/.config/velven/auth.json`)
|
|
129
|
-
`velven publish --prod --yes --wait`. The token
|
|
295
|
+
Set `VELVEN_TOKEN` to a token from `velven login` (you'll find it in `~/.config/velven/auth.json`), then run
|
|
296
|
+
`velven publish --prod --yes --wait`. The token wins over a saved sign-in. You can revoke tokens in your Velven
|
|
297
|
+
settings.
|
|
130
298
|
|
|
131
|
-
`VELVEN_API` points the CLI at another Velven, such as `http://localhost:3000` when
|
|
299
|
+
`VELVEN_API` points the CLI at another Velven, such as `http://localhost:3000` when you run Velven itself locally.
|
|
132
300
|
|
|
133
301
|
## Exit codes
|
|
134
302
|
|
|
135
303
|
| Code | Meaning |
|
|
136
304
|
| --- | --- |
|
|
137
305
|
| 0 | Done |
|
|
138
|
-
| 1 | Failed: the network, a server error, a failed upload, or cancelled |
|
|
306
|
+
| 1 | Failed: the network, a server error, a failed upload, or you cancelled. For `velven create`: a turn that failed or was cancelled, or that you stopped following |
|
|
139
307
|
| 2 | A mistake in the command or in `velven.json`, such as a missing field, or a `thumbnail` or `clip` that breaks one of the rules above (`invalid_media`) |
|
|
140
|
-
| 3 |
|
|
141
|
-
| 4 | Refused by Velven: not your space, too large, too many files, a program, installer or coin miner in the folder (`refused_file`, before anything is uploaded), not found |
|
|
308
|
+
| 3 | You're not signed in, or your token was refused, for something that needs an account, such as `--prod` |
|
|
309
|
+
| 4 | Refused by Velven: not your space, too large, too many files, a program, installer or coin miner in the folder (`refused_file`, before anything is uploaded), or not found. For `velven create`: not enough credits, the builder is closed, a turn is already running or you have too many open, or the effort is not available |
|
|
142
310
|
| 5 | Rate limited: try again later |
|
|
143
|
-
| 6 | Not published: Velven refused the version, or with `--wait`,
|
|
311
|
+
| 6 | Not published: Velven refused the version, or with `--wait`, couldn't judge it |
|
|
144
312
|
|
|
145
313
|
Docs: https://velven.ai/docs
|