Skip to content

The open-source app everyone uses to manage agents at work

feat(cli): add --yes flag to onboard for non-interactive quickstart

Dottab5e2433822ab
diff --git a/cli/src/commands/onboard.ts b/cli/src/commands/onboard.ts
index f283c63651..d9547dedbd 100644
--- a/cli/src/commands/onboard.ts
+++ b/cli/src/commands/onboard.ts
@@ -24,6 +24,7 @@ type SetupMode = "quickstart" | "advanced";
type OnboardOptions = {
config?: string;
run?: boolean;
+ yes?: boolean;
invokedByRun?: boolean;
};
@@ -80,27 +81,32 @@ export async function onboard(opts: OnboardOptions): Promise<void> {
}
}
- const setupModeChoice = await p.select({
- message: "Choose setup path",
- options: [
- {
- value: "quickstart" as const,
- label: "Quickstart",
- hint: "Recommended: local defaults + ready to run",
- },
- {
- value: "advanced" as const,
- label: "Advanced setup",
- hint: "Customize database, server, storage, and more",
- },
- ],
- initialValue: "quickstart",
- });
- if (p.isCancel(setupModeChoice)) {
- p.cancel("Setup cancelled.");
- return;
+ let setupMode: SetupMode = "quickstart";
+ if (opts.yes) {
+ p.log.message(pc.dim("`--yes` enabled: using Quickstart defaults."));
+ } else {
+ const setupModeChoice = await p.select({
+ message: "Choose setup path",
+ options: [
+ {
+ value: "quickstart" as const,
+ label: "Quickstart",
+ hint: "Recommended: local defaults + ready to run",
+ },
+ {
+ value: "advanced" as const,
+ label: "Advanced setup",
+ hint: "Customize database, server, storage, and more",
+ },
+ ],
+ initialValue: "quickstart",
+ });
+ if (p.isCancel(setupModeChoice)) {
+ p.cancel("Setup cancelled.");
+ return;
+ }
+ setupMode = setupModeChoice as SetupMode;
}
- const setupMode = setupModeChoice as SetupMode;
let llm: PaperclipConfig["llm"] | undefined;
let {
@@ -260,7 +266,7 @@ export async function onboard(opts: OnboardOptions): Promise<void> {
await bootstrapCeoInvite({ config: configPath });
}
- let shouldRunNow = opts.run === true;
+ let shouldRunNow = opts.run === true || opts.yes === true;
if (!shouldRunNow && !opts.invokedByRun && process.stdin.isTTY && process.stdout.isTTY) {
const answer = await p.confirm({
message: "Start Paperclip now?",
diff --git a/cli/src/index.ts b/cli/src/index.ts
index 50ad8d8838..e069f7349f 100644
--- a/cli/src/index.ts
+++ b/cli/src/index.ts
@@ -40,6 +40,7 @@ program
.description("Interactive first-run setup wizard")
.option("-c, --config <path>", "Path to config file")
.option("-d, --data-dir <path>", DATA_DIR_OPTION_HELP)
+ .option("-y, --yes", "Accept defaults (quickstart + start immediately)", false)
.option("--run", "Start Paperclip immediately after saving config", false)
.action(onboard);
diff --git a/docs/cli/setup-commands.md b/docs/cli/setup-commands.md
index 95eb1b7992..7dc5cd6ad0 100644
--- a/docs/cli/setup-commands.md
+++ b/docs/cli/setup-commands.md
@@ -44,6 +44,12 @@ Start immediately after onboarding:
pnpm paperclipai onboard --run
```
+Non-interactive defaults + immediate start (opens browser on server listen):
+
+```sh
+pnpm paperclipai onboard --yes
+```
+
## `paperclipai doctor`
Health checks with optional auto-repair: