Commit graph

376 commits

Author SHA1 Message Date
Snider
ace6306233 docs: restructure cmd docs to mirror CLI hierarchy
- Convert flat .md files to index.md in subdirectories
- Add subcommand directories (go/test, go/cov, build/sdk, etc.)
- Update dev/index.md to include multi-repo commands
- Structure now mirrors: core <cmd> [subcmd] → docs/cmd/<cmd>/<subcmd>/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:46:31 +00:00
Snider
c9ebb7c781 test: increase coverage to 63.8% across packages
Coverage improvements:
- pkg/build: 89.4%
- pkg/release: 86.7% (from 36.7%)
- pkg/container: 85.7%
- pkg/php: 62.1% (from 26%)
- pkg/devops: 56.7% (from 33.1%)
- pkg/release/publishers: 54.7%

Also:
- Add GEMINI.md for Gemini agent guidance
- Update .gitignore to exclude coverage files
- Remove stray core.go at root
- Add core go cov command for coverage reports

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:28:23 +00:00
Snider
50f6839c51 test: increase coverage across packages
- pkg/container: 65.6% → 85.7% (hypervisor, linuxkit, templates tests)
- pkg/release/publishers: 13.3% → 41.7% (homebrew, aur, npm, scoop, chocolatey tests)
- Fix flaky test cleanup in TestLinuxKitManager_Stop_Good_ContextCancelled

Overall coverage: 29.2% → 40.6%

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:19:08 +00:00
Snider
a7ee58d29e feat(cli): add core go cov command
- Add `core go cov` for coverage reports
- Generate HTML report with --html
- Open in browser with --open
- Fail on threshold with --threshold 80
- Colour-coded coverage output
- Update SKILL.md documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:07:46 +00:00
Snider
5b0a0eac7c feat(cli): add core go install command
- Add `core go install` for installing Go binaries
- Auto-detects cmd/ subdirectories
- Optional --no-cgo flag for pure Go builds
- Shows install location on success
- Update SKILL.md documentation

Dogfood the CLI daily for better DX.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:01:54 +00:00
Snider
f887c4b049 feat(cli): make core ci dry-run by default
- Default behavior is now dry-run (safe)
- Add --were-go-for-launch flag to actually publish
- Update help text to make this clear
- Update SKILL.md documentation

Now you must explicitly opt-in to publishing:
  core ci                        # Preview (dry-run)
  core ci --were-go-for-launch   # Actually publish

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:50:41 +00:00
Snider
331032cd57 refactor(cli): separate build and publish concerns
- Move SDK generation to `core build sdk` subcommand
- Make `core ci` publish-only (expects artifacts in dist/)
- Add release.Publish() for publishing pre-built artifacts
- Keep `core sdk diff` and `core sdk validate` for API validation
- Update SKILL.md documentation

This separation prevents accidental releases - running `core ci`
without first building will fail safely.

Workflow:
  core build          # Build binaries
  core build sdk      # Build SDKs
  core ci             # Publish what's in dist/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:48:28 +00:00
Snider
148670fd82 feat(cli): add build variants with tags, rename release to ci
- Rename `release` command to `ci` for clarity
- Add build tag support for different binary variants:
  - Default: full development binary (all commands)
  - `-tags ci`: minimal CI binary (build, ci, sdk, doctor)
- Reorganize command registration into separate files:
  - commands_dev.go: full fat (default)
  - commands_ci.go: CI-only

Build CI variant: `go build -tags ci -o core-ci ./cmd/core/`

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:35:27 +00:00
Snider
b4872c65b3 refactor(cli): move git/multi-repo commands under core dev
Move multi-repo workflow commands under `core dev`:
- work, health, commit, push, pull
- issues, reviews, ci, impact

Cleaner root with language-specific groups:
- core go (Go development)
- core php (PHP/Laravel)
- core dev (multi-repo workflow)
- core vm (LinuxKit VMs)
- core pkg (package management)

Update SKILL.md with new command paths.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:25:18 +00:00
Snider
2d2b63af39 feat(cli): add core go command group
Add Go development tools under `core go`:
- test: Run tests with coverage (CGO_ENABLED=0)
- fmt: Format code with goimports/gofmt
- lint: Run golangci-lint
- mod: Module management (tidy, download, verify, graph)
- work: Workspace management (sync, init, use)

Update SKILL.md with Go Development section.
Keep `core test` at root for backward compatibility.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:22:01 +00:00
Snider
ecee1635cd chore(cli): remove tview-example command
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:17:37 +00:00
Snider
dbe617c23e refactor: remove GUI packages for CGO-free CLI
Move all Wails-dependent packages to core-gui repo:
- pkg/core, pkg/display, pkg/docs, pkg/help, pkg/ide
- pkg/runtime, pkg/webview, pkg/workspace, pkg/ws
- pkg/plugin, pkg/config, pkg/i18n, pkg/module
- pkg/crypt, pkg/io, pkg/process

