atmos ai ask
Use this command to ask the AI assistant a specific question and get an immediate response, without entering an interactive chat session.
Configure AI
Learn how to configure AI providers, skills, tools, and sessions in your atmos.yaml.
Description
The atmos ai ask command allows you to ask questions directly from the command line. The AI assistant analyzes your question in the context of your Atmos configuration and provides a detailed response.
This is ideal for:
- Quick one-off questions
- Scripting and automation
- Getting specific information without interactive mode
- CI/CD pipeline integration
Usage
atmos ai ask [question]
Arguments
question- The question to ask the AI assistant (required). Use quotes for multi-word questions.
Flags
--include <pattern>- Add glob patterns to include in context (can be repeated)
--exclude <pattern>- Add glob patterns to exclude from context (can be repeated)
--no-auto-context- Disable automatic context discovery
--no-tools- Disable tool execution for faster, simpler queries
Examples
General Atmos Questions
Configuration-Specific Questions
Component-Specific Questions
atmos ai ask "Describe the vpc component in the dev stack"
atmos ai ask "What variables does the eks component require?"
atmos ai ask "How is the rds component configured in production?"
Best Practices Questions
atmos ai ask "What's the best way to organize my components?"
atmos ai ask "How should I structure my stack inheritance?"
atmos ai ask "What are the security best practices for Atmos?"
Workflow Questions
atmos ai ask "How do I use workflows in Atmos?"
atmos ai ask "What's the difference between terraform and helmfile components?"
atmos ai ask "How do I vendor external components?"
Advanced Usage
In Scripts and Automation
#!/bin/bash
# Get AI assistance in a script
response=$(atmos ai ask "What components are affected by changes to networking?")
echo "$response"
# Use in CI/CD
if atmos validate stacks; then
atmos ai ask "What's the recommended deployment order for these stacks?"
fi
Complex Multi-Part Questions
# Use quotes for multi-word questions
atmos ai ask "How do I migrate from one cloud provider to another using Atmos?"
# Ask about specific error messages
atmos ai ask "I'm getting error 'component not found'. What does this mean and how do I fix it?"
Output Format
The command outputs:
- Thinking indicator - Shows the AI is processing
- AI response header - Identifies the response source
- Formatted response - Markdown-formatted answer with code blocks, lists, and emphasis
Comparison with Other Commands
atmos ai ask- One-off questions, scripting, quick answers.
atmos ai chat- Extended conversations, learning, exploration.
Related Commands
📄️ atmos ai chat
Start an interactive chat session
📄️ atmos ai exec
Run Atmos and shell commands via AI prompts
📄️ atmos ai sessions
Manage AI chat sessions
📄️ AI Skills
Install and use 21+ specialized AI skills