@joystack/cli 0.1.46 → 0.1.47
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 +10 -0
- package/README.md +3 -2
- package/bin/joystack.mjs +5 -0
- package/lib/setup-guide.md +122 -0
- package/lib/setup.mjs +9 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,16 @@ Versions: [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
14
14
|
|
|
15
15
|
## [Unreleased]
|
|
16
16
|
|
|
17
|
+
## [0.1.47] - 2026-10-09
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- `joystack setup` prints the guide an AI agent follows to make your first
|
|
22
|
+
game: ask what to call it, run `create`, then hand off into the new folder.
|
|
23
|
+
It works from any folder, before you have signed in, so the way to start is
|
|
24
|
+
now to ask your agent to run `npx -y joystack@latest setup` and follow what
|
|
25
|
+
it prints.
|
|
26
|
+
|
|
17
27
|
## [0.1.46] - 2026-10-09
|
|
18
28
|
|
|
19
29
|
### Changed
|
package/README.md
CHANGED
|
@@ -9,8 +9,9 @@ cd my-game
|
|
|
9
9
|
npx joystack dev
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
New here?
|
|
13
|
-
|
|
12
|
+
New here? Ask your AI agent to run **`npx -y joystack@latest setup`** and follow
|
|
13
|
+
what it prints. It asks what to call your game, creates the folder, and tells
|
|
14
|
+
you how to carry on from inside it.
|
|
14
15
|
|
|
15
16
|
## License
|
|
16
17
|
|
package/bin/joystack.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { lane } from '../lib/lane.mjs';
|
|
|
9
9
|
import { login, logout, whoami } from '../lib/login.mjs';
|
|
10
10
|
import { publish } from '../lib/publish.mjs';
|
|
11
11
|
import { create } from '../lib/create.mjs';
|
|
12
|
+
import { setupGuide } from '../lib/setup.mjs';
|
|
12
13
|
import { parseTestArgs, TEST_HELP } from '../lib/test-policy.mjs';
|
|
13
14
|
import { testCmd } from '../lib/test-cmd.mjs';
|
|
14
15
|
import { lintCmd } from '../lib/lint.mjs';
|
|
@@ -28,6 +29,7 @@ function flag(name) {
|
|
|
28
29
|
const HELP = `joystack — build and run Joystack games
|
|
29
30
|
|
|
30
31
|
Usage:
|
|
32
|
+
joystack setup The guide an AI agent follows to make your first game folder
|
|
31
33
|
joystack create <name> Bootstrap a new game folder (multiplayer works out of the box)
|
|
32
34
|
joystack dev [--port <n>] Run the full dev stack (game + multiplayer + services)
|
|
33
35
|
joystack dev --share ...and print a public link testers can play (needs cloudflared)
|
|
@@ -190,6 +192,9 @@ try {
|
|
|
190
192
|
console.log(`\nWork in it:\n cd ${dir} && npx joystack dev\n`);
|
|
191
193
|
break;
|
|
192
194
|
}
|
|
195
|
+
case 'setup':
|
|
196
|
+
process.stdout.write(setupGuide());
|
|
197
|
+
break;
|
|
193
198
|
case 'create':
|
|
194
199
|
await create({ name: rest.find((a) => !a.startsWith('--')) });
|
|
195
200
|
break;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Make games on Joystack
|
|
2
|
+
|
|
3
|
+
Joystack is a place to make multiplayer browser games and play them with
|
|
4
|
+
friends; each game lives at its own address, `https://<name>.joystack.games/`.
|
|
5
|
+
Anyone can make one. You don't
|
|
6
|
+
need to know how to code: your AI coding agent does the technical work; you
|
|
7
|
+
describe the game you want and play-test it.
|
|
8
|
+
|
|
9
|
+
Joystack is **agent-agnostic**: it works with Claude Code, Gemini CLI, Codex,
|
|
10
|
+
opencode, or any agent that reads a project's instruction files. There is no
|
|
11
|
+
plugin or extension to install. Every game folder carries its own agent
|
|
12
|
+
instructions (`AGENTS.md`, with `CLAUDE.md` / `GEMINI.md` pointers, and skills
|
|
13
|
+
under `.claude/skills/`), so whatever tool you use picks them up.
|
|
14
|
+
|
|
15
|
+
This guide is what `npx -y joystack@latest setup` prints. It is written for
|
|
16
|
+
the AI agent: **if you are the agent, follow these steps.** If you are the
|
|
17
|
+
human, ask your agent to run that command and follow what it prints.
|
|
18
|
+
|
|
19
|
+
**Your whole job here is: create the folder, then hand off.** Two steps, and the
|
|
20
|
+
page ends. You are *not* going to build, run, or publish the game from where you
|
|
21
|
+
are now — and this page deliberately doesn't tell you how, because that isn't
|
|
22
|
+
your task and those instructions are not yours to hold.
|
|
23
|
+
|
|
24
|
+
**They live in the game folder.** The scaffold you're about to create carries its
|
|
25
|
+
own `AGENTS.md`, its own skills (`/build`, `/qa`, `/feedback`, …), its own
|
|
26
|
+
handbook, and the engine's craft docs. An agent picks all of that up **only when
|
|
27
|
+
its working directory is that folder**. That is the entire reason for the
|
|
28
|
+
handoff: not bureaucracy, but the fact that the knowledge for building the game
|
|
29
|
+
is *inside* the thing you're creating, and you can't reach it from out here.
|
|
30
|
+
|
|
31
|
+
## 1. Prerequisites
|
|
32
|
+
|
|
33
|
+
- Node.js 20.11+ (`node --version`; install from https://nodejs.org if missing).
|
|
34
|
+
- A Joystack account. You don't need one *before* you start — `create` signs the
|
|
35
|
+
human in as part of making the folder (step 2). It's free, and it takes a
|
|
36
|
+
click.
|
|
37
|
+
- Nothing else. The engine, its libraries, and the craft docs download during
|
|
38
|
+
`create`, into the game folder. There is no global install.
|
|
39
|
+
|
|
40
|
+
## 2. Create the game
|
|
41
|
+
|
|
42
|
+
Ask the human what to name the game. The name becomes both the folder and the
|
|
43
|
+
published URL slug, so it must be **lowercase letters, numbers and dashes**
|
|
44
|
+
(e.g. `neon-racer`). Don't invent one silently. It's theirs to choose.
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx -y joystack@latest create <name>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
This scaffolds `<name>/` as its own git repo: a working multiplayer game plus
|
|
51
|
+
all the agent instructions and the `/build` workflow, inside the folder.
|
|
52
|
+
|
|
53
|
+
**This command will pause and ask the human to sign in.** That is expected — not
|
|
54
|
+
a hang, and nothing has gone wrong. Joystack's engine downloads with the game, and
|
|
55
|
+
that download is tied to their account. What happens:
|
|
56
|
+
|
|
57
|
+
1. A browser window opens on the Joystack activation page.
|
|
58
|
+
2. The command prints a short code (like `WXYZ-1234`) and waits.
|
|
59
|
+
3. The human enters that code in the browser and approves.
|
|
60
|
+
4. `create` continues on its own.
|
|
61
|
+
|
|
62
|
+
**Tell them this is coming, before you run it** — a browser opening by itself and
|
|
63
|
+
a command that stops mid-way is alarming if nobody warned you. Say something
|
|
64
|
+
like: *"This will open your browser to sign you in to Joystack — enter the code it
|
|
65
|
+
shows and approve, and it'll carry on."* Then read them the code from the output.
|
|
66
|
+
|
|
67
|
+
If they close the window or it times out, nothing is left behind: `create`
|
|
68
|
+
removes the half-made folder so you can simply run it again.
|
|
69
|
+
|
|
70
|
+
Once signed in, this machine stays signed in — no other command in Joystack will
|
|
71
|
+
ask again.
|
|
72
|
+
|
|
73
|
+
## 3. Hand off — and stop
|
|
74
|
+
|
|
75
|
+
**Say this to the human, and end your turn:**
|
|
76
|
+
|
|
77
|
+
> "Your game is ready, in the folder `<name>`. Now open your agent again **with
|
|
78
|
+
> that folder as its working directory** — a fresh session inside the folder —
|
|
79
|
+
> and tell it what you want to build. Everything needed to make the game lives
|
|
80
|
+
> in there; I can't reach it from here."
|
|
81
|
+
|
|
82
|
+
Then stop. **Do not** `cd` in and keep working. **Do not** start the dev server,
|
|
83
|
+
install anything, write files into the new repo, take screenshots, or "just check
|
|
84
|
+
that it works" — it already works, and the folder ships with its own test that
|
|
85
|
+
the next session will run. Anything you do from out here is done *without* the
|
|
86
|
+
game's instructions, on a repo that isn't shaped for your current habits. That is
|
|
87
|
+
how creators end up with stray files in their first commit and confident, wrong
|
|
88
|
+
answers about their own game.
|
|
89
|
+
|
|
90
|
+
**If the human doesn't know how to do that** — and many won't, this is the one
|
|
91
|
+
genuinely technical moment in Joystack — walk them through it rather than doing it
|
|
92
|
+
for them. Explain it plainly:
|
|
93
|
+
|
|
94
|
+
> "Whatever you're using me through — a terminal, an editor, a desktop app —
|
|
95
|
+
> point it at the `<name>` folder and start a new chat there. It's the same as
|
|
96
|
+
> opening a project: the folder *is* the game, and it carries its own
|
|
97
|
+
> instructions for me. Once I'm in there I'll know how to run it, build it, test
|
|
98
|
+
> it and publish it — none of which I know from here."
|
|
99
|
+
|
|
100
|
+
If they're in a terminal, that's usually: close this session, `cd <name>`, and
|
|
101
|
+
start the agent again. If they're in an editor or a desktop app, it's "open
|
|
102
|
+
folder" / "open project" → `<name>` → new chat. Adapt it to their tool; you know
|
|
103
|
+
what they're using and this page doesn't.
|
|
104
|
+
|
|
105
|
+
That's the last step on this page. The next session takes it from there: it will
|
|
106
|
+
boot the game and build it with them. They're already signed in, and the engine
|
|
107
|
+
is already downloaded — so in there, `joystack dev` just runs.
|
|
108
|
+
|
|
109
|
+
## What Joystack provides
|
|
110
|
+
|
|
111
|
+
- **Multiplayer built in.** Rooms, presence, physics authority, identity.
|
|
112
|
+
Locally `joystack dev` runs the full stack; published games use the platform's.
|
|
113
|
+
- **The engine.** A versioned library of game components and craft docs,
|
|
114
|
+
downloaded per game and pinned in package.json's `joystack.engine`. Upgrade when
|
|
115
|
+
you choose.
|
|
116
|
+
- **Services.** LLM-driven NPCs and more, platform-authenticated. No API keys
|
|
117
|
+
to acquire, ever.
|
|
118
|
+
- **Hosting.** `<name>.joystack.games`, instantly, from `joystack publish`.
|
|
119
|
+
|
|
120
|
+
Your game's folder is yours: its own git repo, private if you like, hosted
|
|
121
|
+
wherever you like (or nowhere). Joystack never needs to see your source beyond
|
|
122
|
+
what you publish.
|
package/lib/setup.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// `joystack setup`: the guide an AI agent follows to create a creator's first
|
|
2
|
+
// game folder and hand off into it. It ships inside this package, so an agent
|
|
3
|
+
// reads it with one command it can run from any folder, signed in or not, and
|
|
4
|
+
// the steps always match the `create` of the same release.
|
|
5
|
+
import { readFileSync } from 'node:fs';
|
|
6
|
+
|
|
7
|
+
export function setupGuide() {
|
|
8
|
+
return readFileSync(new URL('./setup-guide.md', import.meta.url), 'utf8');
|
|
9
|
+
}
|
package/package.json
CHANGED