consensus-tools init

Generate .consensus templates and starter scripts.

Usage

consensus-tools init [--force] [--wizard] [--templates-only]

init generates a .consensus/ workspace with config, env scaffolding, and API shell scripts.

What gets generated

.consensus/
  README.md
  config.json
  env.example
  generation.ts
  api/
    common.sh
    jobs_post.sh
    jobs_get.sh
    jobs_list.sh
    submissions_create.sh
    submissions_list.sh
    votes_cast.sh
    votes_list.sh
    resolve.sh
    result_get.sh

Flags

FlagDescription
--forceOverwrite existing generated files
--wizardForce interactive wizard mode (TTY only)
--templates-onlySkip prompts and only write templates

Examples

# Basic template generation
consensus-tools init

# Non-interactive overwrite
consensus-tools init --templates-only --force

Then copy and load env values:

cp .consensus/env.example .consensus/.env
source .consensus/.env

Next steps