Commit graph

19 commits

Author SHA1 Message Date
Snider
39d247ec9e style: clean up main.go imports
Some checks failed
Deploy / build (push) Failing after 3s
Security Scan / security (push) Successful in 15s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 21:48:07 +00:00
Snider
b6468b8e6f refactor: move 9 cmd packages to ecosystem repos
Some checks failed
Deploy / build (push) Failing after 3s
Security Scan / security (push) Successful in 15s
- cmd/go → core/go cmd/gocmd
- cmd/dev, setup, qa, docs, gitcmd, monitor → go-devops
- cmd/lab → go-ai
- cmd/workspace → go-agentic

CLI now imports commands from ecosystem repos via blank imports.
Remaining local: config, doctor, help, module, pkgcmd, plugin, session.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 21:46:24 +00:00
Snider
a9fe9fe04b refactor: move core-app, updater, vanity-import, community out of CLI
Some checks failed
Deploy / build (push) Failing after 3s
Security Scan / security (push) Successful in 15s
- cmd/core-app/ → core framework repo (workspace module)
- cmd/updater/ → go-devops
- cmd/vanity-import/ → go-devops
- cmd/community/ → go-devops
- Remove stale Taskfile tasks for moved products (ide, app, bugseti)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 21:33:15 +00:00
Snider
4e76e96039 refactor: remove external repo imports and clean .core/
Some checks failed
Deploy / Test (push) Failing after 2s
Deploy / Build App Image (push) Has been skipped
Deploy / Build Web Image (push) Has been skipped
Deploy / Build Core Image (push) Failing after 2m8s
Deploy / Deploy to Production (push) Has been skipped
Security Scan / Secret Detection (push) Successful in 13s
Security Scan / Dependency & Config Scan (push) Successful in 19s
Security Scan / Go Vulnerability Check (push) Successful in 1m26s
Remove all external blank imports from main.go (go-ai, go-api, go-crypt,
go-devops, go-ml, go-netops, go-scm) and delete cmd/ai/. Business logic
moved to proper repos: go-agent, go-agentic, go-ai.

Clean .core/ — remove LinuxKit VM templates, Claude Code plugin, and
ephemeral issue plans. Keep only CLI build/release config.

Drops 504 lines from go.mod/go.sum. CLI no longer pulls ollama, qdrant,
duckdb, or other ML dependencies into its binary or security scan scope.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 20:51:24 +00:00
Snider
cce9adc043 refactor: migrate 14 cmd packages to their go-* repos
Some checks failed
Security Scan / Secret Detection (push) Failing after 8s
Security Scan / Dependency & Config Scan (push) Failing after 22s
Security Scan / Go Vulnerability Check (push) Failing after 3m17s
Moved CLI command packages to their respective ecosystem repos:
- go-ai: daemon, mcpcmd, security
- go-api: api
- go-crypt: crypt, testcmd
- go-devops: deploy, prod, vm
- go-netops: unifi
- go-rag: rag
- go-scm: collect, forge, gitea

Updated main.go imports to reference external repos.
Updated cmd/ai to import rag from go-rag.
Deleted 14 cmd/ directories (9,421 lines removed).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 19:42:16 +00:00
Snider
a7d09e4c67 refactor: migrate cmd/ml to go-ml, remove replaces and go.work
Some checks failed
Deploy / Deploy to Production (push) Has been skipped
Deploy / Test (push) Failing after 11s
Deploy / Build App Image (push) Has been skipped
Deploy / Build Web Image (push) Has been skipped
Security Scan / Secret Detection (push) Failing after 10s
Security Scan / Go Vulnerability Check (push) Failing after 10m20s
Security Scan / Dependency & Config Scan (push) Failing after 25s
Deploy / Build Core Image (push) Failing after 13m6s
- Move 40 ML command files to forge.lthn.ai/core/go-ml/cmd
- Remove all replace directives from go.mod
- Remove go.work (repos resolve from forge directly)
- Fix cache.New call to match updated API signature
- Update main.go import to forge.lthn.ai/core/go-ml/cmd

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 19:29:23 +00:00
Snider
d6eec4d240 feat(api): add core api spec and core api sdk commands
Some checks are pending
Security Scan / Go Vulnerability Check (push) Waiting to run
Security Scan / Dependency & Config Scan (push) Waiting to run
Security Scan / Secret Detection (push) Waiting to run
New command group for OpenAPI spec generation and SDK codegen:
- `core api spec` generates OpenAPI 3.1 spec (JSON/YAML) from route groups
- `core api sdk` generates client SDKs via openapi-generator-cli
- Adds go-api dependency for SpecBuilder, ExportSpec, SDKGenerator

Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 01:28:58 +00:00
Claude
41f786a222
feat(module): add CLI commands for marketplace module management
Some checks failed
Security Scan / Go Vulnerability Check (push) Has been cancelled
Security Scan / Secret Detection (push) Has been cancelled
Security Scan / Dependency & Config Scan (push) Has been cancelled
Wire `core module install/remove/list/update` commands to the
marketplace.Installer from pkg/marketplace. Follows the exact
pattern established by cmd/plugin/.

