CLI Guide

Installation

pip install licit-ai-cli

Or from source:

git clone https://github.com/Diego303/licit-cli.git
cd licit-cli
pip install -e ".[dev]"

Invocation

# As an installed command
licit [options] <command> [arguments]

# As a Python module
python -m licit [options] <command> [arguments]

Global Options

OptionDescription
--versionShows the licit version
--config PATHPath to a specific .licit.yaml file
-v, --verboseEnables detailed logging (DEBUG level)
--helpShows help
licit --version
# licit, version 0.7.0

licit --verbose status
# Shows debug logs during execution

Commands

licit init

Initializes licit in the current project. Automatically detects project characteristics and generates the configuration.

licit init [--framework {eu-ai-act|owasp|all}]

Options:

OptionDefaultDescription
--frameworkallRegulatory framework to enable

What it does:

  1. Runs ProjectDetector to detect languages, frameworks, CI/CD, AI agents, etc.
  2. Generates .licit.yaml with a configuration tailored to the project.
  3. Creates the .licit/ directory for internal data.
  4. If architect or vigil are detected, automatically enables their connectors.

Example:

$ cd my-fastapi-project/
$ licit init

Initialized licit in my-fastapi-project
  Languages: python
  Frameworks: fastapi
  Agent configs: CLAUDE.md
  CI/CD: github-actions
  Config saved to .licit.yaml

Example with specific framework:

$ licit init --framework eu-ai-act
# Only enables EU AI Act, disables OWASP

licit status

Shows the current status of licit and connected data sources.

licit status

What it displays:

Example:

$ licit status

  licit Status
  ────────────────────────────────────────
  Project: my-fastapi-project
  Config: .licit.yaml

  Frameworks:
    [x] EU AI Act
    [x] OWASP Agentic Top 10
    [ ] NIST AI RMF (V1)
    [ ] ISO 42001 (V1)

  Data Sources:
    [x] Git history (142 commits)
    [x] Provenance tracking
    [ ] Config changelog
    [ ] FRIA document
    [ ] Annex IV documentation

  Connectors:
    [x] architect (.architect/config.yaml, enabled)
    [x] vigil (.vigil.yaml, enabled)
    Security findings: 3 total (1 critical, 1 high)

  Agent Configs (2):
    - CLAUDE.md (claude-code)
    - .cursorrules (cursor)

The status command now shows:


licit connect

Configures optional connectors to integrate external data sources.

licit connect {architect|vigil} [--enable|--disable]

Arguments:

ArgumentDescription
architectConnector for Architect (reports and audit logs)
vigilConnector for Vigil (SARIF security findings)

Options:

OptionDefaultDescription
--enable(default)Enables the connector
--disableDisables the connector

What it does:

  1. Enables or disables the connector in .licit.yaml.
  2. When enabling, auto-detects configuration paths if not already configured.
  3. Verifies data availability on disk with available().
  4. Shows feedback about whether connector data was found.

Example:

$ licit connect architect
  architect data found at: .architect/reports
  Connector 'architect' enabled.

$ licit connect vigil --enable
  vigil data found
  Connector 'vigil' enabled.

$ licit connect architect --disable
  Connector 'architect' disabled.

Data enriched by connectors:

ConnectorData SourcesEvidence Provided
architectReports JSON, audit JSONL, config YAMLAudit trail, guardrails, quality gates, budget, dry-run, rollback
vigilSARIF 2.1.0, SBOM CycloneDXSecurity findings (critical/high/medium/low)

licit trace

Tracks code provenance — identifies what was written by AI and what by humans.

Status: Functional (Phase 2 completed).

licit trace [--since DATE|TAG] [--report] [--stats]

Options:

OptionDescription
--sinceAnalyzes commits from a date (YYYY-MM-DD) or git tag
--reportGenerates a provenance report file at .licit/reports/provenance.md
--statsShows statistics in the terminal

What it does:

  1. Runs GitAnalyzer to analyze commits with 6 heuristics (author, message, volume, co-authors, file patterns, time).
  2. Optionally reads agent session logs (Claude Code).
  3. Classifies each file as ai (score >= 0.7), mixed (>= 0.5), or human (< 0.5).
  4. Stores results in .licit/provenance.jsonl (append-only).
  5. If sign: true, signs each record with HMAC-SHA256.

Example:

$ licit trace --since 2026-01-01 --stats

  Analyzing git history...
  Records: 45 files analyzed
  AI-generated: 18 (40.0%)
  Human-written: 22 (48.9%)
  Mixed: 5 (11.1%)

  AI tools detected: claude-code (15), cursor (3)
  Models detected: claude-sonnet-4 (12), claude-opus-4 (3), gpt-4o (3)

  Stored in .licit/provenance.jsonl

