Skip to main content

One small layout file instead of heavy discovery — agent-friendly infra index for Kubernetes, Docker, Terraform, Helm plus shell completions

Project description

Kubed

One small context file instead of heavy discovery.

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 can read that one file (~1,500 tokens) instead of running 10+ discovery commands whose output can reach 50,000+ tokens. Fewer context tokens, faster answers.

Without Kubed With Kubed
50,000+ tokens (discovery output) ~1,500 tokens (one file)
10+ tool calls 1 file read
Repeated discovery Snapshot-based

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 — Index infra paths, project structure, shared infra, and (optionally) K8s resources; write .kubed/layout.json. Optional: --all-namespaces.
  • kubed layout show — Print layout.json to stdout.

Learned cache (accumulated knowledge)

  • kubed learned show — Print .kubed/learned.json (facts, paths, deps, patterns accumulated across sessions).
  • kubed learned summary — Quick summary: "3 facts, 2 paths, 5 deps, 1 patterns".
  • kubed learned add-fact "fact" [--category=X] [--source=Y] — Add a discovered fact.
  • kubed learned add-path "/path" "description" [--tags=a,b] — Add an important path.
  • kubed learned add-dep "name" [--kind=X] [--version=Y] — Add a dependency.

Agents read learned.json first to avoid re-discovering the same things. When the agent learns something useful (architecture, dependencies, patterns), it persists it so future sessions benefit.

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

  1. Install Ruby dependencies:
bundle install
  1. 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 documentation
  • installation.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

cmds.daleyarborough.com · daleyarborough@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kubed-2.4.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kubed-2.4.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file kubed-2.4.0.tar.gz.

File metadata

  • Download URL: kubed-2.4.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for kubed-2.4.0.tar.gz
Algorithm Hash digest
SHA256 e4ba61bd168be71e9d01728ff9e50c35542f15f90b7bfdf33270965391f6e23b
MD5 531cc3f803984de0a09dfa9675d2da20
BLAKE2b-256 1f2877adf28998dd6f3fd6b8dea11b5bd90f5a17b75cd13cec73f2fc0aeffe80

See more details on using hashes here.

File details

Details for the file kubed-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: kubed-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for kubed-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7085d92027ba6ea2e06b1b2cd49b3d48bf88105d504aa263e0b2882453eee765
MD5 392bd7257b689fda8c68b492dc115e92
BLAKE2b-256 94a730859e22dd2158ceb6a4d2d55e8095203490a9de50ce93aa352133522159

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page