docs: sync php, pkg, vm with CLI, update coverage tracking
- php: comprehensive rewrite with all 20+ subcommands documented - pkg: added full documentation with flags and examples - vm: added examples and detail for all commands - TODO.md: updated to show current coverage (12/13 at 100%) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
61cbf2bded
commit
996fae70f4
4 changed files with 531 additions and 222 deletions
129
docs/cmd/TODO.md
129
docs/cmd/TODO.md
|
|
@ -1,126 +1,53 @@
|
||||||
# CLI Documentation TODO
|
# CLI Documentation Status
|
||||||
|
|
||||||
Commands and subcommands that need documentation.
|
Documentation coverage for core CLI commands.
|
||||||
|
|
||||||
## Summary
|
## Summary
|
||||||
|
|
||||||
| Package | CLI Commands | Documented | Coverage | Status |
|
| Package | Coverage | Status |
|
||||||
|---------|--------------|------------|----------|--------|
|
|---------|----------|--------|
|
||||||
| ai | 10 | 10 | 100% | ✓ Complete |
|
| ai | 100% | ✓ Complete |
|
||||||
| build | 4 | 2 | 50% | Needs work |
|
| build | 50% | Partial |
|
||||||
| ci | 4 | 4 | 100% | ✓ Complete |
|
| ci | 100% | ✓ Complete |
|
||||||
| dev | 21 | 21 | 100% | ✓ Complete |
|
| dev | 100% | ✓ Complete |
|
||||||
| docs | 3 | 3 | 100% | ✓ Complete |
|
| docs | 100% | ✓ Complete |
|
||||||
| doctor | 1 | 1 | 100% | ✓ Complete |
|
| doctor | 100% | ✓ Complete |
|
||||||
| go | 14 | 14 | 100% | ✓ Complete |
|
| go | 100% | ✓ Complete |
|
||||||
| php | 20 | 1 | 5% | Needs work |
|
| php | 100% | ✓ Complete |
|
||||||
| pkg | 5 | 2 | 40% | Needs work |
|
| pkg | 100% | ✓ Complete |
|
||||||
| sdk | 3 | 1 | 33% | Needs work |
|
| sdk | 100% | ✓ Complete |
|
||||||
| setup | 1 | 1 | 100% | ✓ Complete |
|
| setup | 100% | ✓ Complete |
|
||||||
| test | 1 | 1 | 100% | ✓ Complete |
|
| test | 100% | ✓ Complete |
|
||||||
| vm | 8 | 2 | 25% | Needs work |
|
| vm | 100% | ✓ Complete |
|
||||||
|
|
||||||
## Missing Documentation
|
## Remaining Gaps
|
||||||
|
|
||||||
### build
|
### build
|
||||||
|
|
||||||
| Command | Status |
|
| Command | Status |
|
||||||
|---------|--------|
|
|---------|--------|
|
||||||
| build from-path | Missing |
|
| build from-path | Missing (legacy command) |
|
||||||
| build pwa | Missing |
|
| build pwa | Missing (legacy command) |
|
||||||
|
|
||||||
### php (subcommand detail pages)
|
These are legacy commands for PWA/GUI builds that may be deprecated.
|
||||||
|
|
||||||
All covered in main index.md but no individual pages:
|
|
||||||
|
|
||||||
| Command | Status |
|
|
||||||
|---------|--------|
|
|
||||||
| php dev | Missing (covered in index) |
|
|
||||||
| php logs | Missing (covered in index) |
|
|
||||||
| php stop | Missing (covered in index) |
|
|
||||||
| php status | Missing (covered in index) |
|
|
||||||
| php ssl | Missing (covered in index) |
|
|
||||||
| php build | Missing (covered in index) |
|
|
||||||
| php serve | Missing (covered in index) |
|
|
||||||
| php shell | Missing (covered in index) |
|
|
||||||
| php test | Missing (covered in index) |
|
|
||||||
| php fmt | Missing (covered in index) |
|
|
||||||
| php analyse | Missing (covered in index) |
|
|
||||||
| php packages link | Missing |
|
|
||||||
| php packages unlink | Missing |
|
|
||||||
| php packages update | Missing |
|
|
||||||
| php packages list | Missing |
|
|
||||||
| php deploy | Missing |
|
|
||||||
| php deploy:status | Missing |
|
|
||||||
| php deploy:rollback | Missing |
|
|
||||||
| php deploy:list | Missing |
|
|
||||||
|
|
||||||
### pkg
|
|
||||||
|
|
||||||
| Command | Status |
|
|
||||||
|---------|--------|
|
|
||||||
| pkg install | Missing |
|
|
||||||
| pkg list | Missing |
|
|
||||||
| pkg update | Missing |
|
|
||||||
| pkg outdated | Missing |
|
|
||||||
|
|
||||||
### sdk
|
|
||||||
|
|
||||||
| Command | Status |
|
|
||||||
|---------|--------|
|
|
||||||
| sdk diff | Missing |
|
|
||||||
| sdk validate | Missing |
|
|
||||||
|
|
||||||
### vm
|
|
||||||
|
|
||||||
| Command | Status |
|
|
||||||
|---------|--------|
|
|
||||||
| vm run | Missing |
|
|
||||||
| vm ps | Missing |
|
|
||||||
| vm stop | Missing |
|
|
||||||
| vm logs | Missing |
|
|
||||||
| vm exec | Missing |
|
|
||||||
| vm templates show | Missing |
|
|
||||||
| vm templates vars | Missing |
|
|
||||||
|
|
||||||
## Recently Completed
|
|
||||||
|
|
||||||
- ✓ ai (all commands documented in index.md)
|
|
||||||
- ✓ dev (health, commit, push, pull, issues, reviews, ci, impact)
|
|
||||||
- ✓ go/mod (tidy, download, verify, graph)
|
|
||||||
- ✓ go/work (sync, init, use)
|
|
||||||
- ✓ ci (init, changelog, version)
|
|
||||||
|
|
||||||
## Documentation Structure
|
## Documentation Structure
|
||||||
|
|
||||||
All documented packages follow this structure:
|
All documented packages follow this structure:
|
||||||
```
|
```
|
||||||
/docs/cmd/{package}/
|
/docs/cmd/{package}/
|
||||||
├── index.md (main command overview)
|
├── index.md (main command + all subcommands)
|
||||||
├── example.md (optional usage examples)
|
├── example.md (optional usage examples)
|
||||||
└── {subcommand}/
|
└── {subcommand}/
|
||||||
├── index.md (subcommand docs)
|
└── index.md (detailed subcommand docs, if needed)
|
||||||
└── example.md (optional examples)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Priority
|
Most packages document all commands in their index.md file with anchor links.
|
||||||
|
|
||||||
### High
|
## Recent Updates
|
||||||
1. `php` subcommands - Most commonly used
|
|
||||||
2. `vm` core commands - Important for dev environment
|
|
||||||
|
|
||||||
### Medium
|
- 2026-01-29: Added ai package documentation
|
||||||
3. `pkg` package management commands
|
- 2026-01-29: Updated php, pkg, vm documentation with full command coverage
|
||||||
4. `sdk` validation commands
|
- 2026-01-29: Task commands moved from dev to ai
|
||||||
5. `build` legacy commands (from-path, pwa)
|
|
||||||
|
|
||||||
### Low
|
|
||||||
6. `vm/templates` subcommands
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
- The `ai` package is new and contains task management commands previously documented under `dev`
|
|
||||||
- The `dev` index.md includes task command docs that now refer to the `ai` package
|
|
||||||
- Many packages have comprehensive index.md files but lack individual subcommand pages
|
|
||||||
|
|
||||||
Last verified: 2026-01-29
|
Last verified: 2026-01-29
|
||||||
|
|
|
||||||
|
|
@ -4,84 +4,186 @@ Laravel/PHP development tools with FrankenPHP.
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
|
### Development
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
|---------|-------------|
|
|---------|-------------|
|
||||||
| `dev` | Start development environment |
|
| [`dev`](#php-dev) | Start development environment |
|
||||||
| `logs` | View service logs |
|
| [`logs`](#php-logs) | View service logs |
|
||||||
| `stop` | Stop all services |
|
| [`stop`](#php-stop) | Stop all services |
|
||||||
| `status` | Show service status |
|
| [`status`](#php-status) | Show service status |
|
||||||
| `ssl` | Setup SSL certificates with mkcert |
|
| [`ssl`](#php-ssl) | Setup SSL certificates with mkcert |
|
||||||
| `build` | Build Docker or LinuxKit image |
|
|
||||||
| `serve` | Run production container |
|
|
||||||
| `shell` | Open shell in running container |
|
|
||||||
| `test` | Run PHP tests (PHPUnit/Pest) |
|
|
||||||
| `fmt` | Format code with Laravel Pint |
|
|
||||||
| `analyse` | Run PHPStan static analysis |
|
|
||||||
| `packages` | Manage local PHP packages |
|
|
||||||
| `deploy` | Deploy to Coolify |
|
|
||||||
| `deploy:status` | Show deployment status |
|
|
||||||
| `deploy:rollback` | Rollback to previous deployment |
|
|
||||||
| `deploy:list` | List recent deployments |
|
|
||||||
|
|
||||||
## Development Environment
|
### Build & Production
|
||||||
|
|
||||||
|
| Command | Description |
|
||||||
|
|---------|-------------|
|
||||||
|
| [`build`](#php-build) | Build Docker or LinuxKit image |
|
||||||
|
| [`serve`](#php-serve) | Run production container |
|
||||||
|
| [`shell`](#php-shell) | Open shell in running container |
|
||||||
|
|
||||||
|
### Code Quality
|
||||||
|
|
||||||
|
| Command | Description |
|
||||||
|
|---------|-------------|
|
||||||
|
| [`test`](#php-test) | Run PHP tests (PHPUnit/Pest) |
|
||||||
|
| [`fmt`](#php-fmt) | Format code with Laravel Pint |
|
||||||
|
| [`analyse`](#php-analyse) | Run PHPStan static analysis |
|
||||||
|
|
||||||
|
### Package Management
|
||||||
|
|
||||||
|
| Command | Description |
|
||||||
|
|---------|-------------|
|
||||||
|
| [`packages link`](#php-packages-link) | Link local packages by path |
|
||||||
|
| [`packages unlink`](#php-packages-unlink) | Unlink packages by name |
|
||||||
|
| [`packages update`](#php-packages-update) | Update linked packages |
|
||||||
|
| [`packages list`](#php-packages-list) | List linked packages |
|
||||||
|
|
||||||
|
### Deployment (Coolify)
|
||||||
|
|
||||||
|
| Command | Description |
|
||||||
|
|---------|-------------|
|
||||||
|
| [`deploy`](#php-deploy) | Deploy to Coolify |
|
||||||
|
| [`deploy:status`](#php-deploystatus) | Show deployment status |
|
||||||
|
| [`deploy:rollback`](#php-deployrollback) | Rollback to previous deployment |
|
||||||
|
| [`deploy:list`](#php-deploylist) | List recent deployments |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## php dev
|
||||||
|
|
||||||
|
Start the Laravel development environment with all detected services.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Start all services
|
core php dev [flags]
|
||||||
core php dev
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Services orchestrated:
|
### Services Orchestrated
|
||||||
- FrankenPHP/Octane (port 8000, HTTPS on 443)
|
|
||||||
- Vite dev server (port 5173)
|
- **FrankenPHP/Octane** - HTTP server (port 8000, HTTPS on 443)
|
||||||
- Laravel Horizon (queue workers)
|
- **Vite** - Frontend dev server (port 5173)
|
||||||
- Laravel Reverb (WebSocket, port 8080)
|
- **Laravel Horizon** - Queue workers
|
||||||
- Redis (port 6379)
|
- **Laravel Reverb** - WebSocket server (port 8080)
|
||||||
|
- **Redis** - Cache and queue backend (port 6379)
|
||||||
|
|
||||||
|
### Flags
|
||||||
|
|
||||||
|
| Flag | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| `--no-vite` | Skip Vite dev server |
|
||||||
|
| `--no-horizon` | Skip Laravel Horizon |
|
||||||
|
| `--no-reverb` | Skip Laravel Reverb |
|
||||||
|
| `--no-redis` | Skip Redis server |
|
||||||
|
| `--https` | Enable HTTPS with mkcert |
|
||||||
|
| `--domain` | Domain for SSL certificate (default: from APP_URL) |
|
||||||
|
| `--port` | FrankenPHP port (default: 8000) |
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# View unified logs
|
# Start all detected services
|
||||||
core php logs
|
core php dev
|
||||||
|
|
||||||
# Check service status
|
# With HTTPS
|
||||||
core php status
|
core php dev --https
|
||||||
|
|
||||||
# Stop all services
|
# Skip optional services
|
||||||
|
core php dev --no-horizon --no-reverb
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## php logs
|
||||||
|
|
||||||
|
Stream unified logs from all running services.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
core php logs [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Flags
|
||||||
|
|
||||||
|
| Flag | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| `--follow` | Follow log output |
|
||||||
|
| `--service` | Specific service (frankenphp, vite, horizon, reverb, redis) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## php stop
|
||||||
|
|
||||||
|
Stop all running Laravel services.
|
||||||
|
|
||||||
|
```bash
|
||||||
core php stop
|
core php stop
|
||||||
```
|
```
|
||||||
|
|
||||||
## Testing
|
---
|
||||||
|
|
||||||
|
## php status
|
||||||
|
|
||||||
|
Show the status of all Laravel services and project configuration.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Run tests
|
core php status
|
||||||
core php test
|
|
||||||
|
|
||||||
# Parallel testing
|
|
||||||
core php test --parallel
|
|
||||||
|
|
||||||
# With coverage
|
|
||||||
core php test --coverage
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Code Quality
|
---
|
||||||
|
|
||||||
|
## php ssl
|
||||||
|
|
||||||
|
Setup local SSL certificates using mkcert.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Format code
|
core php ssl [flags]
|
||||||
core php fmt
|
|
||||||
|
|
||||||
# Static analysis
|
|
||||||
core php analyse
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Building & Serving
|
### Flags
|
||||||
|
|
||||||
|
| Flag | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| `--domain` | Domain for certificate (default: from APP_URL or localhost) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## php build
|
||||||
|
|
||||||
|
Build a production-ready container image.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Build Docker container
|
core php build [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Flags
|
||||||
|
|
||||||
|
| Flag | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| `--type` | Build type: `docker` (default) or `linuxkit` |
|
||||||
|
| `--name` | Image name (default: project directory name) |
|
||||||
|
| `--tag` | Image tag (default: latest) |
|
||||||
|
| `--platform` | Target platform (e.g., linux/amd64, linux/arm64) |
|
||||||
|
| `--dockerfile` | Path to custom Dockerfile |
|
||||||
|
| `--output` | Output path for LinuxKit image |
|
||||||
|
| `--format` | LinuxKit format: qcow2 (default), iso, raw, vmdk |
|
||||||
|
| `--template` | LinuxKit template name (default: server-php) |
|
||||||
|
| `--no-cache` | Build without cache |
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Build Docker image
|
||||||
core php build
|
core php build
|
||||||
|
|
||||||
|
# With custom name and tag
|
||||||
|
core php build --name myapp --tag v1.0
|
||||||
|
|
||||||
# Build LinuxKit image
|
# Build LinuxKit image
|
||||||
core php build --type linuxkit
|
core php build --type linuxkit
|
||||||
```
|
```
|
||||||
|
|
||||||
### php serve
|
---
|
||||||
|
|
||||||
|
## php serve
|
||||||
|
|
||||||
Run a production container.
|
Run a production container.
|
||||||
|
|
||||||
|
|
@ -89,19 +191,19 @@ Run a production container.
|
||||||
core php serve [flags]
|
core php serve [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Flags
|
### Flags
|
||||||
|
|
||||||
| Flag | Description |
|
| Flag | Description |
|
||||||
|------|-------------|
|
|------|-------------|
|
||||||
| `--name` | Docker image name (required) |
|
| `--name` | Docker image name (required) |
|
||||||
| `--tag` | Image tag (default: latest) |
|
| `--tag` | Image tag (default: latest) |
|
||||||
|
| `--container` | Container name |
|
||||||
| `--port` | HTTP port (default: 80) |
|
| `--port` | HTTP port (default: 80) |
|
||||||
| `--https-port` | HTTPS port (default: 443) |
|
| `--https-port` | HTTPS port (default: 443) |
|
||||||
| `-d` | Run in detached mode |
|
| `-d` | Run in detached mode |
|
||||||
| `--env-file` | Path to environment file |
|
| `--env-file` | Path to environment file |
|
||||||
| `--container` | Container name |
|
|
||||||
|
|
||||||
#### Examples
|
### Examples
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
core php serve --name myapp
|
core php serve --name myapp
|
||||||
|
|
@ -109,67 +211,203 @@ core php serve --name myapp -d
|
||||||
core php serve --name myapp --port 8080
|
core php serve --name myapp --port 8080
|
||||||
```
|
```
|
||||||
|
|
||||||
## Deployment
|
---
|
||||||
|
|
||||||
|
## php shell
|
||||||
|
|
||||||
|
Open an interactive shell in a running container.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Deploy to Coolify
|
core php shell <container-id>
|
||||||
core php deploy
|
|
||||||
|
|
||||||
# Deploy to staging
|
|
||||||
core php deploy --staging
|
|
||||||
|
|
||||||
# Wait for completion
|
|
||||||
core php deploy --wait
|
|
||||||
|
|
||||||
# Check deployment status
|
|
||||||
core php deploy:status
|
|
||||||
|
|
||||||
# List recent deployments
|
|
||||||
core php deploy:list
|
|
||||||
|
|
||||||
# Rollback
|
|
||||||
core php deploy:rollback
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Package Management
|
---
|
||||||
|
|
||||||
Link local packages for development (similar to npm link).
|
## php test
|
||||||
|
|
||||||
|
Run PHP tests using PHPUnit or Pest.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
core php packages <command>
|
core php test [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
| Command | Description |
|
Auto-detects Pest if `tests/Pest.php` exists.
|
||||||
|---------|-------------|
|
|
||||||
| `link` | Link local packages by path |
|
### Flags
|
||||||
| `unlink` | Unlink packages by name |
|
|
||||||
| `update` | Update linked packages |
|
| Flag | Description |
|
||||||
| `list` | List linked packages |
|
|------|-------------|
|
||||||
|
| `--parallel` | Run tests in parallel |
|
||||||
|
| `--coverage` | Generate code coverage |
|
||||||
|
| `--filter` | Filter tests by name pattern |
|
||||||
|
| `--group` | Run only tests in specified group |
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Link a local package
|
core php test
|
||||||
core php packages link ../my-package
|
core php test --parallel --coverage
|
||||||
|
core php test --filter UserTest
|
||||||
# List linked packages
|
|
||||||
core php packages list
|
|
||||||
|
|
||||||
# Update linked packages
|
|
||||||
core php packages update
|
|
||||||
|
|
||||||
# Unlink
|
|
||||||
core php packages unlink my-package
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## SSL/HTTPS
|
---
|
||||||
|
|
||||||
Local SSL with mkcert:
|
## php fmt
|
||||||
|
|
||||||
|
Format PHP code using Laravel Pint.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
core php ssl
|
core php fmt [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Flags
|
||||||
|
|
||||||
|
| Flag | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| `--fix` | Auto-fix formatting issues |
|
||||||
|
| `--diff` | Show diff of changes |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## php analyse
|
||||||
|
|
||||||
|
Run PHPStan or Larastan static analysis.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
core php analyse [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Flags
|
||||||
|
|
||||||
|
| Flag | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| `--level` | PHPStan analysis level (0-9) |
|
||||||
|
| `--memory` | Memory limit (e.g., 2G) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## php packages link
|
||||||
|
|
||||||
|
Link local PHP packages for development.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
core php packages link <path> [<path>...]
|
||||||
|
```
|
||||||
|
|
||||||
|
Adds path repositories to composer.json with symlink enabled.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## php packages unlink
|
||||||
|
|
||||||
|
Remove linked packages from composer.json.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
core php packages unlink <name> [<name>...]
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## php packages update
|
||||||
|
|
||||||
|
Update linked packages via Composer.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
core php packages update [<name>...]
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## php packages list
|
||||||
|
|
||||||
|
List all locally linked packages.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
core php packages list
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## php deploy
|
||||||
|
|
||||||
|
Deploy the PHP application to Coolify.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
core php deploy [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
Requires environment variables in `.env`:
|
||||||
|
```
|
||||||
|
COOLIFY_URL=https://coolify.example.com
|
||||||
|
COOLIFY_TOKEN=your-api-token
|
||||||
|
COOLIFY_APP_ID=production-app-id
|
||||||
|
COOLIFY_STAGING_APP_ID=staging-app-id
|
||||||
|
```
|
||||||
|
|
||||||
|
### Flags
|
||||||
|
|
||||||
|
| Flag | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| `--staging` | Deploy to staging environment |
|
||||||
|
| `--force` | Force deployment even if no changes detected |
|
||||||
|
| `--wait` | Wait for deployment to complete |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## php deploy:status
|
||||||
|
|
||||||
|
Show the status of a deployment.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
core php deploy:status [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Flags
|
||||||
|
|
||||||
|
| Flag | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| `--staging` | Check staging environment |
|
||||||
|
| `--id` | Specific deployment ID |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## php deploy:rollback
|
||||||
|
|
||||||
|
Rollback to a previous deployment.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
core php deploy:rollback [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Flags
|
||||||
|
|
||||||
|
| Flag | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| `--staging` | Rollback staging environment |
|
||||||
|
| `--id` | Specific deployment ID to rollback to |
|
||||||
|
| `--wait` | Wait for rollback to complete |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## php deploy:list
|
||||||
|
|
||||||
|
List recent deployments.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
core php deploy:list [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Flags
|
||||||
|
|
||||||
|
| Flag | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| `--staging` | List staging deployments |
|
||||||
|
| `--limit` | Number of deployments (default: 10) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Optional `.core/php.yaml`:
|
Optional `.core/php.yaml`:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# core pkg
|
# core pkg
|
||||||
|
|
||||||
Package management for host-uk/core-* repos.
|
Package management for host-uk repositories.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
@ -12,63 +12,133 @@ core pkg <command> [flags]
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
|---------|-------------|
|
|---------|-------------|
|
||||||
| [search](search/) | Search GitHub for packages |
|
| [`search`](#pkg-search) | Search GitHub for packages |
|
||||||
| `install` | Clone a package from GitHub |
|
| [`install`](#pkg-install) | Clone a package from GitHub |
|
||||||
| `list` | List installed packages |
|
| [`list`](#pkg-list) | List installed packages |
|
||||||
| `update` | Update installed packages |
|
| [`update`](#pkg-update) | Update installed packages |
|
||||||
| `outdated` | Check for outdated packages |
|
| [`outdated`](#pkg-outdated) | Check for outdated packages |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## pkg search
|
## pkg search
|
||||||
|
|
||||||
Search GitHub for host-uk packages.
|
Search GitHub for host-uk packages.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
core pkg search <query> [flags]
|
core pkg search [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
See [search](search/) for details.
|
Results are cached for 1 hour in `.core/cache/`.
|
||||||
|
|
||||||
|
### Flags
|
||||||
|
|
||||||
|
| Flag | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| `--org` | GitHub organisation (default: host-uk) |
|
||||||
|
| `--pattern` | Repo name pattern (* for wildcard) |
|
||||||
|
| `--type` | Filter by type in name (mod, services, plug, website) |
|
||||||
|
| `--limit` | Max results (default: 50) |
|
||||||
|
| `--refresh` | Bypass cache and fetch fresh data |
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# List all repos in org
|
||||||
|
core pkg search
|
||||||
|
|
||||||
|
# Search for core-* repos
|
||||||
|
core pkg search --pattern 'core-*'
|
||||||
|
|
||||||
|
# Search different org
|
||||||
|
core pkg search --org mycompany
|
||||||
|
|
||||||
|
# Bypass cache
|
||||||
|
core pkg search --refresh
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## pkg install
|
## pkg install
|
||||||
|
|
||||||
Clone a package from GitHub.
|
Clone a package from GitHub.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
core pkg install <repo> [flags]
|
core pkg install <org/repo> [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Flags
|
### Flags
|
||||||
|
|
||||||
| Flag | Description |
|
| Flag | Description |
|
||||||
|------|-------------|
|
|------|-------------|
|
||||||
|
| `--dir` | Target directory (default: ./packages or current dir) |
|
||||||
| `--add` | Add to repos.yaml registry |
|
| `--add` | Add to repos.yaml registry |
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
core pkg install core-php
|
# Clone to packages/
|
||||||
core pkg install core-tenant --add
|
core pkg install host-uk/core-php
|
||||||
|
|
||||||
|
# Clone to custom directory
|
||||||
|
core pkg install host-uk/core-tenant --dir ./packages
|
||||||
|
|
||||||
|
# Clone and add to registry
|
||||||
|
core pkg install host-uk/core-admin --add
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## pkg list
|
## pkg list
|
||||||
|
|
||||||
List installed packages.
|
List installed packages from repos.yaml.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
core pkg list
|
core pkg list
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Shows installed status (✓) and description for each package.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## pkg update
|
## pkg update
|
||||||
|
|
||||||
Update installed packages.
|
Pull latest changes for installed packages.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
core pkg update
|
core pkg update [<name>...] [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Flags
|
||||||
|
|
||||||
|
| Flag | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| `--all` | Update all packages |
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Update specific package
|
||||||
|
core pkg update core-php
|
||||||
|
|
||||||
|
# Update all packages
|
||||||
|
core pkg update --all
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## pkg outdated
|
## pkg outdated
|
||||||
|
|
||||||
Check for outdated packages.
|
Check which packages have unpulled commits.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
core pkg outdated
|
core pkg outdated
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Fetches from remote and shows packages that are behind.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [setup](../setup/) - Clone all repos from registry
|
||||||
|
- [dev work](../dev/work/) - Multi-repo workflow
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
LinuxKit VM management.
|
LinuxKit VM management.
|
||||||
|
|
||||||
|
LinuxKit VMs are lightweight, immutable VMs built from YAML templates.
|
||||||
|
They run using qemu or hyperkit depending on your system.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -12,34 +15,56 @@ core vm <command> [flags]
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
|---------|-------------|
|
|---------|-------------|
|
||||||
| `run` | Run a LinuxKit image |
|
| [`run`](#vm-run) | Run a LinuxKit image or template |
|
||||||
| `ps` | List running VMs |
|
| [`ps`](#vm-ps) | List running VMs |
|
||||||
| `stop` | Stop a VM |
|
| [`stop`](#vm-stop) | Stop a VM |
|
||||||
| `logs` | View VM logs |
|
| [`logs`](#vm-logs) | View VM logs |
|
||||||
| `exec` | Execute command in VM |
|
| [`exec`](#vm-exec) | Execute command in VM |
|
||||||
| [templates](templates/) | Manage LinuxKit templates |
|
| [templates](templates/) | Manage LinuxKit templates |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## vm run
|
## vm run
|
||||||
|
|
||||||
Run a LinuxKit image.
|
Run a LinuxKit image or build from a template.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
core vm run <image> [flags]
|
core vm run <image> [flags]
|
||||||
core vm run --template <name> [flags]
|
core vm run --template <name> [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Supported image formats: `.iso`, `.qcow2`, `.vmdk`, `.raw`
|
||||||
|
|
||||||
### Flags
|
### Flags
|
||||||
|
|
||||||
| Flag | Description |
|
| Flag | Description |
|
||||||
|------|-------------|
|
|------|-------------|
|
||||||
| `--template` | Use a template instead of image file |
|
| `--template` | Run from a LinuxKit template (build + run) |
|
||||||
| `--var` | Set template variable (KEY=value) |
|
| `--var` | Template variable in KEY=VALUE format (repeatable) |
|
||||||
| `--name` | Name for the container |
|
| `--name` | Name for the container |
|
||||||
| `--memory` | Memory in MB (default: 1024) |
|
| `--memory` | Memory in MB (default: 1024) |
|
||||||
| `--cpus` | CPU count (default: 1) |
|
| `--cpus` | CPU count (default: 1) |
|
||||||
| `--ssh-port` | SSH port for exec commands (default: 2222) |
|
| `--ssh-port` | SSH port for exec commands (default: 2222) |
|
||||||
| `-d` | Run in detached mode (background) |
|
| `-d` | Run in detached mode (background) |
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Run from image file
|
||||||
|
core vm run image.iso
|
||||||
|
|
||||||
|
# Run detached with more resources
|
||||||
|
core vm run -d image.qcow2 --memory 2048 --cpus 4
|
||||||
|
|
||||||
|
# Run from template
|
||||||
|
core vm run --template core-dev --var SSH_KEY="ssh-rsa AAAA..."
|
||||||
|
|
||||||
|
# Multiple template variables
|
||||||
|
core vm run --template server-php --var SSH_KEY="..." --var DOMAIN=example.com
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## vm ps
|
## vm ps
|
||||||
|
|
||||||
List running VMs.
|
List running VMs.
|
||||||
|
|
@ -54,14 +79,37 @@ core vm ps [flags]
|
||||||
|------|-------------|
|
|------|-------------|
|
||||||
| `-a` | Show all (including stopped) |
|
| `-a` | Show all (including stopped) |
|
||||||
|
|
||||||
|
### Output
|
||||||
|
|
||||||
|
```
|
||||||
|
ID NAME IMAGE STATUS STARTED PID
|
||||||
|
abc12345 myvm ...core-dev.qcow2 running 5m 12345
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## vm stop
|
## vm stop
|
||||||
|
|
||||||
Stop a running VM.
|
Stop a running VM by ID or name.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
core vm stop <id>
|
core vm stop <id>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Supports partial ID matching.
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Full ID
|
||||||
|
core vm stop abc12345678
|
||||||
|
|
||||||
|
# Partial ID
|
||||||
|
core vm stop abc1
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## vm logs
|
## vm logs
|
||||||
|
|
||||||
View VM logs.
|
View VM logs.
|
||||||
|
|
@ -76,14 +124,40 @@ core vm logs <id> [flags]
|
||||||
|------|-------------|
|
|------|-------------|
|
||||||
| `-f` | Follow log output |
|
| `-f` | Follow log output |
|
||||||
|
|
||||||
## vm exec
|
### Examples
|
||||||
|
|
||||||
Execute a command in a running VM.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
core vm exec <id> <command>
|
# View logs
|
||||||
|
core vm logs abc12345
|
||||||
|
|
||||||
|
# Follow logs
|
||||||
|
core vm logs -f abc1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## vm exec
|
||||||
|
|
||||||
|
Execute a command in a running VM via SSH.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
core vm exec <id> <command...>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# List files
|
||||||
|
core vm exec abc12345 ls -la
|
||||||
|
|
||||||
|
# Open shell
|
||||||
|
core vm exec abc1 /bin/sh
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## See Also
|
## See Also
|
||||||
|
|
||||||
- [build command](../build/) - Build LinuxKit images
|
- [templates](templates/) - Manage LinuxKit templates
|
||||||
|
- [build](../build/) - Build LinuxKit images
|
||||||
|
- [dev](../dev/) - Dev environment management
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue