Skip to content

CLI Reference

This reference guide covers all commands, options, and configuration for the EvidentSource server CLI.

The EvidentSource CLI uses a hierarchical command structure:

evidentsource [GLOBAL_OPTIONS] <COMMAND> [COMMAND_OPTIONS] [SUBCOMMAND] [SUBCOMMAND_OPTIONS]

These options are available for all commands:

OptionDescription
-h, --helpPrint help information
-V, --versionPrint version information

Client CLI functionality (placeholder for future features).

Terminal window
evidentsource client

Status: Not yet implemented. Reserved for future client utilities and operations.

Start the EvidentSource server with a specified storage adapter.

Terminal window
evidentsource server [OPTIONS] <ADAPTER>

Options available for the server command:

OptionDescription
-s, --scheme <SCHEME>Server protocol scheme: http or https
OptionEnvironment VariableDefaultDescription
-a, --authority <AUTHORITY>-localhost:3000Server authority (host:port)
--http-port <PORT>EVIDENT_HTTP_PORT3000HTTP server port
--grpc-port <PORT>EVIDENT_GRPC_PORT50051gRPC server port
OptionEnvironment VariableDefaultDescription
--io-worker-threads <N>EVIDENT_IO_WORKER_THREADScores/4 (min 4, max 8)Number of IO runtime worker threads
--cpu-worker-threads <N>EVIDENT_CPU_WORKER_THREADScoresNumber of CPU runtime worker threads
--datafusion-memory-limit <BYTES>EVIDENT_DATAFUSION_MEMORY_LIMIT40% of RAMMemory limit for DataFusion queries
--datafusion-batch-size <SIZE>EVIDENT_DATAFUSION_BATCH_SIZE4096Batch size for DataFusion operations
OptionEnvironment VariableDefaultDescription
--wasm-epoch-increment-ms <MS>WASM_EPOCH_INCREMENT_MS10Epoch increment interval in milliseconds
--wasm-epoch-deadline <EPOCHS>WASM_EPOCH_DEADLINE100Number of epochs before yielding

Run with an in-memory storage adapter (for development and testing only).

Terminal window
evidentsource server --scheme http in-memory

Features:

  • Fast startup
  • No persistence
  • Suitable for development and testing
  • Data lost on restart

Example:

Terminal window
# Start server on default ports
evidentsource server --scheme http in-memory
# Custom ports
evidentsource server \
--scheme http \
--http-port 8080 \
--grpc-port 50051 \
in-memory

Run with DynamoDB storage adapter and a distributed linearizer.

Terminal window
evidentsource server --scheme http dynamo-db [OPTIONS] <LINEARIZER>

Common options for all DynamoDB configurations:

OptionEnvironment VariableDescription
-t, --table <TABLE>-DynamoDB table name
--s3-bucket <BUCKET>-S3 bucket for event storage
--s3-prefix <PREFIX>-S3 key prefix (optional)
--sns-topic-arn <ARN>INDEX_ROOT_SNS_TOPIC_ARNSNS topic for index updates (optional)
--cache-max-entries <N>EVIDENT_CACHE_MAX_ENTRIESMaximum cache entries (default: 500000)
--cache-memory-limit <BYTES>EVIDENT_CACHE_MEMORY_LIMITCache memory limit (default: 30% of RAM)

DynamoDB adapter requires selecting a transaction linearizer for distributed transaction ordering.

Use Kafka-based transaction linearizer for distributed transaction ordering.

Terminal window
evidentsource server --scheme http dynamo-db [DYNAMODB_OPTIONS] kafka [KAFKA_OPTIONS]
OptionEnvironment VariableDefaultDescription
-k, --kafka-brokers <BROKERS>KAFKA_BOOTSTRAP_SERVERS-Kafka bootstrap servers (required)
-n, --node-id <ID>--Unique node identifier (optional)
--node-host <HOST>--Host for internal gRPC (required)
--internal-grpc-port <PORT>-50052Internal gRPC port
--transaction-proposals-topic <TOPIC>KAFKA_TRANSACTION_PROPOSALS_TOPICtransaction-proposalsKafka topic for transaction proposals
--database-events-topic <TOPIC>KAFKA_DATABASE_EVENTS_TOPICevidentsource-database-eventsKafka topic for database events
--consumer-group <GROUP>KAFKA_CONSUMER_GROUPevidentsource-transaction-linearizerKafka consumer group
OptionEnvironment VariableDescription
--security-protocol <PROTOCOL>KAFKA_SECURITY_PROTOCOLSecurity protocol (e.g., SASL_SSL)
--sasl-mechanism <MECHANISM>KAFKA_SASL_MECHANISMSASL mechanism (e.g., PLAIN, SCRAM-SHA-256)
--sasl-username <USERNAME>KAFKA_SASL_USERNAMESASL username
--sasl-password <PASSWORD>KAFKA_SASL_PASSWORDSASL password
Terminal window
# Basic Kafka configuration
evidentsource server --scheme http \
dynamo-db \
--table evidentsource-events \
--s3-bucket evidentsource-storage \
kafka \
--kafka-brokers localhost:9092 \
--node-host 0.0.0.0
# With SASL authentication
evidentsource server --scheme http \
dynamo-db \
--table evidentsource-events \
--s3-bucket evidentsource-storage \
--sns-topic-arn arn:aws:sns:us-east-1:123456789012:evidentsource-index-updates \
kafka \
--kafka-brokers kafka-1:9092,kafka-2:9092,kafka-3:9092 \
--node-id node-1 \
--node-host 10.0.1.100 \
--security-protocol SASL_SSL \
--sasl-mechanism SCRAM-SHA-256 \
--sasl-username evidentsource \
--sasl-password $KAFKA_PASSWORD

