From 3352a3ea393849550573deff8d774ba6bf149471 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Wed, 24 Apr 2024 11:37:35 +0100 Subject: build(cli): Prepare for publishing CLI to npm --- apps/cli/src/commands/whoami.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 apps/cli/src/commands/whoami.ts (limited to 'apps/cli/src/commands/whoami.ts') diff --git a/apps/cli/src/commands/whoami.ts b/apps/cli/src/commands/whoami.ts new file mode 100644 index 00000000..b55bfa67 --- /dev/null +++ b/apps/cli/src/commands/whoami.ts @@ -0,0 +1,10 @@ +import { getAPIClient } from "@/lib/trpc"; +import { Command } from "@commander-js/extra-typings"; + +export const whoamiCmd = new Command() + .name("whoami") + .description("returns info about the owner of this API key") + .action(async () => { + const resp = await getAPIClient().users.whoami.query(); + console.log(resp); + }); -- cgit v1.2.3-70-g09d2