Installation
The Aiven CLI (avn) is distributed as a Python package and can be installed using pip or Homebrew.
- pip
- Homebrew (macOS)
- pipx (isolated)
Verify installation
Check that the CLI is installed correctly:Authentication
Authenticate with Aiven using your email and password or a personal token.- Password
- Token (recommended)
- Marketplace
1
Login with email
2
Enter password
Enter your password when prompted
Getting started
After authentication, you can start managing your Aiven resources.List projects
Set default project
List services
Common operations
Service management
Create a service
Create a PostgreSQL service:Get service details
Update a service
Scale to a different plan:Power management
Power off a service (stops billing for compute):Delete a service
Wait for service to be ready
Database operations
PostgreSQL and MySQL databases
List databases:User management
List service users:Apache Kafka operations
Topic management
List topics:ACL management
List ACLs:Connection information
Get connection details:Service integrations
List available integration types:Advanced features
VPC management
List VPCs:Service logs
View service logs:Metrics
Get service metrics:hour, day, week, month, year
Query statistics
List slow queries (PostgreSQL/MySQL):Maintenance
Start maintenance immediately:Interactive shells
Open an interactive shell to a service:Configuration
Output format
Get JSON output for any command:Project switching
Switch between projects:Configuration file
The CLI stores configuration in~/.config/aiven/aiven-credentials.json
Service types and plans
List available service types:Scripting tips
Error handling
Parse JSON output
Wait for service creation
Bulk operations
Common use cases
CI/CD integration
CI/CD integration
Backup and disaster recovery
Backup and disaster recovery
Migration tasks
Migration tasks