Skip to content

Latest commit

 

History

History
108 lines (83 loc) · 4.56 KB

README.md

File metadata and controls

108 lines (83 loc) · 4.56 KB

Governance CLI

gov talks to the Governance JSON API: circles, roles, the search and proposals. Commands follow the pattern gov <noun> <verb>, e.g. gov proposals show 12; gov --help and gov <noun> --help list them. Every command takes --json for scripts. IDs and names link to their pages in terminals which support links.

Install it with uv:

uv tool install "git+https://github.com/feinheit/governance#subdirectory=cli"

Upgrade it when gov tells you to, it prints the command.

The Claude Code skills using gov come with it, link them into your Claude Code skills with gov skills install.

Log in, which opens the browser to authorize gov. Choose the access explicitly: --read only allows looking things up, --write also allows creating, changing and publishing proposals. Read access is the safer choice for tools and agents which only answer questions:

gov login https://governance.feinheit.ch --read

Check it with gov me, which also lists your roles with their IDs. Access expires 30 days after its last use; gov then opens the browser again by itself. On computers without a browser, create a token on the "API tokens" page and use gov login URL --token.

gov logout revokes the token gov uses and forgets the installation. gov tokens lists your tokens, gov tokens delete ID revokes them, e.g. the token of a computer you don't use anymore or one which leaked.

Several installations work like in Workbench's wb: gov auth list, gov auth switch NAME, GOVERNANCE_URL for one terminal and gov -i NAME for one command. Scripts may set GOVERNANCE_URL and GOVERNANCE_TOKEN instead of logging in.

Enable completing commands, options and IDs with Tab in your shell:

echo 'eval "$(gov completion bash)"' >> ~/.bashrc     # bash
echo 'eval "$(gov completion zsh)"' >> ~/.zshrc       # zsh
gov completion fish > ~/.config/fish/completions/gov.fish   # fish

IDs of circles, roles, policies and proposals are completed with their names (bash lists them next to the IDs when there are several); typing a part of a name and Tab replaces it with the ID. The names are cached in ~/.cache/gov, the structure for a day, your roles for an hour, proposals for five minutes.

Reading

gov circles                 # the circles as a tree
gov circles show 12         # a circle with its roles and policies
gov roles show 34           # a role with its texts and Role Leads
gov roles context 34        # domains and policies affecting it from outside
gov policies --circle 12    # a circle's policies, also its roles'
gov policies show 78        # a policy with its text
gov domains --circle 12     # domains with their policies
gov search soup kitchen     # all terms, ignoring case and accents
gov export -o governance.md # everything as one Markdown document
gov export --json           # the same as data, a tree of roles
gov constitution --language de  # the Holacracy Constitution as Markdown
gov proposals --circle 12 --status published
gov proposals show 56       # tension, changes, problems

Tensions for a meeting

A circle's tension inbox, its members see it; you or the secretary put your tension on the agenda of the circle's next meeting:

gov tensions list 12
gov tensions add 12 "Knives dull" --description "Since May, see the cook's notes"
gov tensions add 12 "Pots" --private   # only you see it
gov tensions update 90 --title "Knives blunt"
gov tensions remove 90

Preparing proposals

A draft needs the circle, one of your roles in it (see gov me) and the tension; without instructions it stays a tension only you see. The instructions use GlassFrog's format, in YAML or JSON, e.g. a new role:

- op: add
  path: /roles/n1
- op: add
  path: /roles/n1/name
  value: Baker
- op: add
  path: /roles/n1/aim
  value: Bread for everyone

gov proposals create --circle 12 --role 34 --tension - --instructions baker.yaml
gov proposals update 56 --instructions baker.yaml
gov proposals publish 56

The server checks the instructions and lists the problems which would prevent adopting the draft; publishing refuses drafts with problems.

Responding

gov proposals open          # published in your circles, your response
gov proposals consent 56    # no objection
gov proposals request-meeting 56 --concern "Who washes the pots?"
gov proposals comment 56 "Does this include the pots?"

Crashes write a bug report to ~/.cache/gov instead of a traceback, set GOV_DEBUG=1 to see the exception.