First steps
Acest conținut nu este încă disponibil în limba selectată.
This guide walks through the fastest path from an installed CLI to a working agent run. You will configure a provider, start the terminal UI, and run a headless command.
Configure a provider
Section titled “Configure a provider”Set an API key for one provider. For example, with Anthropic:
export ANTHROPIC_API_KEY=...export KHADIM_PROVIDER=anthropicOr use OpenAI:
export OPENAI_API_KEY=...export KHADIM_PROVIDER=openaiYou can also configure providers from the interactive settings panel after starting the terminal UI.
Start the terminal UI
Section titled “Start the terminal UI”Open a project directory and run Khadim:
cd /path/to/projectkhadimAsk a direct question first:
summarize this repositoryThen ask Khadim to inspect or change code:
find the test command and run the smallest useful testType / to open command suggestions. Common commands include /help,
/provider, /model, /sessions, /settings, /tokens, and /export.
Run one headless task
Section titled “Run one headless task”Use --prompt when you want one answer and no terminal UI:
khadim --prompt "explain the architecture of this repository"Use exec when you want a script-friendly command:
khadim exec "summarize failures" < build.logAppend --json to stream structured events:
khadim exec --json "summarize this repository"Add project instructions
Section titled “Add project instructions”Create an AGENTS.md file at the root of a repository to give Khadim local
instructions:
# Agent instructions
- Use `cargo test` for Rust changes.- Prefer small, focused commits.- Do not edit generated files.Khadim discovers AGENTS.md files in the workspace and injects the relevant
instructions into the agent prompt. Nested files apply to their own directory
scope.
Next steps
Section titled “Next steps”Read Features for the larger platform map, or jump to the CLI overview for full command details.