Skip to content

Commit

Permalink
add: go command (#111)
Browse files Browse the repository at this point in the history
* add: go command

* update: CMDFN
  • Loading branch information
DamilolaAlao authored Jul 24, 2024
1 parent 8203508 commit 8d2d7b2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/cmd-fns/go.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import kleur from "kleur"
import { AppContext } from "lib/util/app-context"
import open from "open"

export const goCmd = async (ctx: AppContext, args: any) => {
const tutorialUrl = "https://docs.tscircuit.com/quickstart"

console.log(kleur.cyan("Opening the TSCircuit Getting Started tutorial in your browser..."))
await open(tutorialUrl)
}
1 change: 1 addition & 0 deletions lib/cmd-fns/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export { soupifyCmd as soupify } from "./soupify"
export { devCmd as dev } from "./dev"
export { initCmd as init } from "./init"
export { addCmd as add } from "./add"
export { goCmd as go } from "./go"
export { removeCmd as remove } from "./remove"
export { installCmd as install } from "./install"
export { uninstallCmd as uninstall } from "./uninstall"
Expand Down
5 changes: 5 additions & 0 deletions lib/get-program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ export const getProgram = (ctx: AppContext) => {
.description("Lint all TypeScript files in the project")
.option("--fix", "Automatically fix problems")
.action((args) => CMDFN.lint(ctx, args))

cmd
.command("go")
.description("Open browser to the TSCircuit Get Started tutorial")
.action((args) => CMDFN.go(ctx, args))

const authCmd = cmd.command("auth").description("Login/logout")
authCmd
Expand Down

0 comments on commit 8d2d7b2

Please sign in to comment.