97% fewer tokens for AI agents to understand infra — layout index for Kubernetes, Docker, Terraform, Helm plus shell completions
Project description
Kubed
97% fewer tokens for AI agents to understand your infrastructure.
CLI and context tooling for Kubernetes, Docker, Terraform, and Helm. Kubed writes a single .kubed/layout.json that captures your entire infra layout—Dockerfiles, Terraform, Helm charts, K8s resources, project structure, and cross-repo shared infra. Agents read one ~1,500-token file instead of running 10+ discovery commands that consume 50,000+ tokens.
| Without Kubed | With Kubed |
|---|---|
| ~50,000+ tokens | ~1,500 tokens |
| 10+ tool calls | 1 file read |
| Repeated discovery | Snapshot-based |
- Docs: cmds.daleyarborough.com
- Layout index:
kubed layout capturewrites.kubed/layout.json;kubed layout showprints it. Schema: docs/LAYOUT_SCHEMA.md.
Installation (Python package)
pip install kubed
kubed-setup
Non-interactive: kubed-setup --force-yes. See cmds.daleyarborough.com for full docs.
Layout commands (Go binary)
Build the binary (requires Go 1.21+):
make build # outputs build/kubed
# or: go build -o build/kubed ./cmd/kubed
kubed layout capture— Connect to current kube context; index Deployments, Services, ConfigMaps, Secrets and their relationships; write.kubed/layout.json(or~/.kubed/layout.jsonif not in a git repo). Optional:--all-namespaces.kubed layout show— Printlayout.jsonto stdout. If missing, prints "run kubed layout capture" and exits 1.
Use .kubed/layout.json for infra layout; run kubed layout capture after cluster changes. This repo does not use Kubernetes; we validate layout with make test (fixture-based agent-query tests).
Development: test before pushing
Run make verify before pushing to main (same idea as Kubernetes: only working, quality code).
make verify # runs go vet + tests (unit + agent-query tests)
make test # tests only
make build # build binary
make help # list targets
Tests include agent-query tests: given a layout fixture, they assert that the data passed to an agent/LLM answers questions like "what workloads exist?", "what does service X select?", "what configmaps does deployment Y use?". See internal/layout/query_test.go.
Kubed Documentation (site)
This is the documentation website for the Kubed CLI tool, built with Jekyll and Tailwind CSS.
Setup
Prerequisites
- Ruby 2.7+ with Bundler
- Node.js 14+ with npm
Installation
- Install Ruby dependencies:
bundle install
- Install Node.js dependencies:
npm install
Development
To run the site locally with live reload:
npm run dev
You can then access the site at http://localhost:4000
Building for Production
npm run build:css
bundle exec jekyll build
The site will be generated in the _site directory.
Content
index.md: The home page/docker/,/kubernetes/,/terraform/,/helm/: Tool-specific documentationinstallation.md: Installation instructions
License
MIT. See the LICENSE file for details.
Contributing
Contributions are welcome. Please open an issue or submit a pull request.
Contact
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kubed-2.3.1.tar.gz.
File metadata
- Download URL: kubed-2.3.1.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca8d8c60cb85661f892259312c2ecd766c2db984b39daa54ec8349170c3e5143
|
|
| MD5 |
514ca1a0046b253b0a8ecf5dc4be4d34
|
|
| BLAKE2b-256 |
8a81e84abc7a20e193754ab2110a5c7a34e762a79fd50c909c64f7314636c8fa
|
File details
Details for the file kubed-2.3.1-py3-none-any.whl.
File metadata
- Download URL: kubed-2.3.1-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b30a893446794b43475f708e1f07ef1b43055753f92616a4d676212ef769c187
|
|
| MD5 |
6220478d1fd06a4dc366baa56283e4ba
|
|
| BLAKE2b-256 |
63776123c35038c76849a15c3ddd03389b08be2833ae018b6ff18fbd3da89dc2
|