xgic-dev-cli 0.2.0__py3-none-any.whl

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.
@@ -0,0 +1,10 @@
1
+ """XGIC CLI Dev Container module (``xgic.cli.dev``)."""
2
+
3
+ from xgic.cli.dev.docker import DockerComposeController
4
+
5
+ __version__ = "0.2.0"
6
+
7
+ __all__ = [
8
+ "DockerComposeController",
9
+ "__version__",
10
+ ]
@@ -0,0 +1 @@
1
+ """CLI command handlers for ``xgic.cli.dev``."""
@@ -0,0 +1,49 @@
1
+ """Health check command (product-agnostic)."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+
7
+ from xgic.cli.app import CommandContext
8
+ from xgic.cli.dev.context import make_docker
9
+ from xgic.cli.utils.output import print_info, print_success, print_warning
10
+
11
+
12
+ def run_check(ctx: CommandContext) -> int:
13
+ """Lightweight compose + environment health check."""
14
+ docker = make_docker(ctx.env, ctx.args)
15
+ services_ok = docker.services_running()
16
+ use_json = bool(getattr(ctx.args, "json", False))
17
+
18
+ if use_json:
19
+ result = {
20
+ "services_running": services_ok,
21
+ "compose_file": docker.compose_file,
22
+ "project_name": docker.project_name,
23
+ "primary_service": docker.primary_service,
24
+ "environment": ctx.env.describe(),
25
+ "overall_ok": services_ok,
26
+ }
27
+ print(json.dumps(result, indent=2))
28
+ return 0 if services_ok else 1
29
+
30
+ print_info("Running environment health checks...")
31
+
32
+ if services_ok:
33
+ print_success("Docker Compose services: running")
34
+ else:
35
+ print_warning(
36
+ "Docker Compose services: not all services appear to be running"
37
+ )
38
+ print_info("Suggestion: Run `xgic up` to start services.")
39
+
40
+ print_info(f"Compose file: {docker.compose_file}")
41
+ print_info(f"Project: {docker.project_name}")
42
+ if docker.primary_service:
43
+ print_info(f"Primary service: {docker.primary_service}")
44
+ print_info("Environment context: " + ctx.env.describe())
45
+
46
+ if services_ok:
47
+ print_success("Basic environment check passed")
48
+ return 0
49
+ return 1
@@ -0,0 +1,53 @@
1
+ """Environment status command (product-agnostic; no product secrets)."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ from pathlib import Path
7
+
8
+ from xgic.cli.app import CommandContext
9
+ from xgic.cli.dev.context import make_docker
10
+ from xgic.cli.utils.output import print_info, print_success
11
+
12
+ ENV_FILE = Path(".devcontainer/.env")
13
+
14
+
15
+ def run_env(ctx: CommandContext) -> int:
16
+ """Inspect development environment status (no regenerate in this module)."""
17
+ docker = make_docker(ctx.env, ctx.args)
18
+ env_file_exists = ENV_FILE.exists()
19
+ services_ok = docker.services_running()
20
+ use_json = bool(getattr(ctx.args, "json", False))
21
+
22
+ if use_json:
23
+ print(
24
+ json.dumps(
25
+ {
26
+ "env_file_exists": env_file_exists,
27
+ "env_file": str(ENV_FILE),
28
+ "services_running": services_ok,
29
+ "compose_file": docker.compose_file,
30
+ "project_name": docker.project_name,
31
+ "primary_service": docker.primary_service,
32
+ "environment": ctx.env.describe(),
33
+ },
34
+ indent=2,
35
+ )
36
+ )
37
+ return 0
38
+
39
+ print_info("Development environment status:")
40
+ if env_file_exists:
41
+ print_success(f".env file exists at {ENV_FILE}")
42
+ else:
43
+ print_info(f".env file not found at {ENV_FILE}")
44
+
45
+ if services_ok:
46
+ print_success("Compose services: appear to be running")
47
+ else:
48
+ print_info("Compose services: not detected as running")
49
+
50
+ print_info(f"Compose file: {docker.compose_file}")
51
+ print_info(f"Project: {docker.project_name}")
52
+ print_info("Environment context: " + ctx.env.describe())
53
+ return 0
@@ -0,0 +1,97 @@
1
+ """Lifecycle commands: up, down, build, logs, shell, clean."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import contextlib
6
+ from pathlib import Path
7
+
8
+ from xgic.cli.app import CommandContext
9
+ from xgic.cli.dev.context import make_docker, resolve_profile
10
+ from xgic.cli.utils.output import print_info, print_success, print_warning
11
+
12
+ ENV_FILE = Path(".devcontainer/.env")
13
+
14
+
15
+ def run_up(ctx: CommandContext) -> int:
16
+ """Start compose services in detached mode."""
17
+ docker = make_docker(ctx.env, ctx.args)
18
+ profile = resolve_profile(ctx.args)
19
+ print_info("Starting services...")
20
+ docker.up(profile=profile)
21
+ print_success("Services are up (detached)")
22
+ return 0
23
+
24
+
25
+ def run_down(ctx: CommandContext) -> int:
26
+ """Stop services (volumes preserved)."""
27
+ docker = make_docker(ctx.env, ctx.args)
28
+ print_info("Stopping services...")
29
+ docker.down()
30
+ print_success("Services stopped (volumes preserved)")
31
+ return 0
32
+
33
+
34
+ def run_build(ctx: CommandContext) -> int:
35
+ """Build compose images."""
36
+ docker = make_docker(ctx.env, ctx.args)
37
+ no_cache = bool(getattr(ctx.args, "no_cache", False))
38
+ print_info("Building services" + (" (no cache)" if no_cache else "") + "...")
39
+ docker.build(no_cache=no_cache)
40
+ print_success("Build complete")
41
+ return 0
42
+
43
+
44
+ def run_logs(ctx: CommandContext) -> int:
45
+ """Follow logs for all services (blocks until interrupted)."""
46
+ docker = make_docker(ctx.env, ctx.args)
47
+ print_info("Following logs (press Ctrl+C to exit)...")
48
+ docker.logs(follow=True)
49
+ return 0
50
+
51
+
52
+ def run_shell(ctx: CommandContext) -> int:
53
+ """Open an interactive shell in the primary service."""
54
+ docker = make_docker(ctx.env, ctx.args)
55
+ service = docker.primary_service
56
+ if not service:
57
+ print_warning(
58
+ "No primary service set. Pass --service NAME or set "
59
+ "XGIC_PRIMARY_SERVICE."
60
+ )
61
+ return 1
62
+ print_info(f"Opening shell in service {service!r} (type 'exit' to leave)...")
63
+ try:
64
+ docker.exec(service, "bash")
65
+ except Exception:
66
+ print_info("Shell session ended or failed to attach.")
67
+ return 0
68
+
69
+
70
+ def run_clean(ctx: CommandContext) -> int:
71
+ """Full environment cleanup (volumes + .env). Extremely destructive."""
72
+ docker = make_docker(ctx.env, ctx.args)
73
+ yes = bool(getattr(ctx.args, "yes", False))
74
+
75
+ print_warning(
76
+ "This will delete Docker volumes AND the generated .env file "
77
+ f"(if present at {ENV_FILE})."
78
+ )
79
+ if not yes:
80
+ print_warning("Re-run with --yes only if you are absolutely sure.")
81
+ return 1
82
+
83
+ print_info("Performing full cleanup...")
84
+ try:
85
+ docker.down(remove_volumes=True)
86
+ except Exception:
87
+ with contextlib.suppress(Exception):
88
+ docker.down()
89
+
90
+ if ENV_FILE.exists():
91
+ ENV_FILE.unlink()
92
+ print_success(f"Removed {ENV_FILE}")
93
+
94
+ print_success(
95
+ "Full cleanup complete. You will need to re-initialize the environment."
96
+ )
97
+ return 0
@@ -0,0 +1,54 @@
1
+ """Build a DockerComposeController from CLI args / environment."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ import os
7
+
8
+ from xgic.cli.core.environment import EnvironmentContext
9
+ from xgic.cli.dev.docker import (
10
+ DEFAULT_COMPOSE_FILE,
11
+ DEFAULT_PROJECT_NAME,
12
+ DockerComposeController,
13
+ )
14
+
15
+ ENV_COMPOSE_FILE = "XGIC_COMPOSE_FILE"
16
+ ENV_COMPOSE_PROJECT = "XGIC_COMPOSE_PROJECT"
17
+ ENV_PRIMARY_SERVICE = "XGIC_PRIMARY_SERVICE"
18
+ ENV_COMPOSE_PROFILE = "XGIC_COMPOSE_PROFILE"
19
+
20
+
21
+ def resolve_compose_file(args: argparse.Namespace) -> str:
22
+ return (
23
+ getattr(args, "compose_file", None)
24
+ or os.environ.get(ENV_COMPOSE_FILE)
25
+ or DEFAULT_COMPOSE_FILE
26
+ )
27
+
28
+
29
+ def resolve_project_name(args: argparse.Namespace) -> str:
30
+ return (
31
+ getattr(args, "project", None)
32
+ or os.environ.get(ENV_COMPOSE_PROJECT)
33
+ or DEFAULT_PROJECT_NAME
34
+ )
35
+
36
+
37
+ def resolve_primary_service(args: argparse.Namespace) -> str | None:
38
+ return getattr(args, "service", None) or os.environ.get(ENV_PRIMARY_SERVICE)
39
+
40
+
41
+ def resolve_profile(args: argparse.Namespace) -> str | None:
42
+ return getattr(args, "profile", None) or os.environ.get(ENV_COMPOSE_PROFILE)
43
+
44
+
45
+ def make_docker(
46
+ env: EnvironmentContext, args: argparse.Namespace
47
+ ) -> DockerComposeController:
48
+ """Construct a controller from CommandContext-compatible args."""
49
+ return DockerComposeController(
50
+ env=env,
51
+ compose_file=resolve_compose_file(args),
52
+ project_name=resolve_project_name(args),
53
+ primary_service=resolve_primary_service(args),
54
+ )
xgic/cli/dev/docker.py ADDED
@@ -0,0 +1,150 @@
1
+ """Docker Compose orchestration for Dev Container environments.
2
+
3
+ Product-agnostic Compose controller. Callers inject compose file, project
4
+ name, primary service, and optional profile. Payload CMS–specific defaults
5
+ and config readers live in ``xgic.cli.payload`` (xgic/payload-cms-cli).
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import subprocess
11
+ from dataclasses import dataclass
12
+
13
+ from xgic.cli.core.environment import EnvironmentContext
14
+
15
+ DEFAULT_COMPOSE_FILE = ".devcontainer/docker-compose.yml"
16
+ DEFAULT_PROJECT_NAME = "xgic-dev"
17
+
18
+
19
+ @dataclass
20
+ class DockerComposeController:
21
+ """Controls Docker Compose services for a dev environment."""
22
+
23
+ env: EnvironmentContext
24
+ compose_file: str = DEFAULT_COMPOSE_FILE
25
+ project_name: str = DEFAULT_PROJECT_NAME
26
+ primary_service: str | None = None
27
+
28
+ def _run_compose(
29
+ self,
30
+ *args: str,
31
+ check: bool = True,
32
+ capture_output: bool = False,
33
+ ) -> subprocess.CompletedProcess[str]:
34
+ """Run a docker compose command with consistent flags."""
35
+ cmd = [
36
+ "docker",
37
+ "compose",
38
+ "-f",
39
+ self.compose_file,
40
+ "-p",
41
+ self.project_name,
42
+ *args,
43
+ ]
44
+ return subprocess.run(
45
+ cmd,
46
+ check=check,
47
+ capture_output=capture_output,
48
+ text=True,
49
+ )
50
+
51
+ def services_running(self, service: str | None = None) -> bool:
52
+ """Return True if a target service (or any) appears to be up."""
53
+ target = service or self.primary_service
54
+ try:
55
+ result = self._run_compose(
56
+ "ps",
57
+ "--services",
58
+ "--filter",
59
+ "status=running",
60
+ capture_output=True,
61
+ )
62
+ running = {s.strip() for s in result.stdout.splitlines() if s.strip()}
63
+ if not running:
64
+ return False
65
+ if target is None:
66
+ return True
67
+ return target in running
68
+ except (subprocess.CalledProcessError, FileNotFoundError):
69
+ return False
70
+
71
+ def up(
72
+ self,
73
+ *,
74
+ build: bool = False,
75
+ services: list[str] | None = None,
76
+ profile: str | None = None,
77
+ ) -> None:
78
+ """Start services in detached mode."""
79
+ args: list[str] = []
80
+ if profile:
81
+ args.extend(["--profile", profile])
82
+ args.extend(["up", "-d"])
83
+ if build:
84
+ args.append("--build")
85
+ if services:
86
+ args.extend(services)
87
+ self._run_compose(*args)
88
+
89
+ def down(self, *, remove_volumes: bool = False) -> None:
90
+ """Stop services. Optionally remove named volumes (destructive)."""
91
+ if remove_volumes:
92
+ self._run_compose("down", "-v")
93
+ else:
94
+ self._run_compose("down")
95
+
96
+ def rm_service(
97
+ self,
98
+ service: str,
99
+ *,
100
+ force: bool = True,
101
+ stop: bool = True,
102
+ remove_volumes: bool = False,
103
+ ) -> None:
104
+ """Best-effort compose rm for a single service."""
105
+ args = ["rm"]
106
+ if force:
107
+ args.append("-f")
108
+ if stop:
109
+ args.append("-s")
110
+ if remove_volumes:
111
+ args.append("-v")
112
+ args.append(service)
113
+ self._run_compose(*args, check=False)
114
+
115
+ def build(self, *, no_cache: bool = False) -> None:
116
+ """Build images."""
117
+ args = ["build"]
118
+ if no_cache:
119
+ args.append("--no-cache")
120
+ self._run_compose(*args)
121
+
122
+ def logs(self, follow: bool = True) -> None:
123
+ """Follow logs (this blocks)."""
124
+ args = ["logs"]
125
+ if follow:
126
+ args.append("-f")
127
+ self._run_compose(*args, check=False)
128
+
129
+ def exec(
130
+ self, service: str, *cmd: str, check: bool = True
131
+ ) -> subprocess.CompletedProcess[str]:
132
+ """Run a command inside a service container."""
133
+ return self._run_compose("exec", service, *cmd, check=check)
134
+
135
+ def remove_volume(self, volume_name: str) -> bool:
136
+ """Attempt to remove a Docker volume via top-level docker CLI."""
137
+ try:
138
+ result = subprocess.run(
139
+ ["docker", "volume", "rm", "-f", volume_name],
140
+ check=False,
141
+ capture_output=True,
142
+ text=True,
143
+ )
144
+ return result.returncode == 0
145
+ except Exception:
146
+ return False
147
+
148
+ def db_volume_name(self, service: str) -> str:
149
+ """Return the conventional named volume for a DB service."""
150
+ return f"{self.project_name}-{service}-data"
xgic/cli/dev/plugin.py ADDED
@@ -0,0 +1,124 @@
1
+ """Register ``xgic.cli.dev`` subcommands on the core ``xgic`` CLI."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+
7
+ from xgic.cli.dev.commands.check import run_check
8
+ from xgic.cli.dev.commands.env_cmd import run_env
9
+ from xgic.cli.dev.commands.lifecycle import (
10
+ run_build,
11
+ run_clean,
12
+ run_down,
13
+ run_logs,
14
+ run_shell,
15
+ run_up,
16
+ )
17
+
18
+
19
+ def _common_parent() -> argparse.ArgumentParser:
20
+ parent = argparse.ArgumentParser(add_help=False)
21
+ parent.add_argument(
22
+ "--compose-file",
23
+ metavar="PATH",
24
+ help="Compose file path (or XGIC_COMPOSE_FILE)",
25
+ )
26
+ parent.add_argument(
27
+ "--project",
28
+ metavar="NAME",
29
+ help="Compose project name (or XGIC_COMPOSE_PROJECT)",
30
+ )
31
+ parent.add_argument(
32
+ "--service",
33
+ metavar="NAME",
34
+ help="Primary compose service (or XGIC_PRIMARY_SERVICE)",
35
+ )
36
+ parent.add_argument(
37
+ "--profile",
38
+ metavar="NAME",
39
+ help="Compose profile for up (or XGIC_COMPOSE_PROFILE)",
40
+ )
41
+ return parent
42
+
43
+
44
+ def register(
45
+ subparsers: argparse._SubParsersAction[argparse.ArgumentParser],
46
+ ) -> None:
47
+ """Entry point: ``xgic.cli.commands`` → register Dev Container commands."""
48
+ parent = _common_parent()
49
+
50
+ up = subparsers.add_parser(
51
+ "up",
52
+ parents=[parent],
53
+ help="Start Docker Compose services (detached)",
54
+ )
55
+ up.set_defaults(func=run_up)
56
+
57
+ down = subparsers.add_parser(
58
+ "down",
59
+ parents=[parent],
60
+ help="Stop Docker Compose services (volumes preserved)",
61
+ )
62
+ down.set_defaults(func=run_down)
63
+
64
+ build = subparsers.add_parser(
65
+ "build",
66
+ parents=[parent],
67
+ help="Build or rebuild compose services",
68
+ )
69
+ build.add_argument(
70
+ "--no-cache",
71
+ action="store_true",
72
+ help="Build without cache",
73
+ )
74
+ build.set_defaults(func=run_build)
75
+
76
+ logs = subparsers.add_parser(
77
+ "logs",
78
+ parents=[parent],
79
+ help="Follow logs for compose services",
80
+ )
81
+ logs.set_defaults(func=run_logs)
82
+
83
+ shell = subparsers.add_parser(
84
+ "shell",
85
+ parents=[parent],
86
+ help="Open a shell in the primary service",
87
+ )
88
+ shell.set_defaults(func=run_shell)
89
+
90
+ clean = subparsers.add_parser(
91
+ "clean",
92
+ parents=[parent],
93
+ help="[DANGER] Full cleanup (volumes + .devcontainer/.env)",
94
+ )
95
+ clean.add_argument(
96
+ "--yes",
97
+ action="store_true",
98
+ help="Skip confirmation and proceed",
99
+ )
100
+ clean.set_defaults(func=run_clean)
101
+
102
+ check = subparsers.add_parser(
103
+ "check",
104
+ parents=[parent],
105
+ help="Diagnostic: compose services + environment context",
106
+ )
107
+ check.add_argument(
108
+ "--json",
109
+ action="store_true",
110
+ help="Output results as JSON",
111
+ )
112
+ check.set_defaults(func=run_check)
113
+
114
+ env_p = subparsers.add_parser(
115
+ "env",
116
+ parents=[parent],
117
+ help="Inspect development environment status",
118
+ )
119
+ env_p.add_argument(
120
+ "--json",
121
+ action="store_true",
122
+ help="Output results as JSON",
123
+ )
124
+ env_p.set_defaults(func=run_env)
@@ -0,0 +1,114 @@
1
+ Metadata-Version: 2.4
2
+ Name: xgic-dev-cli
3
+ Version: 0.2.0
4
+ Summary: XGIC CLI Dev Container module - Docker Compose orchestration and xgic lifecycle commands (xgic.cli.dev).
5
+ Project-URL: Homepage, https://github.com/xgic/dev-cli
6
+ Project-URL: Repository, https://github.com/xgic/dev-cli
7
+ Project-URL: Issues, https://github.com/xgic/dev-cli/issues
8
+ Project-URL: Documentation, https://github.com/xgic/dev-cli#readme
9
+ Project-URL: Changelog, https://github.com/xgic/dev-cli/releases
10
+ Author: XGIC
11
+ License: Apache-2.0
12
+ License-File: LICENSE
13
+ License-File: NOTICE
14
+ Keywords: cli,dev-containers,docker-compose,orchestration,xgic
15
+ Classifier: Development Status :: 3 - Alpha
16
+ Classifier: Environment :: Console
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: License :: OSI Approved :: Apache Software License
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.14
25
+ Requires-Dist: rich>=13.7
26
+ Requires-Dist: xgic-cli>=0.2.0
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
29
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
30
+ Requires-Dist: ruff>=0.4.0; extra == 'dev'
31
+ Provides-Extra: test
32
+ Requires-Dist: pytest>=8.0.0; extra == 'test'
33
+ Description-Content-Type: text/markdown
34
+
35
+ # XGIC Dev Container CLI
36
+
37
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
38
+
39
+ **XGIC Dev Container CLI** (`xgic.cli.dev`) provides Docker Compose orchestration and Dev Container–oriented **`xgic` subcommands** for the modular [XGIC CLI](https://github.com/xgic/cli).
40
+
41
+ Architecture: [ADR-0005](https://github.com/xgic/ai/blob/main/docs/adr/0005-modular-xgic-cli-and-retirement-of-xde.md).
42
+
43
+ **Publishing to PyPI:** [python-package-release.md](https://github.com/xgic/ai/blob/main/docs/python-package-release.md)
44
+ (publish **after** `xgic-cli` for stack releases). Tags: `vX.Y.ZrcN` → TestPyPI; `vX.Y.Z` → PyPI.
45
+
46
+ | Package | Role |
47
+ |---------|------|
48
+ | [xgic/cli](https://github.com/xgic/cli) | Thin core framework (`xgic`) |
49
+ | **This repo** | Dev Container / Compose + lifecycle commands (`xgic.cli.dev`) |
50
+ | [xgic/payload-cms-cli](https://github.com/xgic/payload-cms-cli) | Payload CMS product module |
51
+
52
+ ## Status
53
+
54
+ **0.2.0 — B3 lifecycle commands.** Product-agnostic Compose library + registered `xgic` subcommands. Payload CMS–specific env regenerate / setup remains in **payload-cms-cli**.
55
+
56
+ ## Requirements
57
+
58
+ - Python **3.14+**
59
+ - `xgic-cli` ≥ 0.2.0
60
+ - Docker / Docker Compose on the host when running lifecycle commands
61
+
62
+ ## Install (development)
63
+
64
+ ```bash
65
+ python -m pip install -e ../cli
66
+ python -m pip install -e ".[dev]"
67
+ xgic --help
68
+ xgic up --help
69
+ ```
70
+
71
+ ## Console commands (via entry point)
72
+
73
+ Installed with this package, registered on the core `xgic` entrypoint:
74
+
75
+ | Command | Purpose |
76
+ |---------|---------|
77
+ | `xgic up` | Start compose services (detached) |
78
+ | `xgic down` | Stop services (volumes preserved) |
79
+ | `xgic build [--no-cache]` | Build images |
80
+ | `xgic logs` | Follow logs |
81
+ | `xgic shell` | Shell in primary service (`--service` required if not set) |
82
+ | `xgic clean --yes` | Destructive: volumes + `.devcontainer/.env` |
83
+ | `xgic check [--json]` | Services + environment diagnostic |
84
+ | `xgic env [--json]` | Environment status (no secret regeneration) |
85
+
86
+ Common flags (or env vars):
87
+
88
+ | Flag | Env var | Default |
89
+ |------|---------|---------|
90
+ | `--compose-file` | `XGIC_COMPOSE_FILE` | `.devcontainer/docker-compose.yml` |
91
+ | `--project` | `XGIC_COMPOSE_PROJECT` | `xgic-dev` |
92
+ | `--service` | `XGIC_PRIMARY_SERVICE` | (none) |
93
+ | `--profile` | `XGIC_COMPOSE_PROFILE` | (none; used by `up`) |
94
+
95
+ ## Library API
96
+
97
+ ```python
98
+ from xgic.cli.core import EnvironmentContext
99
+ from xgic.cli.dev import DockerComposeController
100
+
101
+ env = EnvironmentContext.detect()
102
+ docker = DockerComposeController(
103
+ env=env,
104
+ compose_file=".devcontainer/docker-compose.yml",
105
+ project_name="my-project",
106
+ primary_service="app",
107
+ )
108
+ docker.up(profile="postgres")
109
+ ```
110
+
111
+ ## License
112
+
113
+ Apache License 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
114
+ Copyright form: `Copyright 2026 XGIC`.
@@ -0,0 +1,14 @@
1
+ xgic/cli/dev/__init__.py,sha256=UG_9wgAH70pj0O4fblqblaaqvqryNyBWofTgJyx2MF0,201
2
+ xgic/cli/dev/context.py,sha256=eB0i_JxK36KK7QXNWUzaW37x4ovjnDqGSu4iQxfWlqk,1559
3
+ xgic/cli/dev/docker.py,sha256=Y7ItPX0y-NK5WeVfaTjM7Cr8lWeM9npKm_MyaEw0HPI,4601
4
+ xgic/cli/dev/plugin.py,sha256=NMHjZMQE1AgcpaKaeE25IKnZep9mPqt-nPqNYL89bvM,3150
5
+ xgic/cli/dev/commands/__init__.py,sha256=5lOhgVwx4xmVH3Dh3LVUyJRo32_5PvsGiYtpF5EvehA,49
6
+ xgic/cli/dev/commands/check.py,sha256=90Y7tzLigattFYbPthUBIcqGLUxPPrQ_FjHIDIGgJrU,1608
7
+ xgic/cli/dev/commands/env_cmd.py,sha256=tprO1TQZ6H8_lpf1JGgz0kafWpB4xYmWI7aHSkzM4n4,1725
8
+ xgic/cli/dev/commands/lifecycle.py,sha256=5V-9xBDjYzErUGSJ8yV6UtToJ3ZkTAOA5KH3U6Ia4Es,2980
9
+ xgic_dev_cli-0.2.0.dist-info/METADATA,sha256=SoqzdnnfUG09I4v1EKfTJH3owQq_zzb9pxiSAKXLUAw,4237
10
+ xgic_dev_cli-0.2.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
11
+ xgic_dev_cli-0.2.0.dist-info/entry_points.txt,sha256=3EVsANu-jdvfn_Zq4CCNPcEBjF7cCzobGGofHDXobMc,55
12
+ xgic_dev_cli-0.2.0.dist-info/licenses/LICENSE,sha256=zR7vJ5cGf_9LgWHYDAugptsXPsV0_78I9kvVnf7VRk0,11335
13
+ xgic_dev_cli-0.2.0.dist-info/licenses/NOTICE,sha256=TPf1ugOAPqcue1tS2cRBATyLbw3XoQ2vm1MigrheSiU,214
14
+ xgic_dev_cli-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.31.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [xgic.cli.commands]
2
+ dev = xgic.cli.dev.plugin:register
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 XGIC
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
@@ -0,0 +1,8 @@
1
+ XGIC Dev Container CLI
2
+ Copyright 2026 XGIC
3
+
4
+ This product includes software and documentation developed at XGIC
5
+ (https://xgic.net).
6
+
7
+ Licensed under the Apache License, Version 2.0.
8
+ See the LICENSE file for details.