cli/README.md

58 lines
2.1 KiB
Markdown
Raw Normal View History

2025-10-25 09:24:50 +01:00
# Core
2025-10-25 09:24:50 +01:00
Core is an opinionated Go framework for building desktop apps with Wails. It provides a small set of focused modules:
2025-10-25 09:24:50 +01:00
- Core — framework bootstrap and service container
- Core.Config — app and UI state persistence
- Core.Crypt — keys, encrypt/decrypt, sign/verify
- Core.Display — windows, tray, window state
- Core.Docs — inapp help and deeplinks
- Core.IO — local/remote filesystem helpers
- [Core.Workspace](https://core.help/) — projects and paths
2025-10-25 09:24:50 +01:00
Help: https://Core.Help \
Web: https://dAppCo.re \
Repo: https://github.com/Snider/Core
2025-10-25 09:24:50 +01:00
## Quick start
```go
2025-10-25 09:24:50 +01:00
import core "github.com/Snider/Core"
2025-10-25 09:24:50 +01:00
app := core.New(
core.WithServiceLock(),
)
```
## Tasks
This project uses [Task](https://taskfile.dev/) for task automation. The root `Taskfile.yml` includes the `Taskfile.yml` from `cmd/core-gui` and `cmd/core` under the `gui` and `cli` namespaces respectively. The following tasks are available:
### General
- `task test`: Run all Go tests recursively for the entire project.
- `task review`: Run CodeRabbit review to get feedback on the current changes.
- `task check`: Run `go mod tidy`, the full test suite, and a CodeRabbit review.
### GUI Application (`cmd/core-gui`)
- `task gui:build`: Builds the GUI application.
- `task gui:package`: Packages a production build of the GUI application.
- `task gui:run`: Runs the GUI application.
- `task gui:dev`: Runs the GUI application in development mode.
### CLI Application (`cmd/core`)
- `task cli:build`: Builds the CLI application.
- `task cli:build:dev`: Builds the CLI application for development.
- `task cli:run`: Builds and runs the CLI application.
2025-10-25 09:24:50 +01:00
## Docs (MkDocs)
The help site and inapp docs are built with MkDocs Material and live under `pkg/v1/core/docs`.
2025-10-25 09:24:50 +01:00
- Live preview: from `pkg/v1/core/docs` run
- `pip install -r requirements.txt`
- `mkdocs serve -o -c` (or `task dev` if you use Task)
- Build static site: `mkdocs build --clean -d public` (or `task build`)
2025-10-25 09:24:50 +01:00
The demo app embeds the built docs from `public/` and can open specific sections in new windows using stable, short headings.