feat: tfcode beta

This commit is contained in:
Gab
2026-03-24 14:01:32 +11:00
parent 4596310485
commit 4380efd658
10 changed files with 971 additions and 332 deletions

View File

@@ -0,0 +1,53 @@
import { cmd } from "@/cli/cmd/cmd"
import { UI } from "@/cli/ui"
const QuickstartCommand = cmd({
command: "quickstart",
describe: "show quick start guide",
handler: () => {
UI.println("")
UI.println(UI.Style.TEXT_HIGHLIGHT_BOLD + "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" + UI.Style.TEXT_NORMAL)
UI.println(UI.Style.TEXT_HIGHLIGHT_BOLD + " tfcode - Quick Start Guide" + UI.Style.TEXT_NORMAL)
UI.println(UI.Style.TEXT_HIGHLIGHT_BOLD + "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" + UI.Style.TEXT_NORMAL)
UI.println("")
UI.println("Welcome to tfcode! Follow these steps to get started:")
UI.println("")
UI.println(UI.Style.TEXT_INFO_BOLD + "STEP 1: Set Your Credentials" + UI.Style.TEXT_NORMAL)
UI.println(UI.Style.TEXT_DIM + " export TF_WORKSPACE_ID=\"your-workspace-id\"" + UI.Style.TEXT_NORMAL)
UI.println(UI.Style.TEXT_DIM + " export TF_API_KEY=\"your-api-key\"" + UI.Style.TEXT_NORMAL)
UI.println(UI.Style.TEXT_DIM + " export TF_REGION=\"au\"" + UI.Style.TEXT_NORMAL)
UI.println(UI.Style.TEXT_DIM + " Regions: au, eu, us" + UI.Style.TEXT_NORMAL)
UI.println("")
UI.println(UI.Style.TEXT_INFO_BOLD + "STEP 2: Validate Connection" + UI.Style.TEXT_NORMAL)
UI.println(UI.Style.TEXT_DIM + " tfcode validate" + UI.Style.TEXT_NORMAL)
UI.println("")
UI.println(UI.Style.TEXT_INFO_BOLD + "STEP 3: Sync Your Tools" + UI.Style.TEXT_NORMAL)
UI.println(UI.Style.TEXT_DIM + " tfcode sync" + UI.Style.TEXT_NORMAL)
UI.println("")
UI.println(UI.Style.TEXT_INFO_BOLD + "STEP 4: Start Coding!" + UI.Style.TEXT_NORMAL)
UI.println(UI.Style.TEXT_DIM + " tfcode" + UI.Style.TEXT_NORMAL)
UI.println("")
UI.println(UI.Style.TEXT_HIGHLIGHT_BOLD + "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" + UI.Style.TEXT_NORMAL)
UI.println("")
UI.println(" Useful Commands:")
UI.println("")
UI.println(" tfcode validate Test your credentials")
UI.println(" tfcode sync Sync tools from workspace")
UI.println(" tfcode tools list Show all your tools")
UI.println(" tfcode Start coding assistant")
UI.println("")
UI.println(UI.Style.TEXT_HIGHLIGHT_BOLD + "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" + UI.Style.TEXT_NORMAL)
UI.println("")
UI.println(" Need help? https://toothfairyai.com/developers/tfcode")
UI.println("")
UI.println(UI.Style.TEXT_HIGHLIGHT_BOLD + "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" + UI.Style.TEXT_NORMAL)
UI.println("")
},
})
export { QuickstartCommand }

View File

@@ -31,6 +31,7 @@ import { PrCommand } from "./cli/cmd/pr"
import { SessionCommand } from "./cli/cmd/session"
import { DbCommand } from "./cli/cmd/db"
import { ValidateCommand, SyncCommand, ToolsMainCommand } from "./cli/cmd/tools"
import { QuickstartCommand } from "./cli/cmd/quickstart"
import path from "path"
import { Global } from "./global"
import { JsonMigration } from "./storage/json-migration"
@@ -149,6 +150,7 @@ let cli = yargs(hideBin(process.argv))
.command(ValidateCommand)
.command(SyncCommand)
.command(ToolsMainCommand)
.command(QuickstartCommand)
if (Installation.isLocal()) {
cli = cli.command(WorkspaceServeCommand)