Add pkg/errors with simple E() helper for error wrapping.
Update go.work to only include CLI-relevant packages.
CLI now builds with CGO_ENABLED=0 - no linker warnings.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:15:01 +00:00
Snider
aa7a1021d3 refactor(cli): add core pkg command group for package management
- Create new pkg.go with search, install, list, update, outdated subcommands
- Remove separate search.go and install.go files
- Update root.go to use AddPkgCommands instead of individual commands
- Update skill documentation with pkg commands in quick reference, decision tree, and common mistakes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:42:22 +00:00
Snider
fcc020a364 docs(skill): update VM commands to use core vm prefix
Updates skill documentation to reflect the refactored VM commands
now grouped under `core vm`.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:35:55 +00:00
Snider
395b84ed03 refactor(cli): move container commands under core vm
Groups all LinuxKit VM commands under `core vm` for cleaner root help:
- core vm run      - Run a VM from image or template
- core vm ps       - List running VMs
- core vm stop     - Stop a running VM
- core vm logs     - View VM logs
- core vm exec     - Execute command in VM
- core vm templates - Manage LinuxKit templates

Updates help text and output messages to use `core vm` prefix.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:35:22 +00:00
Snider
e2eb0f4b56 chore(cli): remove ASCII art banner
Simplifies CLI startup by removing the large ASCII art banner.
Now uses clir's standard header with version and description.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:28:58 +00:00
Snider
dd6906117f docs(skill): add comprehensive PHP command reference
Adds full documentation for core php commands:
- Development server (dev, logs, status, stop, ssl)
- Testing (test with Pest/PHPUnit detection)
- Code quality (fmt, analyse)
- Building (Docker, LinuxKit)
- Deployment (Coolify with status tracking)
- Package management (link, unlink, update, list)

Updates quick reference, decision tree, and common mistakes
to include PHP workflows.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:25:40 +00:00
Snider
e0f4c0ffda feat(skill): add core CLI skill for Claude Code
Adds a Claude Code skill that documents the core CLI commands and
guides Claude to use the correct command for different tasks.

Features:
- Command quick reference table
- Decision tree for common workflows
- Common mistakes to avoid
- Installation script for global install

Install globally:
  curl -fsSL https://raw.githubusercontent.com/host-uk/core/main/.claude/skills/core/install.sh | bash

Or use from project .claude/skills/ directory.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:22:11 +00:00
Snider
a3fef89c44 feat(cli): add core test command for Go test DX
Adds `core test` command with:
- Coverage summary by default, detailed with --coverage
- Verbose mode (--verbose) to stream test output
- Package filtering (--pkg ./pkg/...)
- Test name filtering (--run TestName)
- Short mode (--short) for skipping integration tests
- Race detection (--race)
- JSON output (--json) for CI/agents

Sets MACOSX_DEPLOYMENT_TARGET=26.0 to suppress macOS linker warnings.
Filters linker warnings from output for clean DX.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:15:23 +00:00
Snider
6715043892 chore: remove docs deployment workflow
Docs now handled by core-php at core.help

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:55:01 +00:00
Snider
11e898c914 feat(docs): map core repo to packages/go/ in docs sync
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:47:49 +00:00
Snider
ef778936b6 docs: add next steps for docs sync setup
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 09:55:39 +00:00
Snider
d112dab0d1 docs: reorganize into docs/cmd/ and add missing commands
- Move command docs to docs/cmd/ for better organization
- Add work.md: multi-repo operations (health, issues, reviews, etc.)
- Add docs.md: documentation management (list, sync)
- Add templates.md: LinuxKit template management
- Add setup.md: clone repos from registry
- Update index.md with full command reference

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 09:44:28 +00:00
Snider
229cde534d docs: add comprehensive CLI documentation
- Add sdk.md: SDK generation and API diff commands
- Add dev.md: DevOps portable environment (100+ tools)
- Add doctor.md: Environment health check
- Add search.md: GitHub search and install commands
- Update build.md: Add code signing flags (--no-sign, --notarize)
- Update release.md: Add --target sdk flag
- Update index.md: Organize commands by category

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 09:34:57 +00:00
Snider
032e5ae4cc test(release): add SDK release integration tests
Add additional test coverage for SDK release functionality:
- TestRunSDK_Good_WithDiffEnabledNoFailOnBreaking
- TestRunSDK_Good_MultipleLanguages
- TestRunSDK_Good_WithPackageConfig
- TestToSDKConfig_Good_EmptyPackageConfig
- TestToSDKConfig_Good_DiffDisabled

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 03:28:05 +00:00
Snider
afc0b0400e feat(cli): implement runReleaseSDK for SDK generation
Add the runReleaseSDK function that calls release.RunSDK() to
enable SDK-only releases via `core release --target sdk`. The
function loads configuration, applies CLI overrides, and displays
styled output for the SDK generation process.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 03:25:44 +00:00
Snider
accabe288a feat(cli): add --target flag to release command
Add target flag to support different release targets (e.g., sdk).
The runReleaseSDK function will be implemented in a follow-up commit.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 03:23:17 +00:00
Snider
d9c4af07c2 feat(release): implement RunSDK for SDK-only releases
Add RunSDK function that orchestrates SDK-only releases by:
- Validating config and SDK configuration
- Determining version from git tags or config override
- Running optional breaking change detection via oasdiff
- Generating SDKs for configured languages (unless dry run)