- install: clone from Git repo with optional ed25519 verification
- list: table output of installed modules
- update: pull latest + re-verify manifest (supports --all)
- remove: confirmation prompt then cleanup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 10:37:52 +00:00
Snider
1bf130b25a chore: update module paths and daemon refactor
Some checks are pending
Security Scan / Go Vulnerability Check (push) Waiting to run
Security Scan / Secret Detection (push) Waiting to run
Security Scan / Dependency & Config Scan (push) Waiting to run
Sync CLI module imports across all command packages.
Refactor daemon command with expanded functionality.
Update go.mod and go.work dependencies.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-17 19:19:40 +00:00
c340303314 refactor: flatten commands, extract php/ci to own repos (#2)
## Summary
- Extract PHP/Laravel commands to `core/php` repo (42 files, standalone module)
- Extract CI/release + SDK commands to `core/ci` repo (10 files)
- Remove `internal/variants/` build tag system entirely
- Move all 30 remaining command packages from `internal/cmd/` to top-level `cmd/`
- Rewrite `main.go` with direct imports — no more variant selection
- PHP and CI are now optional via commented import lines in main.go

Co-authored-by: Claude <developers@lethean.io>
Reviewed-on: #2
Co-authored-by: Charon <charon@lthn.ai>
Co-committed-by: Charon <charon@lthn.ai>
2026-02-16 14:45:06 +00:00
abe74a1a3d refactor: split CLI from monorepo, import core/go as library (#1)
- Change module from forge.lthn.ai/core/go to forge.lthn.ai/core/cli
- Remove pkg/ directory (now served from core/go)
- Add require + replace for forge.lthn.ai/core/go => ../go
- Update go.work to include ../go workspace module
- Fix all internal/cmd/* imports: pkg/ refs → forge.lthn.ai/core/go/pkg/
- Rename internal/cmd/sdk package to sdkcmd (avoids conflict with pkg/sdk)
- Remove SDK library files from internal/cmd/sdk/ (now in core/go/pkg/sdk/)
- Remove duplicate RAG helper functions from internal/cmd/rag/
- Remove stale cmd/core-ide/ (now in core/ide repo)
- Update IDE variant to remove core-ide import
- Fix test assertion for new module name
- Run go mod tidy to sync dependencies

core/cli is now a pure CLI application importing core/go for packages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Co-authored-by: Claude <developers@lethean.io>
Reviewed-on: #1
2026-02-16 14:24:37 +00:00
Claude
23b82482f2 refactor: rename module from github.com/host-uk/core to forge.lthn.ai/core/cli
Move module identity to our own Forgejo instance. All import paths
updated across 434 Go files, sub-module go.mod files, and go.work.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 05:53:52 +00:00
Claude
ca4c8208f7 fix: restore CLI entry point and register all commands
The main.go was removed when Wails3 apps were added to cmd/, breaking
`go build .` for the core CLI. Restore it and update variants/full.go
to include daemon, forge, mcpcmd, prod, and session commands. Drop gitea
(superseded by forge) and unifi (unused).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 05:53:52 +00:00
Snider
5c3b70a1eb fix: resolve conflict markers and remove legacy code after branch consolidation
- Remove conflict markers from 19 files that were accidentally committed
  during merge resolutions (keeping HEAD versions)
- Remove legacy root-level code (core.go, main.go, config/, crypt/,
  display/, filesystem/, workspace/, docs/*.go, cmd/app/) from old
  architecture predating pkg/ restructure
- Remove duplicate pkg/config/loader.go (Load/Save already in config.go)
- Fix import alias in cmd_apply.go (errors -> core)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-08 22:08:35 +00:00
Snider
6b76b4d37f refactor(cli): add Fatal() and simplify main entry point
- Add cli.Fatal(err) that prints styled error and exits
- Change cli.Main() to handle errors internally via Fatal()
- Simplify main.go to just: cli.Main()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 22:16:34 +00:00
Snider
5b2c4eef75 refactor: move CLI entry point to pkg/cli, remove cmd/
Consolidate CLI code into pkg/cli:
- Add pkg/cli/app.go with Main() entry point and completionCmd
- Move build variants to internal/variants/ (avoids import cycle)
- Move i18n-validate tool to internal/tools/
- Update main.go to call cli.Main()
- Remove cmd/ directory entirely

Structure:
- main.go imports internal/variants (triggers command registration)
- main.go calls cli.Main() which runs the CLI
- Build variants: go build, go build -tags ci/php/minimal

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 22:11:35 +00:00
Snider
5e2d058b26 feat(cli): wire Core runtime with i18n and log services
- Add i18n service wrapping pkg/i18n for translations via cli.T()
- Add log service with levels (quiet/error/warn/info/debug)
- Wire cli.Init() in cmd.Execute() with explicit service names
- Fix main.go to print errors to stderr and exit with code 1
- Update runtime.go to accept additional services via Options

Services use WithName() to avoid name collision since both are
defined in pkg/cli (WithService would auto-name both "cli").

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 10:55:30 +00:00
Snider
d2c0553b6d refactor: flatten CLI to root, simplify pkg/mcp for CLI-only use
- Move cmd/core/cmd/* to cmd/* (flatten directory structure)
- Update module path from github.com/host-uk/core/cmd/core to github.com/host-uk/core
- Remove go.mod files from pkg/* (single module now)
- Simplify pkg/mcp to file operations only (no GUI deps)
- GUI features (display, webview, process) stay in core-gui/pkg/mcp
- Fix import aliases (sdkpkg) for package name conflicts
- Remove old backup directory (cmdbk)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:13:51 +00:00
Snider
9add6cf2ee refactor(cli): restructure cmd packages into subdirectories
- Move CLI commands into subdirectories matching command hierarchy:
  dev/, go/, php/, build/, ci/, sdk/, pkg/, vm/, docs/, setup/, doctor/, test/, ai/
- Create shared/ package for common styles and utilities
- Add new `core ai` root command with claude subcommand
- Update package declarations and imports across all files
- Create commands.go entry points for each package
- Remove GUI-related files (moved to core-gui repo)

This makes the filesystem structure match the CLI command structure,
improving context capture and code organization.

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