yjcli
CLI that scaffolds YJ platform folders, services, and AI agent wiring (Cursor, Claude Code, Codex).
Templates, skills, and root make files ship inside the package and are copied
into the target repo. Standing agent guidance lives in AGENTS.md only
(CLAUDE.md is a mirror).
Install
uv tool install yjcli
# pin a version:
uv tool install yjcli==0.0.5
yjcli --version
yjcli -h
Upgrade / remove:
uv tool upgrade yjcli
uv tool uninstall yjcli
Quick start
uv tool install yjcli
cd /path/to/your-repo
yjcli init --all
yjcli service add -p backend -n api
# edit AGENTS.md, then:
yjcli sync agents
make backend # start all backend services
make backend NAME=api # start one service
Platforms
Use with -t / --type (repeatable on init / platform add):
backend · backend-service · frontend · mobile-app · pc-app · cli · browser-extension · scheduler
What init creates
AGENTS.md,CLAUDE.md(mirror ofAGENTS.md)- Skills under
.cursor/skills/,.claude/skills/,.agents/skills/(Codex) - Claude
settings.json - Root
Makefile,make.bat,TOOLS.md,.gitignore Diff.md— user-maintained architecture difference and manual restoration notes- Selected platform roots with
scripts/run.*and development/production build/deploy templates
The root Makefile / make.bat wires platform run, build, and deploy entry points.
Build/deploy templates print the exact file to implement and fail until the project
supplies its build/package and upload logic. They remain platform-level; do not add
per-service scripts/ directories or per-service Makefiles.
run.* ships as .sh + .bat + .ps1 since local dev runs natively per platform.
build-* and deploy-* ship as .sh only — build/deploy tooling (Docker, etc.) is
not native to Windows, so make.bat runs those targets through WSL; macOS/Linux use
the shell script directly.
build-common.sh is the same file for every platform and is a thin plugin host:
it runs every scripts/plugin-build-*.sh file present, then falls through to its
own generic build guard. The build segment names the consumer (a deploy-side
plugin would be plugin-deploy-*.sh instead). Each plugin is its own file —
visible in scripts/, and runnable standalone — and self-detects whether it
applies by folder presence, not a platform-name check, so any platform can opt in.
plugin-build-proto.sh→ protoc codegen guard when<platform>/proto/exists.backendalways has this (fixed gRPC MSA root, seeyj-backend-msa); any other platform (includingbackend-service) gets the same guard only if it createsproto/too. protoc is the standard; buf is not used.plugin-build-ssr.sh→ template/asset build guard when<platform>/{service}/views/exists, checked per service. Any platform's service can opt in by creatingviews/.plugin-build-docker.sh→ docker image build only (no push, no swarm/stack rollout — that belongs in a deploy-side plugin) guard, per service that has aDockerfile(delete it to opt that service out). Builds always use.env.developmentor.env.productiondepending on which environment is targeted. The image version comes from the service'spackage.json/pyproject.tomlversionfield when present, otherwise theVERSIONenv var — set it for languages with no package-manifest version field.
None of these plugins imply each other, and using gRPC in backend-service does
not make it MSA — see yj-backend-msa / yj-backend-service for what each
option chapter actually changes.
yjcli service addaddsDockerfile+.dockerignoreto new services under deployable platforms (backend,backend-service,frontend,scheduler);cli/mobile-app/pc-app/browser-extensionare local/client artifacts, not docker-swarm services, so they don't get one. The Dockerfile is language-agnostic and intentionally has noFROMyet —docker buildfails until it's replaced, matching every other generated build/deploy stub.
deploy-common.sh is the same kind of plugin host for the deploy side: after
calling the matching build script, it runs every scripts/plugin-deploy-*.sh
file present (none ship by default — pushing an image, docker stack deploy,
kubectl apply, etc. are deploy-side plugins the project adds). deploy-development.sh
/ deploy-production.sh call deploy-common.sh and then own their own
upload/rollout guidance only.
Diff.md is created only when missing, including with init --force. yjcli never
reads, updates, overwrites, or uses it for automatic restoration during sync or
migration.
Operating rules (skill routing, output discipline) are in AGENTS.md — not in
.cursor/rules / .claude/rules.
Run (make)
Platform targets are discovered from */scripts/run.sh (after init / platform add).
Each service declares its local command as RUN_COMMAND in .env.local-dev.
New services include .env.local-dev, .env.development, .env.production, and
.env.examples. Only .env.local-dev and .env.examples are required;
development/production may be removed and other .env.<environment> files may
be added. Commit .env.examples only.
The platform runner executes that repository-owned declaration instead of
inferring npm, uv, Go, or another language/runtime from project manifests.
make <platform> # all services under that platform (concurrent)
make <platform> NAME=<service> # one service
make <platform>-build-development [NAME=<service>]
make <platform>-build-production [NAME=<service>]
make <platform>-deploy-development [NAME=<service>]
make <platform>-deploy-production [NAME=<service>]
make help
Sync
| Command | When |
|---|---|
yjcli sync agents |
After editing AGENTS.md — refreshes CLAUDE.md |
yjcli sync skills |
Refresh packaged skills (Cursor / Claude / Codex) |
yjcli sync make |
Overwrite root make/run files; install missing build/deploy scripts while preserving implemented ones |
yjcli sync all |
Soft upgrade — mirror CLAUDE + skills + make (keeps your AGENTS.md) |
yjcli sync migrate -y |
Hard upgrade — package template overwrites AGENTS.md, wipes skills dirs, drops legacy rules/.agent, refreshes settings/TOOLS/gitignore/make |
Edit AGENTS.md only; do not edit CLAUDE.md by hand. Use migrate when upgrading from older yjcli layouts (rules era).
Options
--type/-t— platform type (backend,frontend, …) oninit/platform add.--platform/-p— existing platform root onservice add.--name/-n— service/app name onservice add.--path <dir>— target repo root (default: current directory).--force/-f— overwrite existing root/agent files without prompting (initonly).
Notes
platform addcreates platform roots and their run/deploy scripts (no services, skills, or root Makefile).service addneeds the platform root first (initorplatform add).- Non-interactive: pass
-t/--all/-p/-nas needed, and pass--yesfor everysynccommand. doctorchecks the installed package assets, not your target repo.sync skills/sync allremove legacy.cursor/rulesand.claude/rulesif present.sync migratealso overwritesAGENTS.mdfrom the package (destructive).
Commands
yjcli init
yjcli init --all
yjcli init -t backend -t frontend
yjcli init --force
yjcli platform add
yjcli platform add --all
yjcli platform add -t cli
yjcli platform add -t scheduler
yjcli service add
yjcli service add -p backend -n api
yjcli service add -p scheduler -n operations
yjcli sync agents
yjcli sync skills
yjcli sync make
yjcli sync all
yjcli sync migrate --yes
yjcli doctor
Research: token & exploration
Not measured yet.
From the workspace root (sibling of this package), with CURSOR_API_KEY in tools/.env:
make bench # Cursor SDK: prepare → trials → report → this section
See bench/README.md.
Metadata
Release files for yjcli 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yjcli-0.2.5.tar.gz | 44.8 kB | Without provenance | Details for yjcli-0.2.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yjcli-0.2.5-py3-none-any.whl | Python 3 | none | any | Details for yjcli-0.2.5-py3-none-any.whl |
Total release size: 115.5 kB
Release files / yjcli-0.2.5.tar.gz
| Download URL | yjcli-0.2.5.tar.gz |
|---|---|
| Size | 44.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27e1f69bc60e6737103d51b820d7d8d21e751a0a903e49e78352e9aff71fdb91
|
|
BLAKE2b-256 checksum How to use checksums |
33c6a350c6a2cd1e0c64e7370a7505032ec67d196019499e734f223a1832a9c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|
Release files / yjcli-0.2.5-py3-none-any.whl
| Download URL | yjcli-0.2.5-py3-none-any.whl |
|---|---|
| Size | 70.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10b458ce134b25b4eb3448ebb7f4438bae4bc33cb7386db1decc349281e0b137
|
|
BLAKE2b-256 checksum How to use checksums |
b7530fe8f45692ed692ea09c41f6c31cf779af0eb1aa59269094ad91c85f6308
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|
Security for yjcli 0.2.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.