yjcli 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- yjcli-0.0.1/.gitignore +40 -0
- yjcli-0.0.1/LICENSE +21 -0
- yjcli-0.0.1/PKG-INFO +81 -0
- yjcli-0.0.1/README.md +56 -0
- yjcli-0.0.1/pyproject.toml +52 -0
- yjcli-0.0.1/src/yjcli/__init__.py +3 -0
- yjcli-0.0.1/src/yjcli/__main__.py +4 -0
- yjcli-0.0.1/src/yjcli/cli.py +51 -0
- yjcli-0.0.1/src/yjcli/commands/__init__.py +1 -0
- yjcli-0.0.1/src/yjcli/commands/add.py +95 -0
- yjcli-0.0.1/src/yjcli/commands/init_cmd.py +61 -0
- yjcli-0.0.1/src/yjcli/data/__init__.py +0 -0
- yjcli-0.0.1/src/yjcli/data/claude-rules/output-discipline.md +11 -0
- yjcli-0.0.1/src/yjcli/data/claude-rules/skill-backend-msa.md +9 -0
- yjcli-0.0.1/src/yjcli/data/claude-rules/skill-backend-service.md +10 -0
- yjcli-0.0.1/src/yjcli/data/claude-rules/skill-browser-extension.md +10 -0
- yjcli-0.0.1/src/yjcli/data/claude-rules/skill-cli.md +9 -0
- yjcli-0.0.1/src/yjcli/data/claude-rules/skill-frontend.md +9 -0
- yjcli-0.0.1/src/yjcli/data/claude-rules/skill-mobile-app.md +9 -0
- yjcli-0.0.1/src/yjcli/data/claude-rules/skill-pc-app.md +9 -0
- yjcli-0.0.1/src/yjcli/data/claude-rules/yj-arch-core.md +7 -0
- yjcli-0.0.1/src/yjcli/data/cursor-rules/output-discipline.mdc +12 -0
- yjcli-0.0.1/src/yjcli/data/cursor-rules/skill-backend-msa.mdc +9 -0
- yjcli-0.0.1/src/yjcli/data/cursor-rules/skill-backend-service.mdc +9 -0
- yjcli-0.0.1/src/yjcli/data/cursor-rules/skill-browser-extension.mdc +10 -0
- yjcli-0.0.1/src/yjcli/data/cursor-rules/skill-cli.mdc +9 -0
- yjcli-0.0.1/src/yjcli/data/cursor-rules/skill-frontend.mdc +9 -0
- yjcli-0.0.1/src/yjcli/data/cursor-rules/skill-mobile-app.mdc +9 -0
- yjcli-0.0.1/src/yjcli/data/cursor-rules/skill-pc-app.mdc +9 -0
- yjcli-0.0.1/src/yjcli/data/cursor-rules/yj-arch-core.mdc +8 -0
- yjcli-0.0.1/src/yjcli/data/skills/yj-arch-core/SKILL.md +110 -0
- yjcli-0.0.1/src/yjcli/data/skills/yj-backend-msa/SKILL.md +127 -0
- yjcli-0.0.1/src/yjcli/data/skills/yj-backend-service/SKILL.md +101 -0
- yjcli-0.0.1/src/yjcli/data/skills/yj-browser-extension/SKILL.md +77 -0
- yjcli-0.0.1/src/yjcli/data/skills/yj-cli/SKILL.md +75 -0
- yjcli-0.0.1/src/yjcli/data/skills/yj-frontend/SKILL.md +68 -0
- yjcli-0.0.1/src/yjcli/data/skills/yj-mobile-app/SKILL.md +63 -0
- yjcli-0.0.1/src/yjcli/data/skills/yj-pc-app/SKILL.md +83 -0
- yjcli-0.0.1/src/yjcli/data/templates/.gitignore +196 -0
- yjcli-0.0.1/src/yjcli/data/templates/AGENTS.md +109 -0
- yjcli-0.0.1/src/yjcli/data/templates/Makefile +14 -0
- yjcli-0.0.1/src/yjcli/data/templates/make.bat +44 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/backend/.env.development +4 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/backend/.env.examples +11 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/backend/.env.local-dev +4 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/backend/.env.production +4 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/backend-service/.env.development +2 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/backend-service/.env.examples +11 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/backend-service/.env.local-dev +2 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/backend-service/.env.production +2 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/browser-extension/.env.development +2 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/browser-extension/.env.examples +5 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/browser-extension/.env.local-dev +2 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/browser-extension/.env.production +2 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/cli/.env.development +2 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/cli/.env.examples +5 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/cli/.env.local-dev +2 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/cli/.env.production +2 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/frontend/.env.development +4 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/frontend/.env.examples +11 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/frontend/.env.local-dev +4 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/frontend/.env.production +4 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/frontend/package.json +26 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/frontend/vite.config.ts +30 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/mobile-app/.env.development +2 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/mobile-app/.env.examples +5 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/mobile-app/.env.local-dev +2 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/mobile-app/.env.production +2 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/pc-app/.env.development +2 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/pc-app/.env.examples +5 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/pc-app/.env.local-dev +2 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/pc-app/.env.production +2 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/scripts/run.bat +87 -0
- yjcli-0.0.1/src/yjcli/data/templates/platform/scripts/run.sh +145 -0
- yjcli-0.0.1/src/yjcli/data/templates/settings.json +1 -0
- yjcli-0.0.1/src/yjcli/modules/__init__.py +1 -0
- yjcli-0.0.1/src/yjcli/modules/constants.py +15 -0
- yjcli-0.0.1/src/yjcli/modules/fsutil.py +102 -0
- yjcli-0.0.1/src/yjcli/modules/paths.py +26 -0
- yjcli-0.0.1/src/yjcli/modules/prompt.py +70 -0
- yjcli-0.0.1/src/yjcli/services/__init__.py +1 -0
- yjcli-0.0.1/src/yjcli/services/scaffold.py +201 -0
- yjcli-0.0.1/src/yjcli/services/status.py +20 -0
- yjcli-0.0.1/src/yjcli/services/wiring.py +61 -0
yjcli-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Virtual environments
|
|
2
|
+
.venv/
|
|
3
|
+
venv/
|
|
4
|
+
.env/
|
|
5
|
+
.env.*
|
|
6
|
+
!.env.examples
|
|
7
|
+
# Packaged scaffold templates must ship env samples (still ignored in user repos).
|
|
8
|
+
!src/yjcli/data/templates/**/.env.*
|
|
9
|
+
|
|
10
|
+
# Python
|
|
11
|
+
__pycache__/
|
|
12
|
+
*.py[cod]
|
|
13
|
+
*$py.class
|
|
14
|
+
*.egg-info/
|
|
15
|
+
.eggs/
|
|
16
|
+
dist/
|
|
17
|
+
build/
|
|
18
|
+
*.egg
|
|
19
|
+
|
|
20
|
+
# Test / type / coverage
|
|
21
|
+
.pytest_cache/
|
|
22
|
+
.mypy_cache/
|
|
23
|
+
.ruff_cache/
|
|
24
|
+
.coverage
|
|
25
|
+
.coverage.*
|
|
26
|
+
htmlcov/
|
|
27
|
+
.tox/
|
|
28
|
+
.nox/
|
|
29
|
+
|
|
30
|
+
# OS / editor
|
|
31
|
+
.DS_Store
|
|
32
|
+
Thumbs.db
|
|
33
|
+
.idea/
|
|
34
|
+
.vscode/
|
|
35
|
+
*.swp
|
|
36
|
+
*.swo
|
|
37
|
+
|
|
38
|
+
# Local tooling
|
|
39
|
+
*.log
|
|
40
|
+
.cache/
|
yjcli-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 yseiren87
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
yjcli-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: yjcli
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Scaffold platforms, services, and AI agent wiring (Cursor/Claude) for YJ architecture repos.
|
|
5
|
+
Project-URL: Homepage, https://github.com/yseiren87/yjcli
|
|
6
|
+
Project-URL: Repository, https://github.com/yseiren87/yjcli
|
|
7
|
+
Project-URL: Issues, https://github.com/yseiren87/yjcli/issues
|
|
8
|
+
Author: yseiren87
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: agent,claude,cli,cursor,scaffold
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
21
|
+
Classifier: Topic :: Utilities
|
|
22
|
+
Requires-Python: >=3.12
|
|
23
|
+
Requires-Dist: typer>=0.12
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# yjcli
|
|
27
|
+
|
|
28
|
+
Self-contained CLI (uv + `pyproject.toml`) that scaffolds YJ platform folders, services, and Cursor/Claude agent wiring.
|
|
29
|
+
|
|
30
|
+
All templates, skills, and rules ship inside the package (`src/yjcli/data/`).
|
|
31
|
+
|
|
32
|
+
## Develop
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
cd yjcli
|
|
36
|
+
uv sync
|
|
37
|
+
uv run yjcli --help
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Test / Publish (workspace root)
|
|
41
|
+
|
|
42
|
+
Sibling `tools/` holds smoke-test and publish helpers (not committed with this package).
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
make test # tools/test_yjcli.py smoke checks
|
|
46
|
+
|
|
47
|
+
# edit tools/.env
|
|
48
|
+
UV_PUBLISH_TOKEN=pypi-... # https://pypi.org/manage/account/token/
|
|
49
|
+
# UV_PUBLISH_TOKEN_TEST=pypi-... # optional TestPyPI token
|
|
50
|
+
|
|
51
|
+
make build
|
|
52
|
+
make clean
|
|
53
|
+
make deploy-dry / deploy-test-dry # uv publish --dry-run
|
|
54
|
+
make deploy-test # TestPyPI
|
|
55
|
+
make deploy # PyPI
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Package version is set in `pyproject.toml` / `src/yjcli/__init__.py`.
|
|
59
|
+
|
|
60
|
+
## Commands
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Bootstrap current directory: AGENTS.md/CLAUDE.md, .cursor/.claude skills+rules,
|
|
64
|
+
# root Makefile/.gitignore, then create selected platform roots.
|
|
65
|
+
uv run yjcli init
|
|
66
|
+
uv run yjcli init --all
|
|
67
|
+
uv run yjcli init -p backend -p frontend
|
|
68
|
+
|
|
69
|
+
uv run yjcli add platform # interactive: add missing platforms
|
|
70
|
+
uv run yjcli add platform --all
|
|
71
|
+
uv run yjcli add platform -p cli
|
|
72
|
+
|
|
73
|
+
uv run yjcli add service # interactive
|
|
74
|
+
uv run yjcli add service -p backend -n api
|
|
75
|
+
|
|
76
|
+
uv run yjcli doctor # packaged asset sanity check
|
|
77
|
+
uv run yjcli --version
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Agent assets are **copied** from the package into the target repo (no `.agent` folder).
|
|
81
|
+
Re-run `yjcli init --force` (or answer overwrite prompts) to refresh skills/rules.
|
yjcli-0.0.1/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# yjcli
|
|
2
|
+
|
|
3
|
+
Self-contained CLI (uv + `pyproject.toml`) that scaffolds YJ platform folders, services, and Cursor/Claude agent wiring.
|
|
4
|
+
|
|
5
|
+
All templates, skills, and rules ship inside the package (`src/yjcli/data/`).
|
|
6
|
+
|
|
7
|
+
## Develop
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
cd yjcli
|
|
11
|
+
uv sync
|
|
12
|
+
uv run yjcli --help
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Test / Publish (workspace root)
|
|
16
|
+
|
|
17
|
+
Sibling `tools/` holds smoke-test and publish helpers (not committed with this package).
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
make test # tools/test_yjcli.py smoke checks
|
|
21
|
+
|
|
22
|
+
# edit tools/.env
|
|
23
|
+
UV_PUBLISH_TOKEN=pypi-... # https://pypi.org/manage/account/token/
|
|
24
|
+
# UV_PUBLISH_TOKEN_TEST=pypi-... # optional TestPyPI token
|
|
25
|
+
|
|
26
|
+
make build
|
|
27
|
+
make clean
|
|
28
|
+
make deploy-dry / deploy-test-dry # uv publish --dry-run
|
|
29
|
+
make deploy-test # TestPyPI
|
|
30
|
+
make deploy # PyPI
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Package version is set in `pyproject.toml` / `src/yjcli/__init__.py`.
|
|
34
|
+
|
|
35
|
+
## Commands
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Bootstrap current directory: AGENTS.md/CLAUDE.md, .cursor/.claude skills+rules,
|
|
39
|
+
# root Makefile/.gitignore, then create selected platform roots.
|
|
40
|
+
uv run yjcli init
|
|
41
|
+
uv run yjcli init --all
|
|
42
|
+
uv run yjcli init -p backend -p frontend
|
|
43
|
+
|
|
44
|
+
uv run yjcli add platform # interactive: add missing platforms
|
|
45
|
+
uv run yjcli add platform --all
|
|
46
|
+
uv run yjcli add platform -p cli
|
|
47
|
+
|
|
48
|
+
uv run yjcli add service # interactive
|
|
49
|
+
uv run yjcli add service -p backend -n api
|
|
50
|
+
|
|
51
|
+
uv run yjcli doctor # packaged asset sanity check
|
|
52
|
+
uv run yjcli --version
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Agent assets are **copied** from the package into the target repo (no `.agent` folder).
|
|
56
|
+
Re-run `yjcli init --force` (or answer overwrite prompts) to refresh skills/rules.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "yjcli"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "Scaffold platforms, services, and AI agent wiring (Cursor/Claude) for YJ architecture repos."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.12"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "yseiren87" },
|
|
10
|
+
]
|
|
11
|
+
keywords = ["cli", "scaffold", "cursor", "claude", "agent"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 3 - Alpha",
|
|
14
|
+
"Environment :: Console",
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3.12",
|
|
19
|
+
"Programming Language :: Python :: 3.13",
|
|
20
|
+
"Programming Language :: Python :: 3.14",
|
|
21
|
+
"Topic :: Software Development :: Code Generators",
|
|
22
|
+
"Topic :: Utilities",
|
|
23
|
+
]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"typer>=0.12",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.urls]
|
|
29
|
+
Homepage = "https://github.com/yseiren87/yjcli"
|
|
30
|
+
Repository = "https://github.com/yseiren87/yjcli"
|
|
31
|
+
Issues = "https://github.com/yseiren87/yjcli/issues"
|
|
32
|
+
|
|
33
|
+
[project.scripts]
|
|
34
|
+
yjcli = "yjcli.cli:app"
|
|
35
|
+
|
|
36
|
+
[build-system]
|
|
37
|
+
requires = ["hatchling"]
|
|
38
|
+
build-backend = "hatchling.build"
|
|
39
|
+
|
|
40
|
+
[tool.hatch.build.targets.wheel]
|
|
41
|
+
packages = ["src/yjcli"]
|
|
42
|
+
|
|
43
|
+
[tool.hatch.build.targets.sdist]
|
|
44
|
+
include = [
|
|
45
|
+
"/src",
|
|
46
|
+
"/README.md",
|
|
47
|
+
"/LICENSE",
|
|
48
|
+
"/pyproject.toml",
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
[tool.uv]
|
|
52
|
+
package = true
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Entry: register subcommands (Typer)."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
import typer
|
|
8
|
+
|
|
9
|
+
from yjcli import __version__
|
|
10
|
+
from yjcli.commands import add
|
|
11
|
+
from yjcli.commands.init_cmd import init_cmd
|
|
12
|
+
from yjcli.services import status
|
|
13
|
+
|
|
14
|
+
app = typer.Typer(
|
|
15
|
+
name="yjcli",
|
|
16
|
+
help="Scaffold YJ platforms/services and Cursor/Claude agent wiring.",
|
|
17
|
+
no_args_is_help=True,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _version_callback(value: bool) -> None:
|
|
22
|
+
if value:
|
|
23
|
+
typer.echo(__version__)
|
|
24
|
+
raise typer.Exit()
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@app.callback()
|
|
28
|
+
def main(
|
|
29
|
+
version: Optional[bool] = typer.Option(
|
|
30
|
+
None,
|
|
31
|
+
"--version",
|
|
32
|
+
"-V",
|
|
33
|
+
help="Print version and exit.",
|
|
34
|
+
callback=_version_callback,
|
|
35
|
+
is_eager=True,
|
|
36
|
+
),
|
|
37
|
+
) -> None:
|
|
38
|
+
"""yjcli root options."""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
app.command("init")(init_cmd)
|
|
42
|
+
app.add_typer(add.app, name="add")
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@app.command("doctor")
|
|
46
|
+
def doctor() -> None:
|
|
47
|
+
"""Show packaged template/skill/rule counts."""
|
|
48
|
+
assets = status.asset_summary()
|
|
49
|
+
typer.echo("yjcli packaged data:")
|
|
50
|
+
for key, n in assets.items():
|
|
51
|
+
typer.echo(f" {key}: {n} files")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""CLI command groups (thin entry handlers)."""
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"""yjcli add <resource> — extend an existing repo."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import Optional
|
|
7
|
+
|
|
8
|
+
import typer
|
|
9
|
+
|
|
10
|
+
from yjcli.modules.constants import PLATFORMS
|
|
11
|
+
from yjcli.services import scaffold
|
|
12
|
+
|
|
13
|
+
app = typer.Typer(help="Add a platform or service to the current repo.")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@app.command("platform")
|
|
17
|
+
def add_platform(
|
|
18
|
+
platform: Optional[list[str]] = typer.Option(
|
|
19
|
+
None,
|
|
20
|
+
"--platform",
|
|
21
|
+
"-p",
|
|
22
|
+
help="Platform to add (repeatable). Interactive if omitted.",
|
|
23
|
+
),
|
|
24
|
+
all_platforms: bool = typer.Option(
|
|
25
|
+
False,
|
|
26
|
+
"--all",
|
|
27
|
+
help="Add all missing platforms.",
|
|
28
|
+
),
|
|
29
|
+
force: bool = typer.Option(
|
|
30
|
+
False,
|
|
31
|
+
"--force",
|
|
32
|
+
"-f",
|
|
33
|
+
help="Overwrite existing root/agent files without prompting.",
|
|
34
|
+
),
|
|
35
|
+
path: Path = typer.Option(
|
|
36
|
+
Path("."),
|
|
37
|
+
"--path",
|
|
38
|
+
help="Target repository root (default: cwd).",
|
|
39
|
+
file_okay=False,
|
|
40
|
+
dir_okay=True,
|
|
41
|
+
resolve_path=True,
|
|
42
|
+
),
|
|
43
|
+
) -> None:
|
|
44
|
+
"""Add one or more platform roots from packaged templates."""
|
|
45
|
+
if all_platforms and platform:
|
|
46
|
+
typer.echo("error: use either --all or --platform, not both", err=True)
|
|
47
|
+
raise typer.Exit(code=1)
|
|
48
|
+
if platform:
|
|
49
|
+
unknown = [p for p in platform if p not in PLATFORMS]
|
|
50
|
+
if unknown:
|
|
51
|
+
typer.echo(
|
|
52
|
+
f"error: unknown platform(s): {', '.join(unknown)}",
|
|
53
|
+
err=True,
|
|
54
|
+
)
|
|
55
|
+
raise typer.Exit(code=1)
|
|
56
|
+
|
|
57
|
+
scaffold.bootstrap(
|
|
58
|
+
path,
|
|
59
|
+
platforms=platform,
|
|
60
|
+
all_platforms=all_platforms,
|
|
61
|
+
force=force,
|
|
62
|
+
mode="add",
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
@app.command("service")
|
|
67
|
+
def add_service(
|
|
68
|
+
platform: Optional[str] = typer.Option(
|
|
69
|
+
None,
|
|
70
|
+
"--platform",
|
|
71
|
+
"-p",
|
|
72
|
+
help="Existing platform root. Interactive if omitted.",
|
|
73
|
+
),
|
|
74
|
+
name: Optional[str] = typer.Option(
|
|
75
|
+
None,
|
|
76
|
+
"--name",
|
|
77
|
+
"-n",
|
|
78
|
+
help="Service/app name. Interactive if omitted.",
|
|
79
|
+
),
|
|
80
|
+
path: Path = typer.Option(
|
|
81
|
+
Path("."),
|
|
82
|
+
"--path",
|
|
83
|
+
help="Target repository root (default: cwd).",
|
|
84
|
+
file_okay=False,
|
|
85
|
+
dir_okay=True,
|
|
86
|
+
resolve_path=True,
|
|
87
|
+
),
|
|
88
|
+
) -> None:
|
|
89
|
+
"""Add a service/app under an existing platform."""
|
|
90
|
+
if platform and platform not in PLATFORMS:
|
|
91
|
+
typer.echo(f"error: unknown platform: {platform}", err=True)
|
|
92
|
+
typer.echo(f"known: {', '.join(PLATFORMS)}", err=True)
|
|
93
|
+
raise typer.Exit(code=1)
|
|
94
|
+
|
|
95
|
+
scaffold.add_service_flow(path, platform=platform, name=name)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""yjcli init — bootstrap the current repo."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import Optional
|
|
7
|
+
|
|
8
|
+
import typer
|
|
9
|
+
|
|
10
|
+
from yjcli.modules.constants import PLATFORMS
|
|
11
|
+
from yjcli.services import scaffold
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def init_cmd(
|
|
15
|
+
platform: Optional[list[str]] = typer.Option(
|
|
16
|
+
None,
|
|
17
|
+
"--platform",
|
|
18
|
+
"-p",
|
|
19
|
+
help="Platform to create (repeatable). Interactive if omitted.",
|
|
20
|
+
),
|
|
21
|
+
all_platforms: bool = typer.Option(
|
|
22
|
+
False,
|
|
23
|
+
"--all",
|
|
24
|
+
help="Create all known platforms.",
|
|
25
|
+
),
|
|
26
|
+
force: bool = typer.Option(
|
|
27
|
+
False,
|
|
28
|
+
"--force",
|
|
29
|
+
"-f",
|
|
30
|
+
help="Overwrite existing root/agent files without prompting.",
|
|
31
|
+
),
|
|
32
|
+
path: Path = typer.Option(
|
|
33
|
+
Path("."),
|
|
34
|
+
"--path",
|
|
35
|
+
help="Target repository root (default: cwd).",
|
|
36
|
+
file_okay=False,
|
|
37
|
+
dir_okay=True,
|
|
38
|
+
resolve_path=True,
|
|
39
|
+
),
|
|
40
|
+
) -> None:
|
|
41
|
+
"""Bootstrap root templates, agent wiring, and selected platforms."""
|
|
42
|
+
if all_platforms and platform:
|
|
43
|
+
typer.echo("error: use either --all or --platform, not both", err=True)
|
|
44
|
+
raise typer.Exit(code=1)
|
|
45
|
+
if platform:
|
|
46
|
+
unknown = [p for p in platform if p not in PLATFORMS]
|
|
47
|
+
if unknown:
|
|
48
|
+
typer.echo(
|
|
49
|
+
f"error: unknown platform(s): {', '.join(unknown)}",
|
|
50
|
+
err=True,
|
|
51
|
+
)
|
|
52
|
+
typer.echo(f"known: {', '.join(PLATFORMS)}", err=True)
|
|
53
|
+
raise typer.Exit(code=1)
|
|
54
|
+
|
|
55
|
+
scaffold.bootstrap(
|
|
56
|
+
path,
|
|
57
|
+
platforms=platform,
|
|
58
|
+
all_platforms=all_platforms,
|
|
59
|
+
force=force,
|
|
60
|
+
mode="init",
|
|
61
|
+
)
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Output and documentation discipline - concise table-first results; do not touch docs unless asked
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Output & Docs Discipline
|
|
6
|
+
|
|
7
|
+
- Present results concisely; summarize as a table when possible.
|
|
8
|
+
- Show only the summary. Do not dump raw execution output, full logs, or intermediate artifacts.
|
|
9
|
+
- No filler, no repeated explanations.
|
|
10
|
+
- Switch to detailed output only when the user explicitly asks (e.g. "자세히"): keep the table first, then add reasoning and key code excerpts.
|
|
11
|
+
- Do not create or modify docs (README, etc.) unless the user explicitly asks. When editing a doc, rewrite it in context so it stays in sync with the code.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Route backend-service/ and native host edits to yj-backend-service skill
|
|
3
|
+
paths:
|
|
4
|
+
- "backend-service/**"
|
|
5
|
+
- "browser-extension/native_*/**"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Skill routing
|
|
9
|
+
|
|
10
|
+
Read and follow `yj-backend-service` (with `yj-arch-core`). Do not apply other platform skills.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Route browser-extension/ (non-native) edits to yj-browser-extension skill
|
|
3
|
+
paths:
|
|
4
|
+
- "browser-extension/**"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill routing
|
|
8
|
+
|
|
9
|
+
Read and follow `yj-browser-extension` (with `yj-arch-core`) for extension UI/background/content.
|
|
10
|
+
If the path is `browser-extension/native_*/**`, use `yj-backend-service` instead.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Always load yj-arch-core skill for coding work
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Architecture skill
|
|
6
|
+
|
|
7
|
+
When creating, modifying, reviewing, or refactoring code, read and follow the project skill `yj-arch-core`, then exactly one matching `yj-*` platform skill for the folder being edited.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Output and documentation discipline - concise table-first results; do not touch docs unless asked
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Output & Docs Discipline
|
|
7
|
+
|
|
8
|
+
- Present results concisely; summarize as a table when possible.
|
|
9
|
+
- Show only the summary. Do not dump raw execution output, full logs, or intermediate artifacts.
|
|
10
|
+
- No filler, no repeated explanations.
|
|
11
|
+
- Switch to detailed output only when the user explicitly asks (e.g. "자세히"): keep the table first, then reasoning and the key code excerpts.
|
|
12
|
+
- Do not create or modify docs (README, etc.) unless the user explicitly asks. When editing a doc, rewrite it in context so it stays in sync with the code.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Route backend-service/ and native host edits to yj-backend-service skill
|
|
3
|
+
globs: backend-service/**,browser-extension/native_*/**
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill routing
|
|
8
|
+
|
|
9
|
+
Read and follow `yj-backend-service` (with `yj-arch-core`). Do not apply other platform skills.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Route browser-extension/ (non-native) edits to yj-browser-extension skill
|
|
3
|
+
globs: browser-extension/**
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill routing
|
|
8
|
+
|
|
9
|
+
Read and follow `yj-browser-extension` (with `yj-arch-core`) for extension UI/background/content.
|
|
10
|
+
If the path is `browser-extension/native_*/**`, use `yj-backend-service` instead.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Always load yj-arch-core skill for coding work
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Architecture skill
|
|
7
|
+
|
|
8
|
+
When creating, modifying, reviewing, or refactoring code, read and follow the project skill `yj-arch-core`, then exactly one matching `yj-*` platform skill for the folder being edited.
|