Example with report:

$ licit trace --report
# Generates .licit/reports/provenance.md with a detailed per-file table

Heuristics used:

#HeuristicWeightWhat It Detects
H1Author pattern3.0AI author names (claude, copilot, cursor, bot, etc.)
H2Message pattern1.5Commit patterns (conventional commits, “implement”, [ai])
H3Bulk changes2.0Massive changes (>20 files + >500 lines)
H4Co-author3.0Co-authored-by: with AI keywords
H5File patterns1.0All files are test files
H6Time pattern0.5Commits between 1am-5am

Only heuristics that produce a signal (score > 0) contribute to the weighted average.


licit changelog

Generates a changelog of changes in AI agent configurations with semantic diffing and severity classification.

Status: Functional (Phase 3 completed).

licit changelog [--since DATE|TAG] [--format {markdown|json}]

Options:

OptionDefaultDescription
--since(all)Changes since a date or tag
--formatmarkdownOutput format: markdown or json

What it does:

  1. Runs ConfigWatcher to retrieve the git history of monitored files.
  2. Applies diff_configs() (semantic differ) between consecutive versions of each file.
  3. Classifies each change with ChangeClassifier (MAJOR/MINOR/PATCH).
  4. Renders the changelog with ChangelogRenderer (Markdown or JSON).
  5. Displays the output in the terminal and saves it to output_path.

Monitored files (by default):

Example:

$ licit changelog

# Agent Config Changelog

> 3 change(s) detected across 2 file(s): **1** major, **1** minor, **1** patch

## .architect/config.yaml

- **[MAJOR]** Changed: model from claude-sonnet-4 to claude-opus-4 (`a1b2c3d4`) — 2026-03-12
- **[PATCH]** Changed: budget.max_cost_usd from 5.0 to 10.0 (`a1b2c3d4`) — 2026-03-12

## CLAUDE.md

- **[MINOR]** Changed: section:Rules from 5 lines to 8 lines (+3/-0) (`e5f6g7h8`) — 2026-03-11

  Changelog saved to .licit/changelog.md

JSON example:

$ licit changelog --format json --since 2026-03-01
# Generates JSON with a "changes" array and saves to .licit/changelog.md

Severity classification:

SeverityTriggerExamples
MAJORModel/provider change, or deletion of a MINOR fieldmodel: gpt-4gpt-5, deleting guardrails
MINORChange to prompt, guardrails, tools, rules, Markdown sectionsEditing system_prompt, adding blocked_commands
PATCHEverything elseParameter tweaks, formatting

Supported diff formats:

FormatExtensionsStrategy
YAML.yaml, .ymlRecursive key-value diff
JSON.jsonRecursive key-value diff
Markdown.mdSection-based diff (headings)
Plain textOtherFull content diff

For detailed documentation on the changelog system, see Changelog.


licit fria

Completes the Fundamental Rights Impact Assessment (EU AI Act Article 27).

Status: Functional (Phase 4 completed).

licit fria [--update]

Options:

OptionDescription
--updateUpdates an existing FRIA instead of creating a new one

What it does:

  1. Detects the project and gathers available evidence.
  2. Runs an interactive 5-step questionnaire (16 questions).
  3. Auto-detects answers where possible (8 fields: system_purpose, ai_technology, models_used, human_review, guardrails, security_scanning, testing, audit_trail).
  4. Saves data to .licit/fria-data.json and generates a report at .licit/fria-report.md.

5 questionnaire steps:

StepTitleQuestions
1System DescriptionPurpose, AI technology, models, scope, human review
2Fundamental Rights IdentificationPersonal data, employment, safety, discrimination
3Impact AssessmentRisk level, maximum impact, detection speed
4Mitigation MeasuresGuardrails, scanning, testing, audit trail, additional measures
5Monitoring & ReviewReview frequency, responsible party, incident process

Auto-detection: For fields marked with auto_detect, licit attempts to infer the answer from the project configuration. If successful, it displays the detected value and asks whether to accept it.

Generated files:

Example:

$ licit fria

============================================================
  FUNDAMENTAL RIGHTS IMPACT ASSESSMENT (FRIA)
  EU AI Act -- Article 27
============================================================

──────────────────────────────────────────────────
  Step 1: System Description
──────────────────────────────────────────────────

  [1.1] What is the primary purpose of this AI system?
  -> Auto-detected: AI-assisted code development using claude-code
    Accept this value? [Y/n]:

