EasyP

EasyP v1 Pilot Configuration

The files and CLI commands used by the EasyP v1 pilot.

The v1 pilot separates module dependencies, generation, and lint and breaking policies:

FilePurpose
protobuf.modModule identity, source roots, requirements, and local replacements
protobuf.lockResolved Git commits and content hashes; generated by easyp mod tidy
easyp.gen.yamlModules to generate, plugins, outputs, and managed options
easyp.yamlLint and breaking policies

The CLI commands use the v1 files directly. They do not fall back to the older EasyP generation, lint, breaking, or module-management configuration. A Git dependency can still use older EasyP or Buf configuration: the dependency reader extracts its requirements and proto roots for import resolution.

For guided v0 migration, run easyp migrate in a terminal. Explicit --interactive starts the wizard with supplied values; --interactive=false disables it. Supplying --module without requesting the wizard preserves the original preview. See v0 migration.

Typical workflow

easyp init --module github.com/acme/contracts
easyp mod tidy
easyp mod download
easyp generate
easyp lint --path proto
easyp breaking --path proto --against main

Without replacements, mod tidy writes the lock, mod download installs pinned commits, and mod update refreshes requirements within their current major versions and updates the lock. With replace, commands use a local effective graph and preserve protobuf.lock byte-for-byte; a missing lock is not created. mod tidy also leaves the manifest unchanged. get and mod update may edit explicit requirements without adding fork-only transitives. mod download installs only needed unreplaced snapshots. Remove replacements and run mod tidy to produce a publishable lock. See local replacements.

Explicit frozen mode

Use --frozen for builds that must use the committed dependency graph. It defaults to false and is never inferred from CI=true. Every selected native module whose dependency graph is used needs both protobuf.mod and protobuf.lock, including an empty lock when there are no dependencies. An explicit workspace-relative generate.modules path uses the selected module's manifest and lock, so a directory containing only easyp.gen.yaml needs no separate pair. Dependency identity selectors still require the consumer manifest and lock. The manifest-free source fallback described below applies only without frozen mode.

easyp --frozen generate
easyp lint --frozen --path proto
easyp breaking --frozen --against main
easyp mod --frozen download
easyp mod vendor --frozen

The flag is accepted globally before the command; locally on generate, lint, breaking, ls-files, get, init, and migrate; and on mod or any of its four subcommands. A true value at any parent or command level enables it. A child --frozen=false cannot cancel a parent's true value.

Frozen rejects every root replace, even unused entries, before accessing replacement paths or fetching dependencies. It checks direct and transitive requirements against the lock and verifies cached content. It never resolves versions, looks up dependency HEAD/tags, or writes either manifest or lock. Missing or stale locks cause an error. Exact locked commits may still be fetched into the cache: frozen is not offline.

mod tidy, get, mod update, init, and migrate refuse frozen execution; migration preview and interactive mode are also refused. Prepare the files outside frozen mode. Generation checks every selected graph before any plugin runs. Lint keeps effective policy scoping; breaking uses the baseline revision's own manifest and lock. Local-only ls-files --include-imports=false still validates the frozen graph. See the package manager for the full dependency contract.

Command flags

CommandRelevant flags
generate--gen-config, --project (repeatable), --all, --workspace, --descriptor_set_out, --descriptor_set_out_dir, --include_imports
lint--path (-p), --root (-r)
breaking--path (-p), --root (-r), --against
init--dir (-d), --module
validate-config--config (alias of --cfg), --format
mod download/tidy/vendor/update--frozen
ls-files--include-imports (default true), --format (json or text)
schema-gen--out-dir (default schemas)

The global flags are --cfg (alias --config, default easyp.yaml), --debug (-d), --format (-f, text or json), and --frozen. EASYP_CFG, EASYP_DEBUG, and EASYP_FORMAT set their respective defaults. The module cache uses EASYPPATH or $HOME/.easyp.

By default, generate selects the closest easyp.gen.yaml in the current directory or a workspace ancestor. Use --gen-config private.easyp.gen.yaml for one explicitly named generation file; --cfg/--config selects policy only. Repeat --project for multiple explicit consumers. --all separately opts into recursive selection below the invocation directory. --gen-config, --project and --all are mutually exclusive selection modes. --workspace sets the boundary for module paths and inheritance; by default this is the nearest Git repository or enclosing EasyP files. Modules and roots come from protobuf.mod; generate.packages selects exact protobuf package names across the selected modules. The generate --path and generate --root flags are unavailable.

--descriptor_set_out merges compatible graphs into one file; --descriptor_set_out_dir produces an independent file per project/module pair. The flags are mutually exclusive and destinations are invocation-relative. --include_imports defaults to false and affects exports only. plugins[].with_imports also defaults to false but separately enables imported code generation for an individual plugin. options.go.package_prefix changes Go only; full managed mode requires explicit generate.managed.enabled: true.

