Cognis is a Cargo workspace. If you’ve worked in Rust before, this should feel familiar. If not, the steps below are everything you need.Documentation Index
Fetch the complete documentation index at: https://cognis.vasanth.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Rust 1.75 or newer. Install via rustup.
- A Unix-like shell. Most commands assume bash/zsh; PowerShell works for the cargo bits.
- Optional:
cargo-watchforcargo watch -x testduring iteration. - Optional:
cargo-expandwhen working on macros.
Clone and build
reqwest, sqlx, and tokio aren’t small. Subsequent builds are incremental.
Build with all providers
Most provider-specific code is feature-gated. To compile everything:Run a single test
Run an example
Examples live inexamples/ and are registered in crates/examples/Cargo.toml. Run by registered name:
Worktrees
For non-trivial changes (multi-day work, parallel branches), a worktree gives you an isolated checkout without leaving your primary tree:.worktrees/ directory is project-local and globally gitignored.
Pre-push checklist
Before opening a PR, run these in order. They match what CI runs:Working on docs
The docs site lives underdocs/mintlify/ and is built with Mintlify.
Preview locally if you have the Mintlify CLI:
mintlify’s preview environment when you open the PR.
Working on macros
Macros live incrates/cognis-macros. To inspect what a derive expands to:
Clean rebuild
If the build gets confused after large dependency churn:cargo clean is heavy; reach for it after upgrading Rust or changing many features at once, not as a daily habit.
See also
Architecture
Crate boundaries and design rules.
PR guidelines
What to include in your PR description.
Adding a provider
Step-by-step for a new LLM client.