swarm-keydb

Development

Requirements

Build and test

dotnet restore SwarmKeyDb.slnx
dotnet build SwarmKeyDb.slnx
dotnet run --project tests/SwarmKeyDb.Tests/SwarmKeyDb.Tests.csproj

Local server workflow

Run the server with the local file-backed backend:

dotnet run --project src/SwarmKeyDb.Server/SwarmKeyDb.Server.csproj
redis-cli -p 6379 SET profile:name Ada
redis-cli -p 6379 GET profile:name

To use Bee instead, set SWARM_KEYDB_BACKEND=bee together with BEE_URL and BEE_POSTAGE_BATCH_ID.
To use IPFS, set BACKEND=ipfs and IPFS_API_URL; for dual-write/fallback mode use BACKEND=hybrid plus both Bee and IPFS settings.

CLI workflow

Run the CLI from source:

dotnet run --project src/SwarmKeyDb.Cli/SwarmKeyDb.Cli.csproj -- --help

Migration workflow

Run the Redis migration CLI from source:

dotnet run --project src/SwarmKeyDb.Migrate/SwarmKeyDb.Migrate.csproj -- --help

See docs/development/migration.md for full, dry-run, prefix-only, resumable, and validation examples.

Documentation expectation

When runtime behavior, deployment, configuration, or workflows change, update the relevant files in docs/ and any impacted top-level documentation in the same change.

CI/CD Docker publishing

See docs/development/docker-release-pipeline.md for Docker Hub tag strategy (zero-day, release-YYYYMMDD, and latest promotion), workflow behavior, and required GitHub Actions variables/secrets.

CI/CD NuGet publishing

See docs/development/nuget-swarmconsistency-pipeline.md for the SwarmKeyDb.SwarmConsistency package publish workflow, required GitHub settings, and datetime-based versioning.