diff --git a/core b/core deleted file mode 100755 index fccf892..0000000 Binary files a/core and /dev/null differ diff --git a/docs/cmd/ci/changelog/index.md b/docs/cmd/ci/changelog/index.md index 7b66a5f..ffc0712 100644 --- a/docs/cmd/ci/changelog/index.md +++ b/docs/cmd/ci/changelog/index.md @@ -25,4 +25,4 @@ Generates markdown changelog from git commits since last tag: ## Configuration -See [config.md](../config.md) for changelog configuration options. +See [configuration.md](../../../configuration.md) for changelog configuration options. diff --git a/docs/cmd/ci/init/index.md b/docs/cmd/ci/init/index.md index 07be027..351e246 100644 --- a/docs/cmd/ci/init/index.md +++ b/docs/cmd/ci/init/index.md @@ -22,4 +22,4 @@ publishers: - type: github ``` -See [config.md](../config.md) for full configuration options. +See [configuration.md](../../../configuration.md) for full configuration options. diff --git a/docs/cmd/dev/work/index.md b/docs/cmd/dev/work/index.md index 8337e43..976999e 100644 --- a/docs/cmd/dev/work/index.md +++ b/docs/cmd/dev/work/index.md @@ -156,5 +156,5 @@ Use `core setup` to clone all repos from the registry. ## See Also -- [setup command](setup.md) - Clone repos from registry -- [search command](search.md) - Find and install repos +- [setup command](../../setup/) - Clone repos from registry +- [search command](../../pkg/search/) - Find and install repos diff --git a/docs/cmd/docs/index.md b/docs/cmd/docs/index.md index 083334a..d73ebf0 100644 --- a/docs/cmd/docs/index.md +++ b/docs/cmd/docs/index.md @@ -107,4 +107,4 @@ The synced docs are used to build https://core.help: ## See Also -- [Configuration](../configuration.md) - Project configuration +- [Configuration](../../configuration.md) - Project configuration diff --git a/docs/cmd/doctor/index.md b/docs/cmd/doctor/index.md index 6ee4da5..a8c2b05 100644 --- a/docs/cmd/doctor/index.md +++ b/docs/cmd/doctor/index.md @@ -71,5 +71,5 @@ All checks passed! ## See Also -- [setup command](setup.md) - Clone repos from registry -- [dev install](dev.md) - Install development environment +- [setup command](../setup/) - Clone repos from registry +- [dev](../dev/) - Development environment diff --git a/docs/cmd/pkg/search/index.md b/docs/cmd/pkg/search/index.md index 0e71734..7666ea1 100644 --- a/docs/cmd/pkg/search/index.md +++ b/docs/cmd/pkg/search/index.md @@ -108,5 +108,5 @@ core doctor ## See Also -- [setup command](setup.md) - Clone all repos from registry -- [doctor command](doctor.md) - Check environment +- [setup command](../../setup/) - Clone all repos from registry +- [doctor command](../../doctor/) - Check environment diff --git a/docs/cmd/sdk/index.md b/docs/cmd/sdk/index.md index 03d23f7..67ad2f9 100644 --- a/docs/cmd/sdk/index.md +++ b/docs/cmd/sdk/index.md @@ -115,16 +115,16 @@ Generate SDKs as part of the release process: ```bash # Generate SDKs for release -core release --target sdk +core ci --target sdk # With explicit version -core release --target sdk --version v1.2.3 +core ci --target sdk --version v1.2.3 -# Preview what would be generated -core release --target sdk --dry-run +# Preview what would be generated (default behaviour) +core ci --target sdk ``` -See [release command](release.md) for full details. +See [ci command](../ci/) for full release details. ## Configuration diff --git a/docs/cmd/setup/index.md b/docs/cmd/setup/index.md index 2bcb4d1..35c8b38 100644 --- a/docs/cmd/setup/index.md +++ b/docs/cmd/setup/index.md @@ -89,6 +89,6 @@ core ci ## See Also -- [work commands](work.md) - Multi-repo operations -- [search command](search.md) - Find repos on GitHub -- [install command](search.md) - Clone individual repos +- [work commands](../dev/work/) - Multi-repo operations +- [search command](../pkg/search/) - Find repos on GitHub +- [install command](../pkg/search/) - Clone individual repos diff --git a/docs/cmd/vm/index.md b/docs/cmd/vm/index.md index 88257fa..45052de 100644 --- a/docs/cmd/vm/index.md +++ b/docs/cmd/vm/index.md @@ -2,13 +2,86 @@ LinuxKit VM management. -## Subcommands +## Usage + +```bash +core vm [flags] +``` + +## Commands | Command | Description | |---------|-------------| -| [run](run/) | Run VM | -| [ps](ps/) | List VMs | -| [stop](stop/) | Stop VM | -| [logs](logs/) | View logs | -| [exec](exec/) | Execute command | -| [templates](templates/) | Manage templates | +| `run` | Run a LinuxKit image | +| `ps` | List running VMs | +| `stop` | Stop a VM | +| `logs` | View VM logs | +| `exec` | Execute command in VM | +| [templates](templates/) | Manage LinuxKit templates | + +## vm run + +Run a LinuxKit image. + +```bash +core vm run [flags] +core vm run --template [flags] +``` + +### Flags + +| Flag | Description | +|------|-------------| +| `--template` | Use a template instead of image file | +| `--var` | Set template variable (KEY=value) | +| `--memory` | Memory in MB (default: 4096) | +| `--cpus` | CPU count (default: 4) | +| `-d` | Run in background | + +## vm ps + +List running VMs. + +```bash +core vm ps [flags] +``` + +### Flags + +| Flag | Description | +|------|-------------| +| `-a` | Show all (including stopped) | + +## vm stop + +Stop a running VM. + +```bash +core vm stop +``` + +## vm logs + +View VM logs. + +```bash +core vm logs [flags] +``` + +### Flags + +| Flag | Description | +|------|-------------| +| `-f` | Follow log output | + +## vm exec + +Execute a command in a running VM. + +```bash +core vm exec +``` + +## See Also + +- [build command](../build/) - Build LinuxKit images diff --git a/docs/cmd/vm/templates/index.md b/docs/cmd/vm/templates/index.md index 4573020..a204de6 100644 --- a/docs/cmd/vm/templates/index.md +++ b/docs/cmd/vm/templates/index.md @@ -113,5 +113,5 @@ core run --template myserver ## See Also -- [run command](run.md) - Run LinuxKit images -- [build command](build.md) - Build LinuxKit images +- [vm command](../) - Run LinuxKit images +- [build command](../../build/) - Build LinuxKit images diff --git a/docs/index.md b/docs/index.md index 6a33e80..5bfa5f7 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,81 +5,57 @@ Core is a unified CLI for the host-uk ecosystem - build, release, and deploy Go, ## Installation ```bash -# Go install -go install github.com/host-uk/core/cmd/core@latest +# From any Go project +core go install github.com/host-uk/core/cmd/core -# Or download from releases -curl -fsSL https://github.com/host-uk/core/releases/latest/download/core-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/amd64/').tar.gz | tar -xzf - -C /usr/local/bin +# Or standard go install +go install github.com/host-uk/core/cmd/core@latest ``` -## Commands +Verify: `core doctor` -### Build & Release +## Command Reference + +See [cmd/](cmd/) for full command documentation. | Command | Description | |---------|-------------| -| [`core build`](cmd/build.md) | Build Go, Wails, Docker, and LinuxKit projects | -| [`core release`](cmd/release.md) | Build and publish to GitHub, npm, Homebrew, etc. | -| [`core sdk`](cmd/sdk.md) | Generate and manage API SDKs | - -### Containers - -| Command | Description | -|---------|-------------| -| [`core run`](cmd/run.md) | Run LinuxKit images with qemu/hyperkit | -| `core ps` | List running containers | -| `core stop` | Stop running containers | -| `core logs` | View container logs | -| `core exec` | Execute commands in containers | -| [`core templates`](cmd/templates.md) | Manage LinuxKit templates | - -### Development - -| Command | Description | -|---------|-------------| -| [`core dev`](cmd/dev.md) | Portable development environment (100+ tools) | -| [`core php`](cmd/php.md) | Laravel/PHP development tools | -| [`core doctor`](cmd/doctor.md) | Check development environment | - -### GitHub & Multi-Repo - -| Command | Description | -|---------|-------------| -| [`core search`](cmd/search.md) | Search GitHub for repositories | -| [`core install`](cmd/search.md) | Clone a repository from GitHub | -| [`core setup`](cmd/setup.md) | Clone all repos from registry | -| [`core work`](cmd/work.md) | Multi-repo git operations | -| [`core health`](cmd/work.md) | Quick health check across repos | -| [`core issues`](cmd/work.md) | List open issues across repos | -| [`core reviews`](cmd/work.md) | List PRs needing review | -| [`core ci`](cmd/work.md) | Check CI status across repos | - -### Documentation - -| Command | Description | -|---------|-------------| -| [`core docs`](cmd/docs.md) | Documentation management | +| [go](cmd/go/) | Go development (test, fmt, lint, cov) | +| [php](cmd/php/) | Laravel/PHP development | +| [build](cmd/build/) | Build Go, Wails, Docker, LinuxKit projects | +| [ci](cmd/ci/) | Publish releases (dry-run by default) | +| [sdk](cmd/sdk/) | SDK validation | +| [dev](cmd/dev/) | Multi-repo workflow | +| [pkg](cmd/pkg/) | Package search and install | +| [vm](cmd/vm/) | LinuxKit VM management | +| [docs](cmd/docs/) | Documentation management | +| [setup](cmd/setup/) | Clone repos from registry | +| [doctor](cmd/doctor/) | Check development environment | ## Quick Start ```bash -# Build a Go project -core build +# Go development +core go test # Run tests +core go test --coverage # With coverage +core go fmt # Format code +core go lint # Lint code -# Build for specific targets +# Build +core build # Auto-detect and build core build --targets linux/amd64,darwin/arm64 -# Release to GitHub -core release +# Release (dry-run by default) +core ci # Preview release +core ci --were-go-for-launch # Actually publish -# Release to multiple package managers -core release # Publishes to all configured targets +# Multi-repo workflow +core dev work # Status + commit + push +core dev work --status # Just show status -# Start PHP dev environment -core php dev - -# Run a LinuxKit image -core run server.iso +# PHP development +core php dev # Start dev environment +core php test # Run tests ``` ## Configuration @@ -91,26 +67,12 @@ Core uses `.core/` directory for project configuration: ├── release.yaml # Release targets and settings ├── build.yaml # Build configuration (optional) └── linuxkit/ # LinuxKit templates - └── server.yml ``` -## Documentation +And `repos.yaml` in workspace root for multi-repo management. -### Command Reference -- [Build](cmd/build.md) - Cross-platform builds with code signing -- [Release](cmd/release.md) - Publishing to package managers -- [SDK](cmd/sdk.md) - Generate API clients from OpenAPI -- [Run](cmd/run.md) - Container management -- [Templates](cmd/templates.md) - LinuxKit templates -- [Dev](cmd/dev.md) - Portable development environment -- [PHP](cmd/php.md) - Laravel development -- [Doctor](cmd/doctor.md) - Environment check -- [Search & Install](cmd/search.md) - GitHub integration -- [Setup](cmd/setup.md) - Clone repos from registry -- [Work](cmd/work.md) - Multi-repo operations -- [Docs](cmd/docs.md) - Documentation management +## Reference -### Reference - [Configuration](configuration.md) - All config options - [Examples](examples/) - Sample configurations