2026-05-11 00:45:43 -07:00
---
title: "ktx status"
2026-05-20 17:33:38 +02:00
description: "Check ktx setup and project readiness."
2026-05-11 00:45:43 -07:00
---
2026-05-20 17:33:38 +02:00
Run the **ktx** readiness doctor. Inside a **ktx** project, this checks setup,
2026-05-14 12:53:55 -04:00
project configuration, semantic search, query history, connections, and related
diagnostics. Outside a project, it checks local CLI setup readiness so you know
whether `ktx setup` can run.
2026-05-11 00:45:43 -07:00
2026-05-11 16:43:08 -07:00
## Command signature
2026-05-11 00:45:43 -07:00
```bash
ktx status [options]
```
## Options
| Flag | Description | Default |
|------|-------------|---------|
| `--json` | Print JSON output | `false` |
2026-05-14 12:53:55 -04:00
| `-v`, `--verbose` | Show every check, including passing ones | `false` |
| `--validate` | Only validate the `ktx.yaml` schema; skip readiness checks | `false` |
2026-06-01 17:25:43 +02:00
| `--fast` | Skip checks that require external communication (query-history readiness probes, Claude Code auth probe, and Codex auth probe) | `false` |
2026-05-14 12:43:14 -04:00
| `--no-input` | Disable interactive terminal input | - |
2026-05-11 00:45:43 -07:00
## Examples
```bash
# Show project status
ktx status
2026-05-12 23:51:46 +02:00
# Get status as JSON without interactive input
ktx status --json --no-input
2026-05-14 12:53:55 -04:00
# Show all checks, not only warnings and failures
ktx status --verbose
# Validate ktx.yaml without running readiness checks
ktx status --validate
2026-06-01 17:25:43 +02:00
# Skip slow probes (query-history readiness, Claude Code auth, Codex auth)
2026-05-21 14:13:03 +02:00
ktx status --fast
2026-05-14 12:53:55 -04:00
# Check a project from another directory
ktx status --project-dir ./analytics
2026-05-11 00:45:43 -07:00
```
2026-05-11 16:43:08 -07:00
## Output
2026-05-14 12:53:55 -04:00
`ktx status` prints grouped doctor checks. Agents should use
`ktx status --json --no-input` when they need to branch on readiness state.
2026-05-11 16:43:08 -07:00
2026-05-16 12:06:34 +02:00
For `llm.provider.backend: claude-code`, `ktx status` checks that the local
Claude Code session is usable. If auth fails, run the Claude Code CLI login
2026-05-21 14:13:03 +02:00
flow, then rerun `ktx status`. Use `--fast` to skip this probe (useful in CI
or offline contexts); skipped checks render as `-` and carry
`"status": "skipped"` in JSON output.
2026-06-01 17:25:43 +02:00
For `llm.provider.backend: codex`, `ktx status` runs a minimal non-interactive
Codex request. If the probe fails, authenticate Codex locally with the Codex CLI
and verify the Codex CLI installation.
2026-06-01 18:10:09 +02:00
When `llm.provider.backend: codex` is configured, `ktx status` also prints a
warning when the installed public Codex SDK and CLI surface cannot prove full
Claude-Code-style isolation. The warning does not block authenticated Codex
usage, but it marks the project status as partial so you can make an explicit
runtime-isolation decision.
2026-05-21 14:13:03 +02:00
A `Local data` section summarises what the project has accumulated locally:
ingest run counts, last completed timestamp per connection, knowledge page
counts by scope, semantic-layer source and dictionary value counts, and the
on-disk size of `.ktx/db.sqlite`, `.ktx/cache/`, `raw-sources/`, `wiki/global/`,
and `semantic-layer/`. These are read from `.ktx/db.sqlite` and local file
stats, and are always shown (they do not require external communication).
2026-05-16 12:06:34 +02:00
2026-05-11 16:43:08 -07:00
```json
{
2026-05-20 17:33:38 +02:00
"title": "ktx project doctor",
2026-05-12 23:51:46 +02:00
"checks": [
{
"id": "project-config",
"label": "Project config",
"status": "pass",
"detail": "warehouse"
}
]
2026-05-11 16:43:08 -07:00
}
```
## Common errors
| Error | Cause | Recovery |
|-------|-------|----------|
2026-05-20 17:33:38 +02:00
| No **ktx** project found | Current directory has no `ktx.yaml` and `KTX_PROJECT_DIR` is unset | `ktx status` runs setup checks; run from a **ktx** project or set `KTX_PROJECT_DIR` for project checks |
2026-05-12 23:51:46 +02:00
| Project config check fails | The project directory is missing or has an invalid `ktx.yaml` | Run `ktx setup` to resume setup |
2026-05-14 12:53:55 -04:00
| Schema validation fails | `ktx.yaml` does not match the current config schema | Run `ktx status --validate --json` for structured issue details, then edit `ktx.yaml` or rerun `ktx setup` |
2026-05-12 23:51:46 +02:00
| Semantic search check warns | Embeddings are not configured or the provider probe failed | Run `ktx setup` or inspect the check's `fix` field in JSON output |
2026-05-14 12:53:55 -04:00
| Query history check warns | A database has query history enabled but the warehouse prerequisites are missing | Fix the warehouse extension, grants, or history access, then rerun `ktx status` |