licit annex-iv

Generates the Annex IV Technical Documentation (EU AI Act).

Status: Functional (Phase 4 completed).

licit annex-iv [--organization NAME] [--product NAME]

Options:

OptionDescription
--organizationOrganization name (default: project name)
--productProduct name (default: project name)

What it does:

  1. Detects the project and gathers all available evidence.
  2. Auto-populates an Annex IV document with 6 sections from project metadata.
  3. Generates recommendations for sections with missing evidence.
  4. Writes the result to .licit/annex-iv.md.

6 auto-generated sections:

SectionContent
1. General DescriptionPurpose, AI components, languages, frameworks
2. Development ProcessVersion control, AI provenance, agent configs
3. Monitoring & ControlCI/CD, audit trail, changelog
4. Risk ManagementGuardrails, quality gates, budget, oversight, FRIA
5. Testing & ValidationTest framework, security tools
6. Changes & LifecycleSummary of tracking mechanisms

Example:

$ licit annex-iv --organization "ACME Corp" --product "WebApp"

  Annex IV documentation saved to: .licit/annex-iv.md

Generated file:


licit report

Generates a unified compliance report.

Status: Functional (Phase 6). Evaluates EU AI Act + OWASP Agentic Top 10. Supports Markdown, JSON, and HTML.

licit report [--framework {eu-ai-act|owasp|all}] [--format {markdown|json|html}] [--output PATH]

Options:

OptionDefaultDescription
--frameworkallFramework to evaluate
--formatmarkdownOutput format
-o, --output.licit/reports/compliance-report.{ext}Output file path

Example:

$ licit report --framework eu-ai-act

  Compliance Summary
  ─────────────────────────────────────────────
  Project: my-app
  Generated: 2026-03-15 12:00 UTC

  eu-ai-act (2024/1689)
    [##..................] 9.1%
    1 compliant | 4 partial | 6 non-compliant

  ─────────────────────────────────────────────
  Overall: [##..................] 9.1%
  1/11 controls compliant

  Report saved to: .licit/reports/compliance-report.md

Output formats:

FormatDescription
markdownSummary tables + per-requirement detail with [PASS]/[FAIL]/[PARTIAL] icons
jsonStructured JSON with overall, frameworks[], results[]
htmlSelf-contained HTML (no external dependencies), color badges, responsive

Generated files:


licit gaps

Identifies compliance gaps with actionable recommendations.

Status: Functional (Phase 6). Shows gaps with suggested tools and effort level.

licit gaps [--framework {eu-ai-act|owasp|all}]

Options:

OptionDefaultDescription
--frameworkallFramework to analyze

Example:

$ licit gaps --framework eu-ai-act

  10 compliance gap(s) found:

  1. [X] [ART-27-1] Fundamental Rights Impact Assessment (FRIA)
     Missing: Before putting an AI system into use, deployers shall
     carry out an assessment of the impact on fundamental rights.
     -> Run: licit fria -- to complete the FRIA
     Tools: licit fria

  2. [!] [ART-12-1] Record Keeping — Automatic Logging
     Incomplete: AI systems shall be designed with capabilities enabling
     automatic recording of events (logs) over the lifetime.
     -> Enable structured audit trail (architect reports or manual logging)
     Tools: licit trace, architect (audit log)

Gaps are sorted by severity ([X] non-compliant before [!] partial) and each one includes a description, recommendation, and suggested tools.


licit verify

Verifies compliance and returns an exit code for CI/CD.

Status: Functional (Phases 4-5). Evaluates EU AI Act (11 articles) and OWASP Agentic Top 10 (10 risks).

licit verify [--framework {eu-ai-act|owasp|all}]

Exit codes:

CodeMeaning
0COMPLIANT — All critical requirements met
1NON_COMPLIANT — A critical requirement is not met
2PARTIAL — A requirement is partially met

Usage in CI/CD (GitHub Actions):

- name: Compliance check
  run: licit verify
  # The pipeline fails if exit code != 0

Command Summary Table

CommandPhaseStatusShort Description
init1FunctionalInitializes licit in the project
status1FunctionalShows status and connected sources
connect1FunctionalConfigures connectors
trace2FunctionalProvenance traceability
changelog3FunctionalAgent config changelog
fria4FunctionalFRIA (EU AI Act Art. 27)
annex-iv4FunctionalAnnex IV technical documentation
report6FunctionalUnified report (MD/JSON/HTML)
gaps6FunctionalGaps with recommendations
verify4-6Functional (EU AI Act + OWASP)CI/CD gate