The function supports dry run mode for previewing what would be done
without actually generating SDKs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 03:20:56 +00:00
Snider
e3d9aa2b90 feat(release): add SDK release types and config converter
Add SDKRelease struct to hold SDK release results and toSDKConfig
helper function to convert release.SDKConfig to sdk.Config.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 03:17:07 +00:00
Snider
eaa35fb718 feat(sdk): add SetVersion method for release integration
Add version field to SDK struct and SetVersion method that updates both
the internal version and the config's Package.Version. This enables the
release system to pass version information to SDK generators.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 03:15:08 +00:00
Snider
6ac40d93ac docs(release): add SDK release integration design and plan
S3.4 - Add `core release --target sdk` to generate SDKs as a
separate release target with breaking change detection.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 03:12:49 +00:00
Snider
ae96820393 test(signing): add integration tests
Tests for skip conditions and disabled configs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:59:11 +00:00
Snider
0b949b9e07 feat(cli): integrate signing into build command
Adds --no-sign and --notarize flags.
Signs macOS binaries after build, GPG signs checksums.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:57:46 +00:00
Snider
8852d0a273 feat(signing): add orchestration helpers
SignBinaries, NotarizeBinaries, SignChecksums for pipeline integration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:54:06 +00:00
Snider
1e0d9e4ebd feat(build): add SignConfig to BuildConfig
Loads signing configuration from .core/build.yaml.
Expands environment variables for secrets.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:52:12 +00:00
Snider
dff008fff7 feat(signing): add Windows signtool placeholder
Placeholder for future Windows code signing support.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:49:51 +00:00
Snider
471cd1f903 feat(signing): add macOS codesign + notarization
Signs binaries with Developer ID and hardened runtime.
Notarization submits to Apple and staples ticket.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:48:54 +00:00
Snider
e0c1945f00 feat(signing): add GPG signer
Signs files with detached ASCII-armored signatures (.asc).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:47:17 +00:00
Snider
1861274909 feat(signing): add Signer interface and config types
Defines interface for GPG, macOS, and Windows signing.
Config supports env var expansion for secrets.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:46:08 +00:00
Snider
f3789f6f4c docs: add code signing implementation plan
9 TDD tasks for GPG + macOS codesign + notarization.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:44:21 +00:00
Snider
fd7c15c753 docs: add code signing design (S3.3)
GPG signs checksums.txt by default. macOS codesign + notarization.
Windows signtool deferred.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:41:18 +00:00
Snider
acd0f90424 feat(cli): add dev command group
Commands:
- core dev install/boot/stop/status
- core dev shell/serve/test
- core dev claude (sandboxed AI session)
- core dev update

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:23:29 +00:00
Snider
c00b374147 feat(devops): add Claude sandbox session
Starts Claude in immutable dev environment with auth forwarding.
Auto-boots VM, mounts project, forwards credentials.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:17:34 +00:00
Snider
86ba93edd3 feat(devops): add Serve with project mounting
Mounts project via SSHFS and runs auto-detected dev server.
Supports Laravel, Node.js, PHP, Go, Python projects.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:16:01 +00:00
Snider
0664eb2591 feat(devops): add test detection and execution
Auto-detects test framework from project files.
Supports .core/test.yaml for custom configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:14:40 +00:00
Snider
fe5cf71d5e feat(devops): add Shell for SSH and console access
Connects to dev VM via SSH (default) or serial console (--console).
Supports SSH agent forwarding for credential access.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:12:52 +00:00
Snider
95017cdc8a feat(devops): add Boot/Stop/Status methods
Manages dev VM lifecycle using LinuxKitManager.
Supports fresh boot, status checking, graceful stop.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:11:53 +00:00
Snider
cd7930af2a feat(devops): add ImageManager
Manages image downloads, manifest tracking, and update checking.
Tries sources in priority order (GitHub, CDN).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:10:16 +00:00
Snider
5d750c4170 feat(devops): add CDN/S3 source
Downloads core-devops images from custom CDN with progress reporting.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:07:47 +00:00
Snider
4286052c9e feat(devops): add GitHub Releases source
Downloads core-devops images from GitHub Releases using gh CLI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:06:20 +00:00