Skip to main content
Manage interactive tool-approval rules from the CLI — praisonai permissions lists, adds, removes, and shares your project’s approval rules.

Quick Start

1

Run with interactive approval

When a sensitive tool runs, you see the approval prompt.
2

Persist with always

Press a at the prompt to write a persistent allow-rule to approvals.json.
3

Re-run without prompting

Matching rules are applied automatically.

Approval prompt

The five keys choose how long the approval lasts:
  • [o] once — consumed after this exact call; a second matching call re-prompts
  • [s] session — kept in memory for this process
  • [a] always — persisted to ~/.praisonai/permissions/ and reused across runs
  • [n] no — deny once
  • [d] deny & redirect — deny, then type what the agent should do instead at the What should the agent do instead? follow-up; the guidance steers the next turn
See Interactive Tool Approval for the full scope semantics.

CLI approval modes

The CLI flag bypass maps to PermissionMode.BYPASS, whose value is bypass_permissions.

Read-only mode shortcut

--plan on praisonai run and praisonai code is a discoverable shortcut for --approval plan.
Both wrap --approval plan (PermissionMode.PLAN) — the underlying enforcement is unchanged. --plan cannot be combined with --approval, --allow, --deny, or --permission-default (and on code, not with --no-safe / --dangerously-skip-approval); contradictory combinations exit 1. See Permission Modes.

Non-interactive mode

Subcommands

list

List all permission rules in the current project.

allow

Add an ALLOW rule.

deny

Add a DENY rule.

ask

Add an ASK rule (always prompt).

remove

Remove a rule by ID prefix (from list output).

reset

Delete all rules and approvals (requires confirmation).

export

Print rules as JSON to stdout.

import

Import rules from a JSON file.

Rule patterns

Patterns use tool_name:argument_pattern glob syntax:

external_dir: patterns

When workspace_root is set on PermissionManager, any path that resolves outside the root emits an external_dir:<parent>/* sub-target defaulting to ask. Use the CLI to pre-authorise or hard-block these:
See Workspace Boundary for full details on what triggers the gate and how to configure it.

Opt in to reading .env

Reading .env/private keys defaults to ask even with a broad read:* allow. Teams who genuinely need credential-file reads opt in with a secret-specific rule:
Allowing read:*.env lets an agent forward the contents of .env to the model provider. Only opt in for trusted CI/workflows, and prefer a persistent approval or per-agent scope over a project-wide rule. See Secret-File Read Gate.
Compound shell commands (&&, ;, |, subshells, $(...)) are decomposed and each operation is checked against your rules. A deny on bash:rm * blocks cd /tmp && rm -rf x and echo $(rm -rf x). See Command-Aware Permissions.
When you choose [a] always, the CLI auto-generates a scoped pattern — for example bash:git status * for a git subcommand, or tool:<tool_name> as the default.

Project storage

Rules and session approvals are stored under the current working directory:
Rules can also be declared directly in .praisonai/config.yaml under the permissions: key — no CLI commands needed. Both approaches are fully supported and can be used together. See Single-Source Config and Declarative Permissions for details.

Best practices

Share .praisonai/permissions/rules.json so everyone gets the same allow/deny defaults.
--approval bypass skips every check. Reserve it for fully trusted local sandboxes.
--approval plan blocks writes and shell commands while you inspect a codebase.
Use bash:git * instead of one-off rules so related commands stay covered.

Single-Source Config

Declare permissions in .praisonai/config.yaml

Command-Aware Permissions

Compound command decomposition and evasion blocking

Declarative Permissions

All permission surfaces — YAML, CLI, Python

Interactive Tool Approval

User-facing approval experience

Permission Modes

Mode reference for agents and CLI

Workspace Boundary

Gate shell and file access outside your project root