CLI Principles
CLI Principles Section 2 Draft

2. Naming and the read/write split

Source 02-naming.md

Back to the spec index

  • No split rule: a tool is one binary, and every command declares its class in describe (section 8) as a query or a mutation. A permission system matches on the command (for example tracker task get, which is a query) and describe tells it which commands are which.
    • An adopter may still split a tool into a read binary and a write binary (for example acme-read and acme-write). The spec neither requires nor forbids it. Where it does, the pair shares one folder set (section 9).
  • A command declared a query never mutates anything, including its own data. Whether a query takes locks or writes lock files is up to the CLI.
  • Names are lowercase, short, easy to type.