8000 fix(cli): remove full-send flag and add it as a command instead by akhileshrangani4 · Pull Request #155 · tambo-ai/tambo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(cli): remove full-send flag and add it as a command instead #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { handleInit } from "./commands/init.js";

interface CLIFlags extends Record<string, any> {
init?: Flag<"boolean", boolean>;
fullSend?: Flag<"boolean", boolean>;
legacyPeerDeps?: Flag<"boolean", boolean>;
}

Expand All @@ -18,15 +17,16 @@ const cli = meow(
$ ${chalk.cyan("tambo")} ${chalk.yellow("<command>")} [options]

${chalk.bold("Commands")}
${chalk.yellow("init")} Initialize tambo in a project by creating a \`hydra-config.ts\` file
${chalk.yellow("init")} Initialize tambo in a project and set up configuration
${chalk.yellow("add")} Add a new component
${chalk.yellow("full-send")} Full initialization with auth flow and component installation

${chalk.bold("Options")}
${chalk.yellow("--full-send")} Full initialization with auth flow and component installation
${chalk.yellow("--legacy-peer-deps")} Install dependencies with --legacy-peer-deps flag

${chalk.bold("Examples")}
$ ${chalk.cyan("tambo")} ${chalk.yellow("init 940E --full-send")}
$ ${chalk.cyan("tambo")} ${chalk.yellow("init")}
$ ${chalk.cyan("tambo")} ${chalk.yellow("full-send")}
$ ${chalk.cyan("tambo")} ${chalk.yellow("add <componentName>")}
$ ${chalk.cyan("tambo")} ${chalk.yellow("add <componentName> --legacy-peer-deps")}
`,
Expand All @@ -36,11 +36,6 @@ const cli = meow(
type: "boolean",
description: "Initialize tambo in a project",
},
fullSend: {
type: "boolean",
description:
"Full initialization with auth flow and component installation",
},
legacyPeerDeps: {
type: "boolean",
description: "Install dependencies with --legacy-peer-deps flag",
Expand All @@ -57,9 +52,9 @@ async function handleCommand(cmd: string, flags: Result<CLIFlags>["flags"]) {
return;
}

if (cmd === "init") {
if (cmd === "init" || cmd === "full-send") {
await handleInit({
fullSend: Boolean(flags.fullSend),
fullSend: cmd === "full-send",
legacyPeerDeps: Boolean(flags.legacyPeerDeps),
});
return;
Expand Down
0