create-parlor 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 cychien
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,26 @@
1
- # Temporary Holding Version
1
+ # create-parlor
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Create a [Parlor](https://cychien.github.io/parlor) app: actions, a page, and an agent sidebar that drives your own coding agent.
4
+
5
+ ```sh
6
+ pnpm create parlor my-app
7
+ npm create parlor@latest my-app
8
+ yarn create parlor my-app
9
+ bun create parlor my-app
10
+ ```
11
+
12
+ It asks only for the name. `--yes` never prompts; `--no-install`, `--no-git`, `--package-manager <npm|pnpm|yarn|bun>`, `--add auth` and `--dry-run` change the defaults. The first action in the app it creates:
13
+
14
+ ```ts
15
+ import { defineAction } from "@parlor/core";
16
+ import { z } from "zod";
17
+
18
+ export const addTodo = defineAction({
19
+ description: "Add a todo.",
20
+ input: z.object({ title: z.string().trim().min(1) }),
21
+ writes: ["todos"],
22
+ run: ({ title }) => ({ title, done: false }),
23
+ });
24
+ ```
25
+
26
+ Docs: https://cychien.github.io/parlor/getting-started/
package/dist/args.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ import { type AddonName, type PackageManagerName } from "@parlor/scaffold";
2
+ export declare const DEFAULT_DIRECTORY = "my-parlor-app";
3
+ export interface CreateRequest {
4
+ readonly directory: string | undefined;
5
+ readonly yes: boolean;
6
+ readonly install: boolean;
7
+ readonly git: boolean;
8
+ readonly packageManager: PackageManagerName | undefined;
9
+ readonly addons: readonly AddonName[];
10
+ readonly dryRun: boolean;
11
+ readonly help: boolean;
12
+ readonly version: boolean;
13
+ }
14
+ export declare const USAGE: string;
15
+ /** npm 7+ passes a lone `--` through to the initializer; it is dropped like create-astro does. */
16
+ export declare function parseCreateArgs(argv: readonly string[]): CreateRequest;
17
+ export declare function canPrompt(stdin: {
18
+ readonly isTTY?: boolean;
19
+ }, stdout: {
20
+ readonly isTTY?: boolean;
21
+ }, env: NodeJS.ProcessEnv): boolean;
22
+ //# sourceMappingURL=args.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,SAAS,EAId,KAAK,kBAAkB,EACxB,MAAM,kBAAkB,CAAC;AAE1B,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AAEjD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,cAAc,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACxD,QAAQ,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,KAAK,QAS8B,CAAC;AAEjD,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,aAAa,CA8CtE;AAED,wBAAgB,SAAS,CACvB,KAAK,EAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,EACnC,MAAM,EAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,EACpC,GAAG,EAAE,MAAM,CAAC,UAAU,GACrB,OAAO,CAET"}
package/dist/args.js ADDED
@@ -0,0 +1,59 @@
1
+ import { parseArgs } from "node:util";
2
+ import { ADDON_NAMES, CreateError, isAddonName, PACKAGE_MANAGERS, } from "@parlor/scaffold";
3
+ export const DEFAULT_DIRECTORY = "my-parlor-app";
4
+ export const USAGE = `Usage: create-parlor [directory] [options]
5
+
6
+ -y, --yes Use every default and never prompt
7
+ --package-manager <pm> npm, pnpm, yarn or bun (default: the one running this)
8
+ --add <addon> Run \`parlor add <addon>\` after install; repeatable (${ADDON_NAMES.join(", ")})
9
+ --no-install Skip installing dependencies
10
+ --no-git Skip the initial git commit
11
+ --dry-run List the files that would be written and stop
12
+ -h, --help Show this help
13
+ -v, --version Show the version`;
14
+ /** npm 7+ passes a lone `--` through to the initializer; it is dropped like create-astro does. */
15
+ export function parseCreateArgs(argv) {
16
+ const { values, positionals } = parseArgs({
17
+ args: argv.filter((arg) => arg !== "--"),
18
+ allowPositionals: true,
19
+ allowNegative: true,
20
+ strict: true,
21
+ options: {
22
+ yes: { type: "boolean", short: "y", default: false },
23
+ install: { type: "boolean", default: true },
24
+ git: { type: "boolean", default: true },
25
+ "package-manager": { type: "string" },
26
+ add: { type: "string", multiple: true, default: [] },
27
+ "dry-run": { type: "boolean", default: false },
28
+ help: { type: "boolean", short: "h", default: false },
29
+ version: { type: "boolean", short: "v", default: false },
30
+ },
31
+ });
32
+ if (positionals.length > 1) {
33
+ throw new CreateError(`Expected one directory, got: ${positionals.join(" ")}`);
34
+ }
35
+ const manager = values["package-manager"];
36
+ if (manager !== undefined &&
37
+ !PACKAGE_MANAGERS.includes(manager)) {
38
+ throw new CreateError(`Unknown package manager "${manager}". Expected one of: ${PACKAGE_MANAGERS.join(", ")}`);
39
+ }
40
+ const unknownAddons = values.add.filter((name) => !isAddonName(name));
41
+ if (unknownAddons.length > 0) {
42
+ throw new CreateError(`Unknown add-on ${unknownAddons.map((name) => `"${name}"`).join(", ")}. Expected one of: ${ADDON_NAMES.join(", ")}`);
43
+ }
44
+ return {
45
+ directory: positionals[0],
46
+ yes: values.yes,
47
+ install: values.install,
48
+ git: values.git,
49
+ packageManager: manager,
50
+ addons: [...new Set(values.add.filter(isAddonName))],
51
+ dryRun: values["dry-run"],
52
+ help: values.help,
53
+ version: values.version,
54
+ };
55
+ }
56
+ export function canPrompt(stdin, stdout, env) {
57
+ return Boolean(stdin.isTTY && stdout.isTTY && !env.CI);
58
+ }
59
+ //# sourceMappingURL=args.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EACL,WAAW,EAEX,WAAW,EACX,WAAW,EACX,gBAAgB,GAEjB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAcjD,MAAM,CAAC,MAAM,KAAK,GAAG;;;;uFAIkE,WAAW,CAAC,IAAI,CAAC,IAAI,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ist/main.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":""}
package/dist/main.js ADDED
@@ -0,0 +1,77 @@
1
+ #!/usr/bin/env node
2
+ import { resolve } from "node:path";
3
+ import { cancel, isCancel, text } from "@clack/prompts";
4
+ import { CreateError, createProject, FRAMEWORK_VERSION, fromUserAgent, } from "@parlor/scaffold";
5
+ import { canPrompt, DEFAULT_DIRECTORY, parseCreateArgs, USAGE } from "./args.js";
6
+ import { dryRunReport, nextSteps } from "./next-steps.js";
7
+ async function askDirectory() {
8
+ const answer = await text({
9
+ message: "Project name",
10
+ placeholder: DEFAULT_DIRECTORY,
11
+ defaultValue: DEFAULT_DIRECTORY,
12
+ });
13
+ if (isCancel(answer)) {
14
+ cancel("Cancelled");
15
+ return undefined;
16
+ }
17
+ return answer.trim() || DEFAULT_DIRECTORY;
18
+ }
19
+ async function main(argv) {
20
+ const request = parseCreateArgs(argv);
21
+ if (request.help) {
22
+ console.log(USAGE);
23
+ return 0;
24
+ }
25
+ if (request.version) {
26
+ console.log(FRAMEWORK_VERSION);
27
+ return 0;
28
+ }
29
+ const detected = fromUserAgent(process.env.npm_config_user_agent);
30
+ const packageManager = request.packageManager
31
+ ? {
32
+ name: request.packageManager,
33
+ version: detected?.name === request.packageManager ? detected.version : undefined,
34
+ }
35
+ : (detected ?? { name: "npm", version: undefined });
36
+ const directory = request.directory ??
37
+ (request.yes
38
+ ? DEFAULT_DIRECTORY
39
+ : canPrompt(process.stdin, process.stdout, process.env)
40
+ ? await askDirectory()
41
+ : undefined);
42
+ if (directory === undefined) {
43
+ if (canPrompt(process.stdin, process.stdout, process.env))
44
+ return 0;
45
+ throw new CreateError(`create-parlor needs a project name when it cannot ask for one. Run, for example:\n ${packageManager.name} create parlor my-app --yes`);
46
+ }
47
+ const project = await createProject({
48
+ directory: resolve(directory),
49
+ packageManager,
50
+ mode: request.dryRun ? "dry-run" : "apply",
51
+ install: request.install,
52
+ git: request.git,
53
+ addons: request.addons,
54
+ log: (line) => console.log(line),
55
+ });
56
+ const lines = request.dryRun
57
+ ? dryRunReport(project)
58
+ : nextSteps(project, process.cwd());
59
+ console.log(lines.join("\n"));
60
+ return project.install.kind === "failed" ? 1 : 0;
61
+ }
62
+ try {
63
+ process.exitCode = await main(process.argv.slice(2));
64
+ }
65
+ catch (error) {
66
+ if (error instanceof CreateError ||
67
+ (error instanceof TypeError &&
68
+ "code" in error &&
69
+ error.code === "ERR_PARSE_ARGS_UNKNOWN_OPTION")) {
70
+ console.error(error.message);
71
+ process.exitCode = 1;
72
+ }
73
+ else {
74
+ throw error;
75
+ }
76
+ }
77
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EACL,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,aAAa,GAEd,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE1D,KAAK,UAAU,YAAY;IACzB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC;QACxB,OAAO,EAAE,cAAc;QACvB,WAAW,EAAE,iBAAiB;QAC9B,YAAY,EAAE,iBAAiB;KAChC,CAAC,CAAC;IACH,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACrB,MAAM,CAAC,WAAW,CAAC,CAAC;QACpB,OAAO,SAAS,CA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OAAO,CAAC,CAAC;QAC7B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type CreatedProject } from "@parlor/scaffold";
2
+ export declare function nextSteps(project: CreatedProject, cwd: string): readonly string[];
3
+ export declare function dryRunReport(project: CreatedProject): readonly string[];
4
+ //# sourceMappingURL=next-steps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next-steps.d.ts","sourceRoot":"","sources":["../src/next-steps.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EAGpB,MAAM,kBAAkB,CAAC;AAQ1B,wBAAgB,SAAS,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAgCjF;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,MAAM,EAAE,CAOvE"}
@@ -0,0 +1,43 @@
1
+ import { relative } from "node:path";
2
+ import { commandsFor, DOCS_URL, formatCommand, } from "@parlor/scaffold";
3
+ const COLUMN = 31;
4
+ function step(command, note) {
5
+ return note ? ` ${command.padEnd(COLUMN)}${note}` : ` ${command}`;
6
+ }
7
+ export function nextSteps(project, cwd) {
8
+ const pm = commandsFor(project.packageManager);
9
+ const where = relative(cwd, project.directory) || ".";
10
+ return [
11
+ `Created ${where} with ${project.packageManager.name}.`,
12
+ "",
13
+ ...(where === "." ? [] : [step(`cd ${where}`)]),
14
+ ...(project.install.kind === "installed" || project.install.kind === "ignored-builds"
15
+ ? []
16
+ : [step(formatCommand(pm.install))]),
17
+ step(pm.run("dev"), "web app on http://localhost:5173, API on :3000"),
18
+ ...project.addons.deferred.map((addon) => step(pm.exec("parlor", ["add", addon]), `finish adding ${addon}`)),
19
+ ...(project.addons.applied.includes("auth") ||
20
+ project.addons.deferred.includes("auth")
21
+ ? []
22
+ : [step(pm.exec("parlor", ["add", "auth"]), "sign-in with Better Auth")]),
23
+ step(pm.exec("parlor", ["dev", "--target", "mac"]), "the same app as a desktop window"),
24
+ "",
25
+ "Open http://localhost:5173 and press Agent to chat with your coding agent.",
26
+ `AGENTS.md tells coding agents how this project works. Docs: ${DOCS_URL}/llms.txt`,
27
+ ...(project.git.kind === "failed"
28
+ ? [
29
+ "",
30
+ `No initial commit: ${project.git.message.split("\n").find((line) => line.trim()) ?? "git failed"}. Commit the files once git works.`,
31
+ ]
32
+ : []),
33
+ ];
34
+ }
35
+ export function dryRunReport(project) {
36
+ const name = project.identity.directoryName;
37
+ return [
38
+ ...project.files.map((path) => `${name}/${path}`),
39
+ "",
40
+ `${project.files.length} files would be written to ${name}. Nothing was.`,
41
+ ];
42
+ }
43
+ //# sourceMappingURL=next-steps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next-steps.js","sourceRoot":"","sources":["../src/next-steps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,EACL,WAAW,EAEX,QAAQ,EACR,aAAa,GACd,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,GAAG,EAAE,CAAC;AAElB,SAAS,IAAI,CAAC,OAAe,EAAE,IAAa;IAC1C,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC;AACtE,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAuB,EAAE,GAAW;IAC5D,MAAM,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC;IACtD,OAAO;QACL,WAAW,KAAK,SAAS,OAAO,CAAC,cAAc,CAAC,IAAI,GAAG;QACvD,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EAAE;gBACF,sBAAsB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,YAAY,oCAAoC;aACtI;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,OAAuB;IAClD,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC;IAC5C,OAAO;QACL,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;QACjD,EAAE;QACF,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,8BAA8B,IAAI,gBAAgB;KAC1E,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,38 @@
1
1
  {
2
2
  "name": "create-parlor",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "description": "Create a Parlor app: pnpm create parlor, npm create parlor, yarn create parlor, bun create parlor",
5
+ "homepage": "https://cychien.github.io/parlor",
6
+ "bugs": "https://github.com/cychien/parlor/issues",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/cychien/parlor.git",
11
+ "directory": "packages/create-parlor"
12
+ },
13
+ "bin": {
14
+ "create-parlor": "./dist/main.js"
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "type": "module",
20
+ "dependencies": {
21
+ "@clack/prompts": "^1.8.1",
22
+ "@parlor/scaffold": "0.1.0"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^24.14.0",
26
+ "tsx": "^4.23.15",
27
+ "typescript": "^7.0.2",
28
+ "vitest": "^5.0.3"
29
+ },
30
+ "engines": {
31
+ "node": ">=24"
32
+ },
33
+ "scripts": {
34
+ "build": "tsc -p tsconfig.json",
35
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.spec.json --noEmit",
36
+ "test": "vitest run"
37
+ }
6
38
  }