Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cinc

cinc is a single, unified command-line tool for Cinc Infra (with full Chef Infra compatibility) — one command with one consistent grammar. It is a Go binary built with Cobra on top of the cinc-api client library, which owns authentication and transport.

Status

Early development. The command surface is being built out one noun group at a time. See docs/commands/cinc.md for the current command surface (auto-generated from the cobra command tree). The taxonomy and internal architecture are described in docs/dev/.

Install

Requires Go 1.26 or newer.

# Build a local ./cinc binary
make build

# Or install into $GOBIN
make install

make injects version, commit, and build-date metadata into the binary via -ldflags; cinc version will print them.

Configure

cinc reads a TOML credentials file (default ~/.cinc/credentials) holding named profiles, in the same shape as Chef's ~/.chef/credentials. Each top-level section is a profile that points at one Cinc/Chef Server.

[default]
cinc_server_url = "https://cinc.example.com/organizations/acme"
client_name     = "tim"
client_key      = "/keys/tim.pem"

[staging]
cinc_server_url = "https://staging.example.com/organizations/acme-staging"
client_name     = "tim"
client_key      = "/keys/staging.pem"
ssl_verify_mode = ":verify_none"

Persistent flags on every command:

Flag Description
--config Path to the credentials file (default ~/.cinc/credentials)
--profile Profile name to use (default: $CINC_PROFILE, then $CHEF_PROFILE, then default)
--format Output format: human or json

CINC_* and CHEF_* are both accepted

Every chef-prefixed config key and environment variable has a cinc-prefixed equivalent. Both are accepted; if both are set in the same profile or environment the cinc_/CINC_ form wins. This lets you run cinc against an existing Chef setup unchanged, and override individual settings without rewriting the whole file.

Chef-prefixed Cinc-prefixed
chef_server_url (TOML key) cinc_server_url (TOML key)
CHEF_PROFILE (env var) CINC_PROFILE (env var)

Usage

Commands are noun-verb. The core verbs (list, show, create, edit, delete) mean the same thing on every noun. For a guided walkthrough — profiles, output formats, common workflows — see docs/README.md. For the exhaustive per-command reference (every flag, every default), see docs/commands/. The reference pages are regenerated from the live cobra command tree by make docs and refreshed automatically on every push to main.

Develop

make test            # unit tests
make vet             # go vet
make fmt             # gofmt -w
make test-acceptance # acceptance tests against chef-zero (needs Ruby + chef-zero gem)
make help            # list all targets

Repository layout:

  • apps/cinc/ — the binary. cinc.go is a thin main(); cmd/ holds the Cobra command tree (one file per noun group, plus root.go and flag-resolution helpers in common.go).
  • cli/config — TOML config parsing and profile resolution.
  • cli/client — builds a cinc-api client from a resolved profile. This is the single seam between CLI state and the API library; the CLI itself never builds or signs an HTTP request.
  • cli/printer — renders command output as human text or JSON.
  • docs/ — auto-generated per-command reference under commands/ (regenerated by make docs) and design docs under dev/.
  • tools/gendocs/ — small Go program that walks the cobra command tree and writes the Markdown reference. Invoked by make docs.
  • test/ — acceptance tests, gated behind the acceptance build tag.

See CLAUDE.md for conventions followed when developing with Claude Code.

About

A unified Go CLI for Chef/Cinc Infra

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages