🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@devopsagent/cli

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@devopsagent/cli

CLI for DevOps Agent - AI-powered infrastructure management from your terminal

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

DevOps Agent CLI

A terminal-first interface to DevOps Agent — run infrastructure commands directly, pipe output to scripts, and skip the browser entirely.

Installation

npm install -g @devopsagent/cli

Requires Node.js 18+.

Authentication

1. Get your API key

Log in to devopsagent.io, go to Settings → API Keys → Create Key.

2. Log in

devopsagent login

You'll be prompted for your API key. It's stored at ~/.devopsagent/config.json.

3. Verify

devopsagent whoami

Commands

AI Chat

Talk to the agent in natural language — same as the web UI:

# One-shot question
devopsagent ask "why is my pod in CrashLoopBackOff?"

# Pipe a question
echo "list ec2 instances in us-east-1" | devopsagent ask

# Interactive session
devopsagent chat

AWS

# EC2
devopsagent aws ec2 list
devopsagent aws ec2 list --region eu-west-1
devopsagent aws ec2 list --output json | jq '.[] | select(.state=="running")'
devopsagent aws ec2 describe i-0abc123def456

# S3
devopsagent aws s3 list

# RDS
devopsagent aws rds list --region us-east-1

# EKS
devopsagent aws eks list --region us-west-2

# Lambda
devopsagent aws lambda list

Flags:

FlagDescription
-r, --region <region>AWS region (default: your configured region)
-o, --output <format>table (default) or json

Kubernetes

# Pods
devopsagent k8s pods
devopsagent k8s pods --namespace production
devopsagent k8s pods --context my-cluster --output json

# Deployments
devopsagent k8s deployments -n kube-system

# Services
devopsagent k8s services --namespace staging

# Nodes
devopsagent k8s nodes

# Logs
devopsagent k8s logs my-pod-abc123
devopsagent k8s logs my-pod-abc123 --namespace production --lines 200
devopsagent k8s logs my-pod-abc123 --container sidecar

Flags:

FlagDescription
-n, --namespace <ns>Kubernetes namespace (default: default)
-c, --context <ctx>Kubeconfig context
-o, --output <format>table (default) or json

Terraform

devopsagent terraform plan --dir ./infra
devopsagent terraform apply --dir ./infra --auto-approve
devopsagent terraform output --dir ./infra
devopsagent terraform output --json
devopsagent terraform workspaces --dir ./infra
devopsagent terraform validate --dir ./infra

# Alias: tf
devopsagent tf plan --dir ./infra

Flags:

FlagDescription
-d, --dir <path>Working directory (default: .)
--auto-approveSkip interactive approval (apply only)
--var-file <file>Terraform var file
--jsonJSON output (output command only)

Docker

# Containers
devopsagent docker ps
devopsagent docker ps --all

# Images
devopsagent docker images
devopsagent docker images --output json

# Logs
devopsagent docker logs my-container
devopsagent docker logs my-container --lines 500

# Stats
devopsagent docker stats

Output Formats

All list commands support --output table (default) and --output json.

JSON output is designed for piping:

# Find all stopped EC2 instances
devopsagent aws ec2 list --output json | jq '.[] | select(.state=="stopped") | .instance_id'

# Count running pods per namespace
devopsagent k8s pods -n production --output json | jq 'length'

# Get a specific Terraform output value
devopsagent terraform output --json | jq '.database_url.value'

Configuration

Config is stored at ~/.devopsagent/config.json:

{
  "api_key": "doa_live_...",
  "server_url": "https://devopsagent.io"
}

To point the CLI at a self-hosted instance:

devopsagent config set server_url http://localhost:5000

Tier Requirements

Command groupRequired tier
ask / chatFree and above
aws, k8s, terraform, dockerProfessional ($99/mo) or Business ($299/mo)

Direct tool commands (aws, k8s, etc.) call the DevOps Agent API and use your stored cloud credentials — no local AWS CLI or kubeconfig needed on the machine running the CLI.

Troubleshooting

"Not logged in" — run devopsagent login

"api_access_restricted" — direct tool commands require Professional or Business tier. Use devopsagent ask for AI-mediated queries on lower tiers.

"Invalid API key" — regenerate your key at Settings → API Keys

Wrong server — check ~/.devopsagent/config.json for server_url

Keywords

devops

FAQs

Package last updated on 19 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts