Infrastructure context for humans and agents.
- System Description: Document infrastructure in "peace times" for faster incident response
- Triage and Tracing: USE method diagnostics and cross-stack request tracing, driven by Claude
- Living Documentation: Accumulates learnings over time from both humans and Claude
- Multi-project: Hierarchical organization (customer/project)
- File-based: Human-editable YAML files, no database required
- Monitoring Queries: Query Prometheus, Loki, CheckMK, Monit, and SOS from the CLI
- Source Sync: Import nodes from Proxmox VE clusters and SSH config files
Requires Python 3.14+.
# From source
git clone https://github.com/sysinit-at/infracontext.git
cd infracontext
uv sync
# Create shell alias (add to .zshrc/.bashrc)
alias ic='uv run --directory /path/to/infracontext ic'# Initialize and create a project
ic init
ic describe project create acme/production
# Add nodes
ic describe node create --type vm --name "web-server"
ic describe node edit vm:web-server # Add ssh_alias, triage config
# Import from SSH config
ic import ssh --path ~/.ssh/config
# Create relationships
ic describe relationship wizard
# Query monitoring
ic query status vm:web-server
# Analyze infrastructure
ic graph spof
ic graph analyze vm:web-server
# Validate data
ic doctorInstall the skills and agents:
# Triage skill
ln -s /path/to/infracontext/commands/ic-triage.md ~/.claude/commands/ic-triage.md
# Node collector skill
ln -s /path/to/infracontext/commands/ic-collect.md ~/.claude/commands/ic-collect.md
# Diagnostic agents (used by triage)
ln -s /path/to/infracontext/agents ~/.claude/agents/infracontextThen in Claude Code:
# Collect info from a server and create a node YAML
/ic-collect web-prod
# Triage with the USE method
/ic-triage vm:web-server "high CPU"
Claude gets context from ic, performs SSH-based diagnostics, and records learnings.
- docs/USAGE.md - User guide
- docs/SCHEMA.md - Node YAML schema reference
MIT