Skip to content

Commit 7082a66

Browse files
cevianclaude
andcommitted
feat(cli): default to cloud run when invoked with no subcommand
Like `vercel` defaults to deploy, `crayon` now defaults to `cloud run` when no arguments are given. Help is still available via `crayon --help`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2cfd4b8 commit 7082a66

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

packages/core/src/cli/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,4 +700,9 @@ program
700700
console.log(pc.green("Logged out. Credentials removed from ~/.crayon/credentials"));
701701
});
702702

703+
// Default to `cloud run` when invoked with no subcommand
704+
if (process.argv.length <= 2) {
705+
process.argv.push("cloud", "run");
706+
}
707+
703708
program.parse();

scripts/install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,16 @@ main() {
184184
printf "${GREEN}${BOLD} Installation complete!${RESET}\n\n" >&2
185185
printf "${BOLD} To get started, run:${RESET}\n\n" >&2
186186
if $PATH_UPDATED; then
187-
printf "${CYAN} export PATH=\"\${HOME}/.local/bin:\${PATH}\"; crayon cloud run${RESET}\n\n" >&2
187+
printf "${CYAN} export PATH=\"\${HOME}/.local/bin:\${PATH}\"; crayon${RESET}\n\n" >&2
188188
else
189-
printf "${CYAN} crayon cloud run${RESET}\n\n" >&2
189+
printf "${CYAN} crayon${RESET}\n\n" >&2
190190
fi
191191

192192
if [ -t 0 ]; then
193193
printf "${BOLD} Launch now? [Y/n]${RESET} " >&2
194194
read -r answer
195195
case "$answer" in
196-
[yY]*|"") exec "${HOME}/.local/bin/crayon" cloud run ;;
196+
[yY]*|"") exec "${HOME}/.local/bin/crayon" ;;
197197
esac
198198
fi
199199
}

0 commit comments

Comments
 (0)