RepliMap Docs

CLI Reference

Complete guide to RepliMap commands

Global Options

These options work with all commands:

OptionShortDescription
--profile-pAWS profile name from ~/.aws/credentials
--region-rAWS region (e.g., us-east-1)
--quiet-qSuppress verbose output
--versionShow version info
--help-hShow help for command

scan

Scans AWS resources and builds the dependency graph.

replimap scan --profile prod --region us-east-1

Options

OptionDescription
--scopeLimit to VPC: vpc:vpc-12345678 or vpc-name:Production*
--entryStart from entry point: alb:my-alb or tag:App=MyApp
--tagFilter by tag: Environment=Production
--cacheUse cached results for incremental scans
--trust-centerEnable Trust Center auditing (Enterprise)

Examples

# Scan a specific VPC
replimap scan -p prod --scope vpc:vpc-12345678

# Scan by tag
replimap scan -p prod --entry tag:Application=MyApp

# Scan from an ALB entry point
replimap scan -p prod --entry alb:my-app-alb

# Use cache for faster incremental scans
replimap scan -p prod --cache

clone

Generates Infrastructure-as-Code from the scanned graph.

replimap clone --profile prod --mode generate --output-dir ./terraform

Options

OptionDescription
--modedry-run (preview) or generate (write files)
--output-dirOutput directory for generated code
--dev-modeEnable Right-Sizer for non-prod environments
--downsizeAutomatically downsize instance types
--rename-patternRename resources: prod:staging

Examples

# Preview what will be generated
replimap clone -p prod --mode dry-run

# Generate Terraform with cost optimization
replimap clone -p prod \
  --mode generate \
  --output-dir ./staging-tf \
  --rename-pattern "prod:staging" \
  --downsize

Generated Files

output/
├── main.tf           # All resources
├── variables.tf      # Extracted variables
├── outputs.tf        # Useful outputs
├── providers.tf      # AWS provider config
├── data.tf           # Data sources
├── imports.tf        # TF 1.5+ import blocks
└── terraform.tfvars.example

graph

Generates infrastructure visualizations.

replimap graph --profile prod --format html --output infra.html

Options

OptionDescription
--formathtml, mermaid, json
--outputOutput file path
--vpcScope to specific VPC
--allShow all resources (no filtering)
--sg-rulesInclude security group rules
--routesInclude route tables
--no-collapseDisable resource grouping
--securitySecurity-focused view

Interactive Graph Features

The HTML graph includes:

FeatureDescription
Link ClassificationToggle traffic vs. dependency views
Cost OverlayHeat map by monthly cost
Blast RadiusClick resource to see impact
Orphan DetectionHighlight unused resources
Drift VisualizationShow drifted resources

audit

Runs security and compliance checks.

replimap audit --profile prod --format html --output audit.html

Options

OptionDescription
--formatconsole, html, json
--outputOutput file path
--ciExit with non-zero code on failures
--scopeScope to VPC: vpc:vpc-12345678

Compliance Frameworks

  • SOC 2 Type II
  • CIS AWS Foundations Benchmark
  • AWS Well-Architected Framework

drift

Detects drift between Terraform state and AWS.

replimap drift --profile prod --state ./terraform.tfstate

Options

OptionDescription
--statePath to local tfstate file
--remote-bucketS3 bucket for remote state
--remote-keyS3 key for remote state
--formatconsole, html, json
--ciExit code reflects drift status

Exit Codes (CI Mode)

CodeMeaning
0No drift detected
1Drift detected
2Error during detection

Offline Drift Detection

# Offline drift using cached scan
replimap drift-offline offline -p prod -s ./terraform.tfstate

# Output SARIF for GitHub Security
replimap drift-offline offline -p prod -s ./terraform.tfstate --sarif

# Compare scans over time
replimap drift-offline compare-scans -p prod \
  --current ./scan-today.json \
  --previous ./scan-yesterday.json

deps

Explores resource dependencies and blast radius.

replimap deps sg-12345 --region us-east-1

Options

OptionDescription
--formatconsole, tree, table, html, json
--depthLimit analysis depth
--analyzeDeep analysis with specialized analyzers
--vpcScope to specific VPC

Impact Levels

LevelScoreDescription
CRITICAL90-100Core infrastructure (VPC, main DB)
HIGH70-89Production services
MEDIUM40-69Supporting resources
LOW1-39Peripheral resources

Impact estimates are based on AWS API metadata only. Application-level dependencies (hardcoded IPs, config files) are NOT detected.


iam

Generates least-privilege IAM policies.

replimap iam for-resource -p prod -r my-lambda -s runtime_read

Options

OptionDescription
-r, --resourceResource ID or name
-s, --scopePolicy scope (see below)
-E, --enrichEnable graph enrichment
-f, --formatjson or terraform
--create-roleGenerate IAM role

Policy Scopes

ScopeDescription
runtime_readRead-only for runtime operations
runtime_writeWrite access for runtime
runtime_fullFull read/write for runtime
infra_readRead access for infrastructure
infra_deployFull access for deployment

cost

Estimates monthly AWS costs.

replimap cost --region us-east-1

Options

OptionDescription
--vpcScope to specific VPC
--formattable, html, csv, json, markdown
--outputOutput file path
--acknowledgeSkip confirmation prompt

Cost estimates are for planning only. Actual costs may differ due to data transfer, API calls, reserved instances, and other factors.


license

Manage your RepliMap license.

# View license status
replimap license status

# View usage statistics  
replimap license usage

# Activate a license key
replimap license activate RM-XXXX-XXXX-XXXX-XXXX

# Deactivate license
replimap license deactivate

trust-center

Enterprise audit mode for compliance.

# Check status
replimap trust-center status

# Generate compliance report
replimap trust-center report
replimap trust-center report -f json -o audit.json
replimap trust-center report -f csv -o api-calls.csv

# Clear audit sessions
replimap trust-center clear

On this page