lint and breaking read the v1 easyp.yaml. They use the nearest module's declared roots and locked or local dependency roots for imports. A policy may exist without a protobuf.mod; in that case the commands use the scanned files and built-in imports.

generate and ls-files also work without protobuf.mod when there are no module dependencies: the current project directory is treated as the source root.

EasyP expands environment variables in easyp.yaml and easyp.gen.yaml before parsing or validation. ${NAME} uses the variable value, ${NAME:-default} supplies a fallback, and $${NAME} leaves a literal ${NAME}. An unset variable without a fallback becomes an empty string. YAML comments are ignored during expansion. protobuf.mod and protobuf.lock do not use this substitution.

For breaking, explicit --against overrides breaking.baseline, followed by the default master. Each revision uses its own roots, manifests, and locks; the baseline comes from an isolated Git snapshot. Policies come from current configuration and sections are inherited as a whole. The additional category FILE is supported; package-related and other categories are reserved and rejected. breaking.ignore_unstable defaults to false; its exact unstable suffix forms are in the reference.

issues.exclude-rules.path is relative to the file supplying the issues section and supports *, ?, [], and complete ** segments. Literal directories cover their subtree. An empty rule {} explicitly ignores all files. linters.allow_comment_ignores defaults to true per policy. linters.extends and breaking.extends load section-scoped bases from bounded local paths or existing locked modules; see shared policies.

validate-config recursively checks every easyp.yaml, easyp.gen.yaml, protobuf.mod, and protobuf.lock below the current directory. Pass --cfg <file> to check one file or --cfg <directory> to scan another directory. JSON errors identify the file; YAML structure errors also include line and column. Invalid lock versions, incomplete entries, and malformed hashes are reported as validation errors.

easyp validate-config
easyp validate-config --cfg ./services --format json
easyp validate-config --cfg ./services/api/easyp.gen.yaml

mod vendor verifies the locked Git dependencies and copies their .proto files into easyp_vendor using their import paths. It replaces a previous vendor tree only after all files have been copied successfully. Duplicate import paths are errors. With local replace directives it copies the effective local and verified remote graph without changing the published lock.

ls-files lists local .proto files from protobuf.mod roots. By default it also includes reachable imports from dependencies and bundled well-known protos, resolving dependencies through the v1 lock or local replacements. Use --include-imports=false to list only local files; outside frozen mode this skips dependency resolution. JSON output contains files, roots, and any import errors.

schema-gen --out-dir schemas writes separate JSON Schemas for easyp.yaml, easyp.gen.yaml, and protobuf.lock, each with a -v1.schema.json filename and an unversioned alias. protobuf.mod is a text manifest, so validate it with validate-config instead. CLI validation also checks semantic rules beyond the JSON Schemas.

The exported github.com/easyp-tech/easyp/mcp/easypconfig package registers easyp_config_describe through easypconfig.RegisterTool(server). The tool describes easyp.yaml, easyp.gen.yaml, protobuf.lock and protobuf.mod. YAML references use the same JSON Schemas as schema-gen; the text manifest returns grammar instead of a fabricated YAML/JSON Schema.

{"file":"protobuf.mod","path":"require[].version"}
{"file":"protobuf.lock","path":"modules[0].commit"}

file is an exact format selector, not a path to read. Output includes format; YAML examples retain yaml, while manifest examples contain format: text and text. The grammar object describes text directives and block rules. All detail flags default to true; include_schema=false suppresses either the YAML schema or text grammar. examples_limit defaults to 10 and must be 1–50; invalid bounds are errors. The reference does not read project files, access the network, execute plugins or expand variables. Sample commit/hash values are synthetic, not verified repository contents.

Minimal files

module github.com/acme/contracts
roots proto
require github.com/acme/shared v1.2.0
# easyp.gen.yaml
version: v1
generate:
  modules: [github.com/acme/contracts]
plugins:
  - name: go
    out: ./gen/go
# easyp.yaml
version: v1
linters:
  default: STANDARD
breaking:
  baseline: git:main

For the exact fields and current limits, use the linked reference pages above.

Errors and noninteractive use

ls-files prints its complete JSON or text result, then exits with a nonzero status when import traversal reported an error. A JSON errors array is not a successful build. --include-imports=false deliberately lists only local files; it is not an import-integrity check.

init never opens a hidden controlling terminal behind redirected input or output. Supply --module when no identity can be read locally. An origin-based identity comes from the declared Git remote URL, before transport-only insteadOf rewriting. Overwriting a different existing configuration requires terminal confirmation; piped answers are not accepted.

Policy syntax and supported setting names are checked by execution as well as validate-config. A nonempty breaking baseline must have the git: prefix. Lint groups checked files by effective policy and module while preserving per-file exclusions and diagnostic order.

On this page