@1c2c/cli
v0.4.0
Published
Unified OCTC CLI: octc sync agents, octc verify monorepo (ADR-0003), octc init workspace|app, octc add|sync surface, octc sync governance, octc portfolio suggest.
Downloads
746
Maintainers
Readme
@1c2c/cli
Unified OCTC command-line entry point (@1c2c/cli · v0.3+). Agent flows delegate to octc-agents; monorepo / superficies / gobernanza / sugerencias de PORTFOLIO viven en el mismo binario (octc verify monorepo, octc add|sync surface, octc sync governance, octc portfolio suggest — ver ADR-0003).
Install
pnpm add -D @1c2c/cliOr run without installing:
npx @1c2c/cli --helpUsage
# Preferred (P3-3 umbrella)
npx @1c2c/cli sync agents
npx @1c2c/cli sync agents --target ./some-repo
# Monorepo / governance (ADR-0003, ≥ 0.2)
npx @1c2c/cli verify monorepo
npx @1c2c/cli verify monorepo --cwd ./some-repo
# Stubs y plantillas empaquetadas (≥ 0.3)
npx @1c2c/cli add surface web
npx @1c2c/cli sync surface web --dry-run
npx @1c2c/cli sync surface --all --force
npx @1c2c/cli sync governance --only doc-contract
npx @1c2c/cli portfolio suggest --repo my-product
# *-workspace bootstrap (files on disk only; does not create GitHub repo or PORTFOLIO)
npx @1c2c/cli init workspace ./my-workspace --pin <SHA>
# *-app public-safe scaffold (same limits; --pin optional for portfolio dispatch callable)
npx @1c2c/cli init app ./my-app
# Shorthand
npx @1c2c/cli agents verify
npx @1c2c/cli agents init --forcePlantilla YAML monorepo: en el repo publicado templates/monorepo/monorepo.yaml.example; copia a .octc/monorepo.yaml en tu producto.
init workspace / init app
octc init workspace <dir>— Materializa el árbol estándar*-workspace(paridad conoctc-platform-internaltemplates/workspace-repo). Opciones:--force,--pin <SHA>(mismo valor enuses:ytooling_refdel wrapper generado),--template-dir <path>. No crea repo en GitHub ni configuración org; ver runbook interno.octc init app <dir>— Scaffoldtemplates/product: contrato -app en disco (p. ej..octc/monorepo.yaml, workflow portfolio dispatch).--pinopcional para el callable de portfolio; por defectomainsi la plantilla usa placeholder. No sustituye NEW_PRODUCT_REPO para rulesets/secretos.
Why this package?
octc verify monorepo,octc add surface,octc sync surface,octc sync governance,octc portfolio suggest— ver ADR-0003 y PORTFOLIO_BRIDGE. Matriz de superficies pensada para repos*-app(REFERENCE_PRODUCT_MONOREPO). Roadmap: automatizar PR a internal solo con credenciales org.@1c2c/agent-templatesremains the implementation for agent file sync; this package pins it as a dependency.
Provenance
Published with npm provenance from CI. Verify in consumers:
pnpm dlx audit-signatures || npm audit signaturesPolicy: docs/packages/POLICY.md.
First publish (maintainers)
The package must exist on npm before npx @1c2c/cli works for consumers. If it is not created yet:
- Ensure
packages/cli/package.jsonversion is correct (e.g.0.1.0). - From repo root, with
NPM_TOKENin./.env(classic or granular token with publish rights to@1c2c), run:
The script uses a temporarybash scripts/publish-cli-manual.sh.npmrcwith only the token so a previousnpm loginin your user profile does not trigger the browser / device flow. If publish still asks for OTP:bash scripts/publish-cli-manual.sh --otp=XXXXXX. For CI, prefer a granular automation token that can publish without OTP (if org policy allows). - First publish uses
--no-provenance(token on laptop). After the package exists, configure Trusted Publisher for@1c2c/clion npm and preferrelease.ymlfor subsequent releases (provenance + OIDC), per SUPPLY_CHAIN.
