crab configure
Set up a new Crab repository in one guided flow.
crab configure [REMOTE] [OPTIONS]crab configure combines the normal crab init and crab setup steps. It:
- Selects Amazon S3, Google Cloud Storage, or Azure Blob Storage
- Connects the current directory to a remote bucket/container
- Detects credentials from environment variables and cloud SDK profiles
- Installs the Git filter and diff drivers
- Scans for large files and writes tracking rules
- Prints the next commands to verify and ship the repository
Crab never copies long-lived cloud secrets into crab.toml. When credentials
are missing, the setup output gives the provider-specific login command; run
crab doctor afterward to verify access.
Interactive setup
Run with no arguments in a terminal:
mkdir models && cd models
crab configureCrab asks for the cloud provider and a bucket/container plus repository path. Amazon S3 is the default choice.
Explicit setup
Use flags in scripts or when you already know the remote:
# Amazon S3
crab configure s3://team-data/models
# S3-compatible storage (after exporting credentials and AWS_ENDPOINT_URL)
crab configure crab://team-data/models --provider s3
# Google Cloud Storage
crab configure gs://team-data/models --provider gcs
# Azure Blob Storage
crab configure azure://team-data/models --provider azureProvider-prefixed URLs let Crab infer the provider, so --provider is optional
in those examples. Use it with a canonical crab:// URL when the provider is
not S3.
Select a named AWS profile without committing the profile name:
crab configure s3://team-data/models --aws-profile ml-teamCrab stores the selector in .crab/local.toml and uses the AWS SDK default
credential chain. Without the flag it honors AWS_PROFILE, then shared AWS
configuration, web identity, ECS credentials, and EC2 instance credentials.
S3-compatible services use the s3 provider. Export the service's access key,
secret key, region, and AWS_ENDPOINT_URL before configuration; do not put
credentials in the remote URL. See Static Credentials
for Cloudflare R2 and local MinIO/RustFS examples.
Choose the local bucket-GC listing policy during setup when desired:
crab configure s3://team-data/models --gc-list-profile adaptiveThe default adaptive profile minimizes LIST streams for smaller namespaces
and switches larger namespaces to hash-partition parallelism. cost always
prefers fewer LIST streams; latency immediately prefers partition scans.
Tracking options
Pass explicit patterns instead of relying only on the repository scan:
crab configure s3://team-data/models \
--track '*.safetensors' \
--track 'datasets/**'Install the integration without scanning:
crab configure s3://team-data/models --no-auto-trackPreview the plan without creating .git, .crab/, crab.toml, or tracking
rules:
crab configure s3://team-data/models --provider s3 --dry-runExisting project configuration
With no REMOTE, crab configure reuses a discovered crab.toml. This is a
convenient way to repair local Git integration and refresh tracking after a
regular Git clone.
Related commands
crab init— configure only the repository connectioncrab setup— rescan or change large-file trackingcrab doctor— verify credentials and repository health- Static credentials — provider credential discovery