feat(cli): add agk doctor environment diagnostics#14
Open
kunalkushwaha wants to merge 1 commit into
Open
Conversation
Adds a preflight `agk doctor` command that surfaces common first-run failures before an agent runs, instead of letting them appear as cryptic runtime errors. Checks: - Go toolchain present and >= go1.24 - LLM credentials (OPENAI/ANTHROPIC/AZURE keys); `--provider` makes a specific provider's key required (error if missing) - Ollama reachability + model count (OLLAMA_HOST aware) - Template registry reachability - Current project workspace (.agk/ trace run count) Exits non-zero on any error-level check so it can gate CI preflight. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
c24ebdd to
705998d
Compare
This was referenced Jun 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a preflight
agk doctorcommand that surfaces common first-run failures before an agent runs, instead of letting them appear as cryptic runtime errors deep inside the framework.This is feature B3 from the
FEATURES.mdroadmap.Checks
gopresent, ≥ go1.24--provider X) X's key missinggo.modfound (+ trace run count)Exits non-zero if any error-level check fails, so it can gate a CI preflight step.
--provider openai|anthropic|azure|ollamamakes that provider's credential a hard requirement.Example
Testing
go build,go vet,go test ./...green;gofmtclean.--provider openaiwith key unset (→ error, exit 1), key configured (→ OK), and outside a project dir (→ workspace warning).Note on branch
Branched from
main, so the roadmap docs (FEATURES.md/CLAUDE.md, introduced in #13) aren't in this PR. I'll mark B3 as shipped inFEATURES.mdonce #13 lands. There will be a trivial commands-table conflict with #13 — straightforward to resolve.🤖 Generated with Claude Code