Skip to main content

tideway_cli/commands/
templates.rs

1//! Templates command - list available templates.
2
3use anyhow::Result;
4use colored::Colorize;
5
6use crate::is_json_output;
7
8pub fn run() -> Result<()> {
9    if is_json_output() {
10        return Ok(());
11    }
12    println!("\n{}\n", "Available Templates".cyan().bold());
13
14    println!("{}", "Auth Module:".yellow());
15    println!("  - LoginForm.vue        Email/password login with MFA support");
16    println!("  - RegisterForm.vue     User + organization registration");
17    println!("  - ForgotPassword.vue   Request password reset");
18    println!("  - ResetPassword.vue    Complete password reset");
19    println!("  - MfaVerify.vue        MFA code verification");
20    println!("  - useAuth.ts           Auth composable");
21
22    println!("\n{}", "Billing Module:".yellow());
23    println!("  - SubscriptionStatus.vue    Current plan and trial info");
24    println!("  - CheckoutButton.vue        Redirect to Stripe Checkout");
25    println!("  - BillingPortalButton.vue   Redirect to Stripe Portal");
26    println!("  - InvoiceHistory.vue        List past invoices");
27    println!("  - PlanSelector.vue          Display available plans");
28    println!("  - useBilling.ts             Billing composable");
29
30    println!("\n{}", "Organizations Module:".yellow());
31    println!("  - OrgSwitcher.vue      Switch between organizations");
32    println!("  - OrgSettings.vue      Edit organization details");
33    println!("  - MemberList.vue       List members with roles");
34    println!("  - InviteMember.vue     Send email invitations");
35    println!("  - useOrganization.ts   Organization composable");
36
37    println!("\n{}", "Shared:".yellow());
38    println!("  - types/index.ts       TypeScript types for API");
39    println!("  - useApi.ts            Base API composable");
40
41    println!("\n{}", "Styling Options:".cyan());
42    println!("  --style shadcn     {} shadcn-vue components", "(default)".dimmed());
43    println!("  --style tailwind   Plain Tailwind CSS classes");
44    println!("  --style unstyled   Minimal HTML, no styling");
45
46    println!("\n{}", "Usage:".cyan());
47    println!("  tideway generate auth --style shadcn");
48    println!("  tideway generate billing --output ./src/components");
49    println!("  tideway generate all --framework vue");
50
51    println!();
52
53    Ok(())
54}