Skip to content

Commit 5069442

Browse files
Mike Morganclaude
andcommitted
feat: Add AI-powered CLI commands for influencer demos
- Add 'cx ask' command for natural language queries - Add 'cx install' shortcut (e.g., cx install cuda drivers for nvidia) - Add 'cx setup' shortcut (e.g., cx setup lamp stack with php 8.3) - Add 'cx what' shortcut (e.g., cx what packages use most disk space) - Add 'cx fix' shortcut for AI-assisted error fixing - Add 'cx explain' shortcut for command explanations - Wire commands to CX daemon via Unix socket IPC - Include fallback mode when daemon not running Demo-ready commands: cx install cuda drivers for my nvidia gpu cx setup lamp stack with php 8.3 cx what packages use the most disk space Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 37dc773 commit 5069442

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

wezterm/src/main.rs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,31 @@ enum SubCommand {
142142
#[arg(long, value_parser)]
143143
shell: Shell,
144144
},
145+
146+
// CX Terminal: AI-powered commands
147+
/// Ask AI a question or request an action
148+
#[command(name = "ask", about = "Ask AI a question or request an action")]
149+
Ask(cli::ask::AskCommand),
150+
151+
/// Install packages using natural language
152+
#[command(name = "install", about = "Install packages using natural language (e.g., cx install cuda drivers)")]
153+
Install(cli::shortcuts::InstallCommand),
154+
155+
/// Setup or configure systems using natural language
156+
#[command(name = "setup", about = "Setup systems using natural language (e.g., cx setup lamp stack)")]
157+
Setup(cli::shortcuts::SetupCommand),
158+
159+
/// Ask questions about the system
160+
#[command(name = "what", about = "Ask about your system (e.g., cx what packages use the most disk space)")]
161+
What(cli::shortcuts::WhatCommand),
162+
163+
/// Fix errors using AI
164+
#[command(name = "fix", about = "Fix errors using AI assistance")]
165+
Fix(cli::shortcuts::FixCommand),
166+
167+
/// Explain a command, file, or concept
168+
#[command(name = "explain", about = "Explain a command or concept")]
169+
Explain(cli::shortcuts::ExplainCommand),
145170
}
146171

147172
use termwiz::escape::osc::{
@@ -762,6 +787,13 @@ fn run() -> anyhow::Result<()> {
762787
generate_completion(shell, &mut cmd, name, &mut std::io::stdout());
763788
Ok(())
764789
}
790+
// CX Terminal: AI-powered commands
791+
SubCommand::Ask(cmd) => cmd.run(),
792+
SubCommand::Install(cmd) => cmd.run(),
793+
SubCommand::Setup(cmd) => cmd.run(),
794+
SubCommand::What(cmd) => cmd.run(),
795+
SubCommand::Fix(cmd) => cmd.run(),
796+
SubCommand::Explain(cmd) => cmd.run(),
765797
}
766798
}
767799

0 commit comments

Comments
 (0)