Complete reference for all armor CLI commands.
Exit Codes
| Code | Meaning |
|---|
0 | Success |
1 | Staleness/check failed |
2 | Authentication error |
3 | Resource not found |
4 | Rate limited |
5 | General error |
armor auth
Authentication commands.
armor auth login
Authenticate with AnomalyArmor.
armor auth login --api-key <key>
armor auth login # Interactive prompt
| Option | Description |
|---|
--api-key, -k | Your API key (starts with aa_live_) |
--api-url | Custom API URL (optional) |
Example:
$ armor auth login
Enter your API key: ********
Successfully authenticated!
Config saved to: ~/.armor/config.yaml
armor auth status
Check authentication status.
Example:
$ armor auth status
Authenticated
API Key: aa_live_abc1...xy9z
API URL: https://api.anomalyarmor.ai
armor auth logout
Remove stored credentials.
armor assets
Asset management commands.
armor assets list
List assets with optional filters.
armor assets list [OPTIONS]
| Option | Description |
|---|
--source, -s | Filter by source type (e.g., snowflake, postgresql) |
--type, -t | Filter by asset type (e.g., table, view) |
--search | Search in asset names |
--limit, -l | Max results (default: 50) |
Example:
$ armor assets list --source snowflake --type table
Assets
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━┓
┃ Qualified Name ┃ Type ┃ Source ┃ Active ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━┩
│ snowflake.prod.warehouse.orders │ table │ snowflake │ Yes │
│ snowflake.prod.warehouse.users │ table │ snowflake │ Yes │
└───────────────────────────────────┴───────┴───────────┴────────┘
Showing 2 assets
armor assets get
Get asset details.
armor assets get <asset_id>
| Argument | Description |
|---|
asset_id | Asset ID or qualified name |
Example:
$ armor assets get snowflake.prod.warehouse.orders
Asset: snowflake.prod.warehouse.orders
ID: 550e8400-e29b-41d4-a716-446655440000
Type: table
Source: snowflake
Active: Yes
Description: Customer order transactions
armor freshness
Freshness monitoring commands.
armor freshness summary
Get freshness summary.
Example:
$ armor freshness summary
Freshness Summary
Total Assets: 245
Fresh: 230
Stale: 10
Unknown: 5
Freshness Rate: 93.9%
armor freshness list
List freshness status for all assets.
armor freshness list [OPTIONS]
| Option | Description |
|---|
--status, -s | Filter by status (fresh, stale, unknown) |
--limit, -l | Max results (default: 50) |
Example:
$ armor freshness list --status stale
Freshness Status
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Asset ┃ Status ┃ Hours Since Update┃ Threshold ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ snowflake.prod.warehouse.orders │ Stale │ 26.5 │ 24h │
└───────────────────────────────────┴────────┴───────────────────┴───────────┘
armor freshness get
Check freshness for a specific asset.
armor freshness get <asset_id>
Example:
$ armor freshness get snowflake.prod.warehouse.orders
Asset: snowflake.prod.warehouse.orders
Status: Fresh
Last Update: 2024-12-04T10:30:00Z
Hours Since Update: 2.5
Threshold: 24h
armor freshness check
Check if an asset is fresh, fail if stale. Ideal for CI/CD pipelines.
armor freshness check <asset_id> [OPTIONS]
| Option | Description |
|---|
--max-age, -m | Max acceptable age in hours (optional) |
Exit codes:
0 - Data is fresh
1 - Data is stale
3 - Asset not found
Example (fresh):
$ armor freshness check snowflake.prod.warehouse.orders
FRESH: snowflake.prod.warehouse.orders
Hours since update: 2.5h
$ echo $?
0
Example (stale):
$ armor freshness check snowflake.prod.warehouse.orders
STALE: Asset 'snowflake.prod.warehouse.orders' is stale: 26.5h since last update (threshold: 24.0h)
Hours since update: 26.5h
Threshold: 24.0h
$ echo $?
1
Shell script usage:
#!/bin/bash
if armor freshness check snowflake.prod.warehouse.orders; then
echo "Data is fresh, running pipeline..."
dbt run
else
echo "Data is stale, aborting"
exit 1
fi
armor freshness refresh
Trigger a freshness check for an asset.
armor freshness refresh <asset_id>
Requires an API key with read-write or admin scope.
Example:
$ armor freshness refresh snowflake.prod.warehouse.orders
Refresh initiated
Job ID: job_abc123
Status: queued
armor schema
Schema drift monitoring commands.
armor schema summary
Get schema changes summary.
Example:
$ armor schema summary
Schema Changes Summary
Total Changes: 23
Unacknowledged: 5
Critical: 2
Warning: 8
Info: 13
armor schema changes
List schema changes.
armor schema changes [OPTIONS]
| Option | Description |
|---|
--asset, -a | Filter by asset |
--type, -t | Filter by change type (column_added, column_removed, type_changed, etc.) |
--breaking | Only show breaking changes (removed columns/tables, type changes) |
--unacknowledged, -u | Only show unacknowledged changes |
--limit, -l | Max results (default: 50) |
Example:
$ armor schema changes --breaking
Schema Changes
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━┓
┃ Asset ┃ Change ┃ Column ┃ Ack ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━┩
│ snowflake.prod.warehouse.orders │ column_removed │ user_id │ No │
└─────────────────────────────────┴────────────────┴───────────┴─────┘
armor alerts
Alert management commands.
armor alerts summary
Get alerts summary.
Example:
$ armor alerts summary
Alerts Summary
Total Rules: 15
Active Rules: 12
Recent Alerts: 45
Unresolved: 3
armor alerts list
List alerts with filters.
armor alerts list [OPTIONS]
| Option | Description |
|---|
--status, -s | Filter by status (triggered, acknowledged, resolved) |
--type, -t | Filter by alert type (schema, freshness, discovery) |
--limit, -l | Max results (default: 50) |
Example:
$ armor alerts list --status triggered
Alerts
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Asset ┃ Message ┃ Type ┃ Status ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━┩
│ snowflake.prod.warehouse.orders │ Data is 26 hours stale│ freshness │ Triggered │
└─────────────────────────────────┴───────────────────────┴───────────┴───────────┘
armor api-keys
API key management commands. Requires admin scope.
armor api-keys list
List API keys.
armor api-keys list [OPTIONS]
| Option | Description |
|---|
--include-revoked | Include revoked keys |
Example:
$ armor api-keys list
API Keys
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━┓
┃ Name ┃ Key ┃ Scope ┃ Active ┃ Last Used ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━┩
│ Airflow Production │ aa_live_abc...z4 │ read-only │ Yes │ 2024-12-04 │
│ CI Pipeline │ aa_live_def...y8 │ read-write │ Yes │ 2024-12-03 │
└────────────────────┴──────────────────┴────────────┴────────┴────────────┘
armor api-keys create
Create a new API key.
armor api-keys create --name <name> [OPTIONS]
| Option | Description |
|---|
--name, -n | Human-readable name for the key |
--scope, -s | Permission scope (default: read-only) |
Scopes:
read-only - Read assets, freshness, lineage, alerts
read-write - Read + trigger refreshes
admin - Full access including key management
Example:
$ armor api-keys create --name "Airflow Production" --scope read-only
API key created successfully!
Key: aa_live_k8jd92hf8j2hd98fh2d9h2f98h2d9fh2
IMPORTANT: This key will only be shown once!
Store it securely.
armor api-keys revoke
Revoke an API key.
armor api-keys revoke <key_id> [OPTIONS]
| Option | Description |
|---|
--yes, -y | Skip confirmation prompt |
Example:
$ armor api-keys revoke 550e8400-e29b-41d4-a716-446655440000
Are you sure you want to revoke this key? [y/N]: y
API key revoked successfully.
Tag management commands.
List tags for an asset.
armor tags list --asset <asset_id> [OPTIONS]
| Option | Description |
|---|
--asset, -a | Asset ID or qualified name (required) |
--category, -c | Filter by category |
Example:
$ armor tags list --asset postgresql.analytics
Tags
┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Name ┃ Category ┃ Object Path ┃ Type ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ pii_data │ governance │ gold.customers │ table │
│ financial │ business │ gold.orders │ table │
└────────────────┴────────────┴─────────────────────┴────────────┘
Create a tag on a database object.
armor tags create <name> --asset <asset_id> --path <object_path> [OPTIONS]
| Option | Description |
|---|
--asset, -a | Asset ID or qualified name (required) |
--path, -p | Object path, e.g., schema.table (required) |
--category, -c | Category: business, technical, governance (default: business) |
--description, -d | Tag description |
Example:
$ armor tags create pii_data --asset postgresql.analytics --path gold.customers --category governance
Tag created: pii_data
Category: governance
Path: gold.customers
Apply multiple tags to multiple objects.
armor tags apply <tag_names> --asset <asset_id> --paths <object_paths> [OPTIONS]
| Option | Description |
|---|
--asset, -a | Asset ID or qualified name (required) |
--paths, -p | Comma-separated object paths (required) |
--category, -c | Category for new tags (default: business) |
Example:
$ armor tags apply "pii,gdpr" --asset postgresql.analytics --paths "gold.customers,gold.orders"
Applied 4 tags
armor intelligence
AI intelligence commands.
armor intelligence ask
Ask a question about your data.
armor intelligence ask <asset_id> <question>
Example:
$ armor intelligence ask postgresql.analytics "What tables contain customer data?"
Question: What tables contain customer data?
Answer:
The following tables contain customer data:
- gold.customers: Primary customer dimension table
- gold.orders: Contains customer_id foreign key
Confidence: high
Sources: Schema Discovery, Intelligence KB
armor intelligence generate
Generate AI intelligence for an asset.
armor intelligence generate <asset_id>
Requires schema discovery to be run first.
Example:
$ armor intelligence generate postgresql.analytics
Intelligence generation started
Job ID: job_abc123
Status: queued
armor jobs
Job monitoring commands.
armor jobs status
Get status of an async job.
armor jobs status <job_id>
Example:
$ armor jobs status job_abc123
Job: job_abc123
Status: completed
Progress: 100%
Started: 2024-12-21T10:30:00Z
Completed: 2024-12-21T10:32:15Z
armor metrics
Data quality metrics commands.
armor metrics summary
Get metrics summary for an asset.
armor metrics summary <asset_id>
Example:
$ armor metrics summary 550e8400-e29b-41d4-a716-446655440000
Metrics Summary
Total Metrics: 15
Active Metrics: 12
Health: 87.5%
Passing: 10
Failing: 2
armor metrics list
List metrics for an asset.
armor metrics list <asset_id> [OPTIONS]
| Option | Description |
|---|
--type, -t | Filter by metric type (e.g., row_count, null_percent) |
--active | Only show active metrics |
--limit, -l | Max results (default: 50) |
Example:
$ armor metrics list 550e8400-e29b-41d4-a716-446655440000 --type null_percent
Metrics
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Table ┃ Column ┃ Type ┃ Active ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ snowflake.prod.warehouse.orders │ customer_id │ null_percent │ Yes │
│ snowflake.prod.warehouse.orders │ email │ null_percent │ Yes │
└───────────────────────────────────┴──────────────┴───────────────┴────────┘
armor metrics get
Get metric details.
armor metrics get <asset_id> <metric_id>
Example:
$ armor metrics get 550e8400-e29b-41d4-a716-446655440000 m_abc123
Metric: m_abc123
Type: null_percent
Table: snowflake.prod.warehouse.orders
Column: customer_email
Interval: daily
Active: Yes
armor metrics create
Create a new metric. Requires read-write scope.
armor metrics create <asset_id> --type <type> --table <path> [OPTIONS]
| Option | Description |
|---|
--type, -t | Metric type (required): row_count, null_percent, etc. |
--table | Full table path (required) |
--column | Column name (for column metrics) |
--interval | Capture interval: hourly, daily, weekly (default: daily) |
Example:
$ armor metrics create 550e8400-e29b-41d4-a716-446655440000 \
--type null_percent \
--table snowflake.prod.warehouse.orders \
--column customer_email
Metric created: m_abc123
Type: null_percent
Table: snowflake.prod.warehouse.orders
Column: customer_email
armor metrics capture
Trigger an immediate metric capture. Requires read-write scope.
armor metrics capture <asset_id> <metric_id>
Example:
$ armor metrics capture 550e8400-e29b-41d4-a716-446655440000 m_abc123
Captured 1 snapshot
Value: 2.5
Anomaly: No
armor metrics delete
Delete a metric. Requires read-write scope.
armor metrics delete <asset_id> <metric_id> [OPTIONS]
| Option | Description |
|---|
--yes, -y | Skip confirmation prompt |
armor validity
Data validity rules commands.
armor validity summary
Get validity summary for an asset.
armor validity summary <asset_id>
Example:
$ armor validity summary 550e8400-e29b-41d4-a716-446655440000
Validity Summary
Total Rules: 12
Passing: 10
Failing: 1
Error: 1
armor validity list
List validity rules for an asset.
armor validity list <asset_id> [OPTIONS]
| Option | Description |
|---|
--type, -t | Filter by rule type (e.g., NOT_NULL, REGEX) |
--active | Only show active rules |
--limit, -l | Max results (default: 50) |
Example:
$ armor validity list 550e8400-e29b-41d4-a716-446655440000 --type NOT_NULL
Validity Rules
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Table ┃ Column ┃ Type ┃ Severity ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩
│ snowflake.prod.warehouse.orders │ customer_id │ NOT_NULL │ critical │
│ snowflake.prod.warehouse.orders │ email │ NOT_NULL │ warning │
└───────────────────────────────────┴───────────────┴──────────┴───────────┘
armor validity get
Get validity rule details.
armor validity get <asset_id> <rule_id>
Example:
$ armor validity get 550e8400-e29b-41d4-a716-446655440000 v_abc123
Rule: v_abc123
Name: Customer Email Required
Type: NOT_NULL
Table: snowflake.prod.warehouse.orders
Column: customer_email
Severity: critical
Active: Yes
armor validity create
Create a new validity rule. Requires read-write scope.
armor validity create <asset_id> --type <type> --table <path> [OPTIONS]
| Option | Description |
|---|
--type, -t | Rule type (required): NOT_NULL, UNIQUE, REGEX, etc. |
--table | Full table path (required) |
--column | Column name |
--config | Rule configuration (JSON string) |
--severity | Severity: info, warning, critical (default: warning) |
Examples:
# NOT NULL rule
$ armor validity create 550e8400-e29b-41d4-a716-446655440000 \
--type NOT_NULL \
--table snowflake.prod.warehouse.orders \
--column customer_email \
--severity critical
Rule created: v_abc123
Type: NOT_NULL
# REGEX rule
$ armor validity create 550e8400-e29b-41d4-a716-446655440000 \
--type REGEX \
--table snowflake.prod.warehouse.orders \
--column customer_email \
--config '{"pattern": "^[\\w.-]+@[\\w.-]+\\.\\w+$"}'
Rule created: v_def456
Type: REGEX
armor validity check
Trigger an immediate validity check. Requires read-write scope.
armor validity check <asset_id> <rule_id>
Exit codes:
0 - Validation passed
1 - Validation failed (invalid records found)
3 - Rule not found
Example (pass):
$ armor validity check 550e8400-e29b-41d4-a716-446655440000 v_abc123
PASS: v_abc123 (NOT_NULL on customer_email)
Total Rows: 10000
Invalid: 0 (0.00%)
$ echo $?
0
Example (fail):
$ armor validity check 550e8400-e29b-41d4-a716-446655440000 v_abc123
FAIL: v_abc123 (NOT_NULL on customer_email)
Total Rows: 10000
Invalid: 25 (0.25%)
Sample invalid values:
- row 1001: null
- row 1042: null
$ echo $?
1
armor validity delete
Delete a validity rule. Requires read-write scope.
armor validity delete <asset_id> <rule_id> [OPTIONS]
| Option | Description |
|---|
--yes, -y | Skip confirmation prompt |
armor referential
Referential integrity check commands.
armor referential summary
Get referential summary for an asset.
armor referential summary <asset_id>
Example:
$ armor referential summary 550e8400-e29b-41d4-a716-446655440000
Referential Summary
Total Checks: 8
Active: 7
Passing: 6
Failing: 1
armor referential list
List referential checks for an asset.
armor referential list <asset_id> [OPTIONS]
| Option | Description |
|---|
--active | Only show active checks |
--limit, -l | Max results (default: 50) |
Example:
$ armor referential list 550e8400-e29b-41d4-a716-446655440000
Referential Checks
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Child ┃ Parent ┃ Status ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ orders.customer_id │ customers.id │ Pass │
│ payments.order_id │ orders.id │ Fail │
└─────────────────────────────────┴──────────────────────────────────┴────────┘
armor referential get
Get referential check details.
armor referential get <asset_id> <check_id>
Example:
$ armor referential get 550e8400-e29b-41d4-a716-446655440000 r_abc123
Check: r_abc123
Name: Orders -> Customers FK
FK: orders.customer_id
PK: customers.id
Interval: daily
Active: Yes
armor referential create
Create a new referential check. Requires read-write scope.
armor referential create <asset_id> [OPTIONS]
| Option | Description |
|---|
--child-table | Child table path (required) |
--child-column | Child column name (required) |
--parent-table | Parent table path (required) |
--parent-column | Parent column name (required) |
--name | Human-readable name |
--max-orphans | Max orphan count threshold |
--max-orphan-percent | Max orphan percentage threshold |
Example:
$ armor referential create 550e8400-e29b-41d4-a716-446655440000 \
--child-table snowflake.prod.warehouse.orders \
--child-column customer_id \
--parent-table snowflake.prod.warehouse.customers \
--parent-column id \
--name "Orders -> Customers FK"
Check created: r_abc123
FK: orders.customer_id -> customers.id
armor referential execute
Execute a referential check. Requires read-write scope.
armor referential execute <asset_id> <check_id>
Exit codes:
0 - Check passed (no orphans or within threshold)
1 - Check failed (orphans exceed threshold)
3 - Check not found
Example (pass):
$ armor referential execute 550e8400-e29b-41d4-a716-446655440000 r_abc123
PASS: r_abc123 (orders.customer_id -> customers.id)
Total Child Rows: 10000
Orphans: 0 (0.00%)
$ echo $?
0
Example (fail):
$ armor referential execute 550e8400-e29b-41d4-a716-446655440000 r_abc123
FAIL: r_abc123 (orders.customer_id -> customers.id)
Total Child Rows: 10000
Orphans: 5 (0.05%)
Sample orphan values:
- customer_id: 99999
- customer_id: 99998
$ echo $?
1
armor referential delete
Delete a referential check. Requires read-write scope.
armor referential delete <asset_id> <check_id> [OPTIONS]
| Option | Description |
|---|
--yes, -y | Skip confirmation prompt |
armor lineage
Data lineage commands.
armor lineage get
Get lineage for an asset.
armor lineage get <asset_id> [OPTIONS]
| Option | Description |
|---|
--depth, -d | Depth of lineage (1-5, default: 1) |
--direction | Direction: upstream, downstream, both (default: both) |
Example:
$ armor lineage get snowflake.prod.warehouse.orders --depth 2
Lineage for: snowflake.prod.warehouse.orders
Upstream (dependencies):
- snowflake.raw.stripe.orders
- snowflake.raw.crm.customers
Downstream (dependents):
- snowflake.prod.mart.orders_mart
- looker.sales_dashboard
Configuration
Config File
The CLI stores configuration in ~/.armor/config.yaml:
api_key: aa_live_your_key_here
api_url: https://api.anomalyarmor.ai
timeout: 30
Environment Variables
Override config file with environment variables:
export ARMOR_API_KEY="aa_live_xxx"
export ARMOR_API_URL="https://api.anomalyarmor.ai"
Environment variables take precedence over config file values.