An AI-powered CLI for Docker.
Chat with an AI to generate Docker commands, or use the local learning mode to master Docker concepts offline.
Watch a quick demonstration of docker-ai
in action.
docker-ai
is a command-line tool that makes it easier to work with Docker by translating natural language into executable commands. It also features a built-in learning mode to help beginners understand core Docker concepts without an internet connection.
- Interactive Shell: An intuitive shell for running Docker commands.
- AI-Powered Commands: Generate Docker commands from natural language.
- Learning Mode: Learn Docker concepts without leaving your terminal.
- Context-Aware: The AI knows about your running containers.
- Command History: Easily access your previously used commands.
First, tap the repository:
brew tap Aj7Ay/homebrew-tap
Then, install docker-ai
:
brew update
brew install docker-ai
- Clone the repository:
git clone https://github.com/Aj7Ay/docker-ai.git cd docker-ai
- Build the binary:
go build -o docker-ai ./cmd/docker-ai
- Move the binary to a directory in your
$PATH
:sudo mv docker-ai /usr/local/bin/
-
Set your API Key:
docker-ai
supports Groq, Gemini, and OpenAI. Set the appropriate environment variable for your chosen provider.For Groq:
export GROQ_API_KEY="your-groq-api-key"
For Gemini:
export GEMINI_API_KEY="your-gemini-api-key"
For OpenAI:
export OPENAI_API_KEY="your-openai-api-key"
-
Run
docker-ai
:By default,
docker-ai
uses the Groq provider with thegemma-3n-e4b-it
model.# This will use Groq by default docker-ai
You can specify a different provider and model with flags. If you only specify the provider, a sensible default model for that provider will be used.
# Use Groq with its default model (gpt-4o) docker-ai --llm-provider=groq # Use OpenAI with its default model (gpt-4o) docker-ai --llm-provider=openai # Use Gemini with a specific model docker-ai --llm-provider=gemini --model=gemini-1.5-pro
To use the offline learning mode, set the DOCKER_AI_MODE
environment variable:
export DOCKER_AI_MODE=learn
docker-ai
exit
orquit
: Exit the interactive shell.reset confirm
: Reset the confirmation prompt for cleanup commands.
docker-ai
will store a configuration file at ~/.docker-ai-config.json
to remember your preferences, such as skipping cleanup warnings.
Contributions are welcome! Please see CONTRIBUTING.md for details.
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.