.praison.json from your project — and finds it automatically even when you run the CLI from a deep subdirectory.
Precedence
Quick Start
1
Drop .praison.json in your project root
2
Use an agent from anywhere inside the repo
.praison.json automatically — no extra setup needed, even if you’re nested deep inside repo/src/deep/pkg/.3
Verify what got merged
How Walk-up Works
- Starts at
project_dir(defaults toos.getcwd()). - At every level, checks
.praison.jsonthenpraison.json(in that precedence order). - Stops at a directory containing
.git— config never leaks across project boundaries. - When no
.gitis ever found, caps the walk at 10 ancestor levels to avoid accidentally picking up unrelated configs. - Nearest config wins — the first hit is returned.
Choose Your Mode
Default walk-up (recommended):Walk-up Boundaries
The walk stops when it hits either:- A directory containing
.git(inclusive — the git-root itself is still checked for configs). - 10 ancestor levels without finding any
.gitmarker.
Configuration File Precedence
Configuration Schema
Top-level keys supported in.praison.json:
Example
.praison.json:
Common Patterns
Monorepo with per-package overrides: Place a root.praison.json with your default model, then add a packages/frontend/.praison.json for package-specific overrides:
praisonai run "..." from inside packages/frontend/ picks up the nearest config automatically.
Pin model and permissions for the whole repo:
A single .praison.json at the repo root applies to every subdirectory:
Constructor Parameters
Most users never need to import
HierarchicalConfig directly — the CLI picks up .praison.json automatically. Use the import only when you need programmatic access or test isolation.Best Practices
Commit .praison.json to your repo
Commit .praison.json to your repo
Every teammate gets the same model and permissions automatically — no manual setup, no environment drift.
Keep secrets out of project config
Keep secrets out of project config
Provider
api_key values in .praison.json get committed to git. Store credentials in environment variables or a secrets manager instead.Disable walk-up in tests
Disable walk-up in tests
Pass
walk_up=False (or set an explicit project_dir to an isolated tmp_path) so tests do not inherit ancestor .praison.json files and become order-dependent or environment-sensitive.Trust the git-root boundary
Trust the git-root boundary
Running the CLI from a subdir of an unrelated parent repo will not pull in that parent’s config. The
.git marker is the safety boundary.Related
YAML CLI Configuration
.praisonai/config.yaml — a separate YAML-based config system, not affected by walk-up discovery.Advanced Features
Other advanced CLI features including safe shell, file history, and output modes.
praisonai config subcommand
Reference for the
praisonai config command (YAML system).Context Files
Walk-up discovery for
AGENTS.md / CLAUDE.md — the same boundary pattern applied to context files.