Use Memberlist-based transaction linearizer for distributed transaction ordering via gossip protocol.

Terminal window
evidentsource server --scheme http dynamo-db [DYNAMODB_OPTIONS] memberlist [MEMBERLIST_OPTIONS]
OptionDefaultDescription
-n, --node-id <ID>-Unique node identifier (required)
--node-host <HOST>-Host for memberlist and internal gRPC (required)
--memberlist-port <PORT>7946Port for gossip protocol
--internal-grpc-port <PORT>50052Port for internal gRPC service
Terminal window
# Basic memberlist configuration
evidentsource server --scheme http \
dynamo-db \
--table evidentsource-events \
--s3-bucket evidentsource-storage \
memberlist \
--node-id node-1 \
--node-host 10.0.1.100
# With custom ports
evidentsource server --scheme http \
dynamo-db \
--table evidentsource-events \
--s3-bucket evidentsource-storage \
--s3-prefix production/ \
--sns-topic-arn arn:aws:sns:us-east-1:123456789012:evidentsource-index-updates \
--cache-max-entries 1000000 \
memberlist \
--node-id node-1 \
--node-host 0.0.0.0 \
--memberlist-port 7946 \
--internal-grpc-port 50052

The server binary can be built with different feature sets for optimized deployments:

Terminal window
# Default build (includes all features - best for development)
cargo build
# Minimal in-memory only (fast builds, smallest binary)
cargo build --no-default-features --features in-memory
# DynamoDB only
cargo build --no-default-features --features dynamo-db
# Production release with DynamoDB and jemalloc
cargo build --release --no-default-features --features dynamo-db,jemalloc
VariableDefaultDescription
EVIDENT_HTTP_PORT3000HTTP server port
EVIDENT_GRPC_PORT50051gRPC server port
EVIDENT_IO_WORKER_THREADScores/4IO worker threads
EVIDENT_CPU_WORKER_THREADScoresCPU worker threads
EVIDENT_DATAFUSION_MEMORY_LIMIT40% RAMDataFusion memory limit
EVIDENT_DATAFUSION_BATCH_SIZE4096DataFusion batch size
EVIDENT_CACHE_MAX_ENTRIES500000Maximum cache entries
EVIDENT_CACHE_MEMORY_LIMIT30% RAMCache memory limit
VariableDefaultDescription
WASM_EPOCH_INCREMENT_MS10Epoch increment interval
WASM_EPOCH_DEADLINE100Epochs before yielding
VariableDefaultDescription
OTEL_EXPORTER_OTLP_ENDPOINThttp://localhost:4317OpenTelemetry collector endpoint
OTEL_SERVICE_NAMEevidentsource-serverService name for telemetry
OTEL_SERVICE_NAMESPACEdefaultService namespace
OTEL_SAMPLING_RATIO1.0Trace sampling ratio (0.0 to 1.0)
RUST_LOGinfoLogging level (trace, debug, info, warn, error)
VariableDescription
AWS_REGIONAWS region (e.g., us-east-1)
AWS_ACCESS_KEY_IDAWS access key
AWS_SECRET_ACCESS_KEYAWS secret key
AWS_SESSION_TOKENAWS session token (for temporary credentials)
INDEX_ROOT_SNS_TOPIC_ARNSNS topic ARN for index updates
VariableDefaultDescription
KAFKA_BOOTSTRAP_SERVERS-Kafka bootstrap servers
KAFKA_TRANSACTION_PROPOSALS_TOPICtransaction-proposalsTopic for transaction proposals
KAFKA_DATABASE_EVENTS_TOPICevidentsource-database-eventsTopic for database events
KAFKA_CONSUMER_GROUPevidentsource-transaction-linearizerConsumer group ID
KAFKA_SECURITY_PROTOCOL-Security protocol
KAFKA_SASL_MECHANISM-SASL mechanism
KAFKA_SASL_USERNAME-SASL username
KAFKA_SASL_PASSWORD-SASL password
Terminal window
# Quick start with in-memory storage
evidentsource server --scheme http in-memory
# With debug logging
RUST_LOG=debug evidentsource server --scheme http in-memory
# Custom ports
evidentsource server \
--scheme http \
--http-port 8080 \
--grpc-port 50051 \
in-memory
Terminal window
# Start LocalStack first
# See deployment/local.md for LocalStack setup
# Run with DynamoDB + Kafka
AWS_ENDPOINT_URL=http://localhost:4566 \
KAFKA_BOOTSTRAP_SERVERS=localhost:9092 \
evidentsource server --scheme http \
dynamo-db \
--table evidentsource-local \
--s3-bucket evidentsource-local-storage \
kafka \
--kafka-brokers localhost:9092 \
--node-host 127.0.0.1
Terminal window
# With Kafka linearizer
evidentsource server --scheme https \
--http-port 443 \
--grpc-port 50051 \
dynamo-db \
--table evidentsource-prod \
--s3-bucket evidentsource-prod-storage \
--s3-prefix production/ \
--sns-topic-arn arn:aws:sns:us-east-1:123456789012:evidentsource-updates \
kafka \
--kafka-brokers kafka-1.prod:9092,kafka-2.prod:9092,kafka-3.prod:9092 \
--node-id $(hostname) \
--node-host $(hostname -i) \
--security-protocol SASL_SSL \
--sasl-mechanism SCRAM-SHA-256 \
--sasl-username evidentsource-prod \
--sasl-password $KAFKA_PASSWORD
Terminal window
# Memberlist linearizer (no Kafka required)
evidentsource server --scheme https \
--http-port 443 \
--grpc-port 50051 \
dynamo-db \
--table evidentsource-prod \
--s3-bucket evidentsource-prod-storage \
--cache-max-entries 1000000 \
memberlist \
--node-id $(hostname) \
--node-host $(ec2-metadata --local-ipv4 | cut -d " " -f 2) \
--memberlist-port 7946
Terminal window
# High-memory server (64GB RAM)
evidentsource server \
--scheme http \
--datafusion-memory-limit $((64 * 1024 * 1024 * 1024 * 40 / 100)) \
--cache-memory-limit $((64 * 1024 * 1024 * 1024 * 30 / 100)) \
--cache-max-entries 2000000 \
dynamo-db --table events --s3-bucket storage \
kafka --kafka-brokers kafka:9092 --node-host 0.0.0.0
Terminal window
# High-throughput configuration (32 cores)
evidentsource server \
--scheme http \
--io-worker-threads 8 \
--cpu-worker-threads 32 \
--datafusion-batch-size 8192 \
dynamo-db --table events --s3-bucket storage \
kafka --kafka-brokers kafka:9092 --node-host 0.0.0.0
Terminal window
# Optimized for low latency
evidentsource server \
--scheme http \
--datafusion-batch-size 1024 \
--wasm-epoch-increment-ms 5 \
--wasm-epoch-deadline 50 \
dynamo-db --table events --s3-bucket storage \
kafka --kafka-brokers kafka:9092 --node-host 0.0.0.0
Terminal window
evidentsource --version
Terminal window
evidentsource --help
evidentsource server --help
evidentsource server dynamo-db --help
evidentsource server dynamo-db kafka --help
Terminal window
RUST_LOG=debug evidentsource server --scheme http in-memory
Terminal window
# Start server
evidentsource server --scheme http in-memory
# In another terminal, test HTTP endpoint
curl http://localhost:3000/health
# Test gRPC endpoint (requires grpcurl)
grpcurl -plaintext localhost:50051 list

Port already in use:

Terminal window
# Use different ports
evidentsource server \
--scheme http \
--http-port 8080 \
--grpc-port 50052 \
in-memory

Permission denied:

Terminal window
# Check executable permissions
chmod +x evidentsource

AWS credentials not found:

Terminal window
# Set AWS credentials
export AWS_ACCESS_KEY_ID=your-access-key
export AWS_SECRET_ACCESS_KEY=your-secret-key
export AWS_REGION=us-east-1

Kafka connection failed:

Terminal window
# Verify Kafka brokers are reachable
nc -zv localhost 9092
# Check Kafka logs
RUST_LOG=rdkafka=debug evidentsource server --scheme http \
dynamo-db --table test --s3-bucket test \
kafka --kafka-brokers localhost:9092 --node-host 0.0.0.0