{"id":30024208,"url":"https://github.com/stuttgart-things/k2n","last_synced_at":"2026-05-29T02:31:06.293Z","repository":{"id":305033365,"uuid":"1020763946","full_name":"stuttgart-things/k2n","owner":"stuttgart-things","description":"/ˈkæf.kən/ - ai based claim/code generation","archived":false,"fork":false,"pushed_at":"2026-04-05T08:45:33.000Z","size":119,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-05T09:08:03.752Z","etag":null,"topics":["ai","cicd","generator","platform-engineering"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stuttgart-things.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-16T11:05:22.000Z","updated_at":"2026-04-05T08:45:19.000Z","dependencies_parsed_at":"2025-07-18T02:00:02.544Z","dependency_job_id":"949dc83b-ac2d-4b9c-b533-1f04d70d6dec","html_url":"https://github.com/stuttgart-things/k2n","commit_stats":null,"previous_names":["stuttgart-things/k2n"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/stuttgart-things/k2n","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Fk2n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Fk2n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Fk2n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Fk2n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stuttgart-things","download_url":"https://codeload.github.com/stuttgart-things/k2n/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Fk2n/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33634611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","cicd","generator","platform-engineering"],"created_at":"2025-08-06T06:36:49.601Z","updated_at":"2026-05-29T02:31:06.288Z","avatar_url":"https://github.com/stuttgart-things.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# /ˈkæf.kən/ (k2n)\n\nkaeffken, or in short k2n (/keɪ tuː ɛn/ ) is a cli for generating ai based claims or include statements. The generation is based on examples and rulesets. claims are user-facing Kubernetes custom resources (CRDs) that allow application teams (developers, workloads) to request infrastructure or services without knowing the underlying implementation details.\n\n## FEATURES\n\n- AI-powered code/claim generation from examples and rulesets (`gen`)\n- AI-powered conversational claim rendering via claim-machinery-api (`talk`)\n- Support for multiple AI providers (OpenRouter, Gemini)\n- Interactive TUI menu for guided configuration\n- Output to stdout, file, or directory\n\n## DEV\n\n\u003cdetails\u003e\u003csummary\u003eLINTING\u003c/summary\u003e\n\n```bash\n# RUN LINTING w/ DEFAULTS\ntask go-lint:lint-go\n\n# FOR CONFIGURE OPTIONS\ntask go-lint:lint-go-interactive\n```\n\n\u003c/details\u003e\n\n## USAGE-EXAMPLES\n\n### AI Provider Configuration\n\n\u003cdetails\u003e\u003csummary\u003eOPENROUTER\u003c/summary\u003e\n\n```bash\nexport AI_PROVIDER=\"openrouter\"\nexport AI_MODEL=\"deepseek/deepseek-r1-0528:free\" # pragma: allowlist secret\nexport AI_API_KEY=\"sk-or..\" # pragma: allowlist secret\n# AI_BASE_URL is optional (defaults to https://openrouter.ai/api/v1/chat/completions)\n# export AI_BASE_URL=\"https://openrouter.ai/api/v1/chat/completions\"\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eGEMINI\u003c/summary\u003e\n\n```bash\nexport AI_PROVIDER=\"gemini\"\nexport AI_API_KEY=\"your-gemini-api-key\" # pragma: allowlist secret\n```\n\n\u003c/details\u003e\n\n### Gen Command\n\n\u003cdetails\u003e\u003csummary\u003eVERBOSE OUTPUT OF THE PROMPT (w/o SENDING IT)\u003c/summary\u003e\n\n```bash\nk2n gen \\\n--examples-dirs _examples/examples \\\n--ruleset-env-dir _examples/ruleset-env \\\n--ruleset-usecase-dir _examples/ruleset-runner \\\n--usecase crosssplane \\\n--instruction \"give me a runner-claim for the repository dagger for the cluster sthings\" \\\n--verbose=true \\\n--prompt-to-ai=false\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003ePROMPT AI + OUTPUT TO STDOUT\u003c/summary\u003e\n\n```bash\nexport AI_PROVIDER=\"gemini\"\nexport AI_API_KEY=\"your-gemini-api-key\" # pragma: allowlist secret\n\nk2n gen \\\n--examples-dirs _examples/examples \\\n--ruleset-env-dir _examples/ruleset-env \\\n--ruleset-usecase-dir _examples/ruleset-runner \\\n--usecase crosssplane \\\n--instruction \"give me a runner-claim for the repository dagger for the cluster sthings\"\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003ePROMPT AI + OUTPUT TO FOLDER\u003c/summary\u003e\n\n```bash\nk2n gen \\\n--examples-dirs _examples/examples \\\n--ruleset-env-dir _examples/ruleset-env \\\n--ruleset-usecase-dir _examples/ruleset-runner \\\n--usecase crosssplane \\\n--instruction \"give me a runner-claim for the repository dagger for the cluster sthings. add also a proposal for a branch name and a pr title\" \\\n--destination \"/tmp/runner/\" \\\n--verbose=true\n```\n\n\u003c/details\u003e\n\n### Talk Command\n\n\u003cdetails\u003e\u003csummary\u003eTALK TO CLAIM-MACHINERY-API (OPENROUTER)\u003c/summary\u003e\n\n```bash\nexport AI_PROVIDER=\"openrouter\"\nexport AI_MODEL=\"openai/gpt-4\"\nexport AI_API_KEY=\"sk-or..\" # pragma: allowlist secret\n\nk2n talk \\\n--api-url http://localhost:8080 \\\n--instruction \"I need a 50Gi persistent volume in namespace production with fast-ssd storage class\"\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eTALK TO CLAIM-MACHINERY-API (GEMINI)\u003c/summary\u003e\n\n```bash\nexport AI_PROVIDER=\"gemini\"\nexport AI_API_KEY=\"your-gemini-api-key\" # pragma: allowlist secret\n\nk2n talk \\\n--api-url http://localhost:8080 \\\n--instruction \"create a harbor project for team-alpha\" \\\n--destination /tmp/claim.yaml \\\n--verbose\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eTALK WITH ENV VARS\u003c/summary\u003e\n\n```bash\nexport AI_PROVIDER=\"openrouter\"\nexport AI_MODEL=\"deepseek/deepseek-r1-0528:free\"\nexport AI_API_KEY=\"sk-or..\" # pragma: allowlist secret\nexport CLAIM_API_URL=\"http://localhost:8080\"\n\nk2n talk --instruction \"give me a vsphere vm with 4 cpus and 8gb ram\"\n```\n\n\u003c/details\u003e\n\n## AUTHOR\n\n```bash\nPatrick Hermann, stuttgart-things 07/2025\n```\n\n## LICENSE\n\nLicensed under the Apache License, Version 2.0 (the \"License\").\n\nYou may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0).\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an _\"AS IS\"_ basis, without WARRANTIES or conditions of any kind, either express or implied.\n\nSee the License for the specific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuttgart-things%2Fk2n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstuttgart-things%2Fk2n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuttgart-things%2Fk2n/lists"}