Skip to main content

CLI validator and tooling for the CorpAI open standard

Project description

corpai-cli

The official CLI for the CorpAI open standard — validate, visualize, and simulate your AI agent org.

PyPI version Python 3.9+ MIT License CorpAI Compatible


Install

pip install corpai

Commands

corpai lint — Validate your role files

Checks every role .md file against the CorpAI spec:

  • Missing required sections
  • Invalid or missing rank badges
  • Empty fields and template placeholders
  • Broken reporting chains (reports-to role doesn't exist)
  • Missing escalation triggers
# Lint entire org
corpai lint

# Lint a specific directory
corpai lint ./my-corpai-org

# Lint a single file
corpai lint --file roles/executive/ceo.md

# Treat warnings as errors (strict mode)
corpai lint --strict

Example output:

✓ ceo.md
✓ cto.md
⚠ engineer.md
    WARN   No optional personality template found
✗ custom-role.md
    ERROR  Missing required section: ## Escalation Triggers
    ERROR  "Reports to" field is empty

──────────────────────────────
42 roles checked — 1 error(s), 3 warning(s)

corpai graph — Generate org charts

Visualize your agent hierarchy as an ASCII tree or Mermaid diagram.

# ASCII tree (default)
corpai graph

# Mermaid diagram
corpai graph --format mermaid

# Filter to one department
corpai graph --dept engineering

# Save to file
corpai graph --format mermaid --output org.mmd

Example ASCII output:

└── [OWNER] OWNER  (executive)
    └── [L5] CEO  (executive)
        ├── [L5] CFO  (executive)
        │   └── [L4] Finance Director  (finance)
        │       ├── [L2] Financial Analyst  (finance)
        │       └── [L2] Auditor  (finance)
        └── [L5] CTO  (executive)
            └── [L4] Engineering Director  (engineering)
                └── [L3] Engineering Team Lead  (engineering)

corpai simulate — Simulate message flows

Trace exactly how a TASK or ESCALATION travels through your hierarchy.

# Simulate a task flowing from CEO to Engineer
corpai simulate --from CEO --to Engineer --subject "Build auth module" --priority P2

# Simulate an escalation from L1 up to CEO
corpai simulate --from "Support Agent" --to CEO --priority P1

Example output:

╭─ CorpAI Message Simulation ───────────────────────╮
│ Subject:  Build auth module                        │
│ Type:     ↓ TASK                                   │
│ Priority: P2                                       │
│ Hops:     4                                        │
╰────────────────────────────────────────────────────╯

  Step 1  [L5] CEO  ↓ TASK  [L5] CTO
  Step 2  [L5] CTO  ↓ TASK  [L4] Engineering Director
  Step 3  [L4] Engineering Director  ↓ TASK  [L3] Engineering Team Lead
  Step 4  [L3] Engineering Team Lead  ↓ TASK  [L1] Engineer

✓ Message delivered to [L1] Engineer

corpai info — Org summary

corpai info

Shows role counts, departments, and rank distribution across your org.


Usage with CorpAI spec repo

git clone https://github.com/Arigitshub/CorpAI
cd CorpAI
pip install corpai

# Validate the full spec
corpai lint

# View the org
corpai graph

# Simulate a task
corpai simulate --from CEO --to "QA Tester" --subject "Test the release"

Contributing

Issues and PRs welcome at Arigitshub/corpai-cli.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

corpai-0.4.1.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

corpai-0.4.1-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file corpai-0.4.1.tar.gz.

File metadata

  • Download URL: corpai-0.4.1.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for corpai-0.4.1.tar.gz
Algorithm Hash digest
SHA256 81a21482050db6325b520d184cb2d58545089819a418f27f67f4d69796a7d756
MD5 2d336473c1b6e792f1e1cdad3fd0de8f
BLAKE2b-256 ea3980c9d0e1a99303393483139c157b1ca05f9528bf6719f83a959afa189b44

See more details on using hashes here.

File details

Details for the file corpai-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: corpai-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for corpai-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e8ee340c3034be1e94b9aa6c3d645d91a25cb6a2b324169e6a56c534d292659e
MD5 6962a13fd9e52a83872d776571e2e4cc
BLAKE2b-256 882e6a03e1fe5f69b7c06d3ce1f69844f88503e394cc3635c7741b402638f3ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page