docs: update README/AGENTS for current codebase state
- README: added --host flag, toolchain check commands, docker output fix - AGENTS: documented --host bind address behavior, macOS bcopy fix, check-toolchain scripts, updated architecture tree
This commit is contained in:
@@ -16,6 +16,7 @@ mise run electron-deps # installs electron + electron-builder
|
|||||||
mise run electron-dev # runs electron in dev mode
|
mise run electron-dev # runs electron in dev mode
|
||||||
mise run docker-up # docker compose up --build
|
mise run docker-up # docker compose up --build
|
||||||
mise run lint # go vet ./...
|
mise run lint # go vet ./...
|
||||||
|
mise run check-all # verify gcc, brew, mise, go, node, docker, colima
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build & Run (manual)
|
## Build & Run (manual)
|
||||||
@@ -26,9 +27,10 @@ go build -buildvcs=false -o fetch . # → ./fetch
|
|||||||
|
|
||||||
# Build and run web server
|
# Build and run web server
|
||||||
./fetch serve # → starts on free port, opens browser
|
./fetch serve # → starts on free port, opens browser
|
||||||
|
./fetch serve --host 0.0.0.0 -p 8080 # → Docker / network-accessible mode
|
||||||
|
|
||||||
# Docker
|
# Docker
|
||||||
docker compose up --build # serves on :8080
|
docker compose up --build # serves on :8080, binds 0.0.0.0
|
||||||
|
|
||||||
# Electron dev
|
# Electron dev
|
||||||
(cd electron && npm install)
|
(cd electron && npm install)
|
||||||
@@ -44,11 +46,14 @@ GOOS=darwin GOARCH=amd64 go build -o fetch-darwin-amd64 .
|
|||||||
Single binary (`fetch`) with subcommands. No external Go dependencies — pure stdlib.
|
Single binary (`fetch`) with subcommands. No external Go dependencies — pure stdlib.
|
||||||
|
|
||||||
```
|
```
|
||||||
main.go CLI entry, commands (search/list/download/extract/pipeline)
|
main.go CLI entry, commands (search/list/download/extract/pipeline/serve)
|
||||||
serve.go HTTP server + REST API + embedded web UI (embed.FS)
|
serve.go HTTP server + REST API + embedded web UI (embed.FS)
|
||||||
web/ui/ Static frontend (index.html, style.css, app.js)
|
web/ui/ Static frontend (index.html, style.css, app.js)
|
||||||
electron/ Electron wrapper shell
|
electron/ Electron wrapper shell
|
||||||
scripts/ Bash helpers called via exec
|
scripts/ Bash helpers called via exec
|
||||||
|
├── extract_wavs.sh batch WAV extraction via akaiutil
|
||||||
|
├── check-toolchain.sh verify gcc, brew, mise, go, node
|
||||||
|
└── check-docker-toolchain.sh verify docker, compose, colima
|
||||||
third_party/ Vendored akaiutil C binary (GPLv2)
|
third_party/ Vendored akaiutil C binary (GPLv2)
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -61,6 +66,7 @@ third_party/ Vendored akaiutil C binary (GPLv2)
|
|||||||
- **Script discovery**: `serve.go:findScript()` — tries multiple candidate paths, fallback chain
|
- **Script discovery**: `serve.go:findScript()` — tries multiple candidate paths, fallback chain
|
||||||
- **Zero-deps web UI**: vanilla JS, no bundler, no framework. API calls use `fetch()` + `EventSource`
|
- **Zero-deps web UI**: vanilla JS, no bundler, no framework. API calls use `fetch()` + `EventSource`
|
||||||
- **Embed directive**: `//go:embed web/ui/*` in `serve.go` — frontend baked into the binary
|
- **Embed directive**: `//go:embed web/ui/*` in `serve.go` — frontend baked into the binary
|
||||||
|
- **Bind address handling**: `serve.go:37` — `--host` flag defaults to `127.0.0.1` for local dev; set `--host 0.0.0.0` for Docker. When binding to `0.0.0.0`, prints both `localhost` and `<host-ip>` URLs for clarity.
|
||||||
|
|
||||||
### akaiutil integration
|
### akaiutil integration
|
||||||
|
|
||||||
@@ -72,6 +78,10 @@ third_party/ Vendored akaiutil C binary (GPLv2)
|
|||||||
|
|
||||||
All akaiutil calls use `-r` (read-only) flag. Write operations (S900 compress, partitioning, tagging) require removing `-r`.
|
All akaiutil calls use `-r` (read-only) flag. Write operations (S900 compress, partitioning, tagging) require removing `-r`.
|
||||||
|
|
||||||
|
### macOS compatibility
|
||||||
|
|
||||||
|
- `third_party/akaiutil/commoninclude.h` has `bcopy`/`bzero` declarations guarded with `#ifdef _VISUALCPC` to avoid conflicts with macOS system headers that define these in `<strings.h>`.
|
||||||
|
|
||||||
### Electron integration
|
### Electron integration
|
||||||
|
|
||||||
`electron/main.js` spawns the Go binary in `serve` mode:
|
`electron/main.js` spawns the Go binary in `serve` mode:
|
||||||
|
|||||||
@@ -15,9 +15,16 @@ mise install # installs go 1.26, node 22
|
|||||||
mise run build # → ./fetch
|
mise run build # → ./fetch
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Toolchain check
|
||||||
|
```bash
|
||||||
|
mise run check-all # checks gcc, brew, mise, go, node, docker, colima
|
||||||
|
mise run check-toolchain # core tools only
|
||||||
|
mise run check-docker-toolchain # docker + compose + colima (macOS)
|
||||||
|
```
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
```bash
|
```bash
|
||||||
docker compose up --build
|
mise run docker-up
|
||||||
# Open http://localhost:8080
|
# Open http://localhost:8080
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -27,9 +34,13 @@ docker compose up --build
|
|||||||
mise run build
|
mise run build
|
||||||
./fetch search --filter vocal
|
./fetch search --filter vocal
|
||||||
|
|
||||||
# Web server
|
# Web server (local)
|
||||||
mise run serve
|
mise run serve
|
||||||
# Open http://localhost:8080
|
# Open http://localhost:PORT (auto-assigned)
|
||||||
|
|
||||||
|
# Web server (Docker / network-accessible)
|
||||||
|
./fetch serve --host 0.0.0.0 -p 8080
|
||||||
|
# Open http://<host-ip>:8080
|
||||||
|
|
||||||
# Electron (macOS)
|
# Electron (macOS)
|
||||||
mise run electron-deps
|
mise run electron-deps
|
||||||
@@ -61,18 +72,22 @@ electron/ Electron wrapper (spawns fetch serve as sidecar)
|
|||||||
├── preload.js context bridge
|
├── preload.js context bridge
|
||||||
└── package.json electron-builder config
|
└── package.json electron-builder config
|
||||||
|
|
||||||
|
scripts/
|
||||||
|
├── extract_wavs.sh batch WAV extraction via akaiutil
|
||||||
|
├── check-toolchain.sh verify gcc, brew, mise, go, node
|
||||||
|
└── check-docker-toolchain.sh verify docker, compose, colima
|
||||||
|
|
||||||
third_party/akaiutil/ Vendored akaiutil 4.6.7 (C, GPLv2)
|
third_party/akaiutil/ Vendored akaiutil 4.6.7 (C, GPLv2)
|
||||||
scripts/extract_wavs.sh Bash wrapper for batch WAV extraction
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Tech Stack
|
## Tech Stack
|
||||||
|
|
||||||
| Component | Tech | External Deps |
|
| Component | Tech | External Deps |
|
||||||
|-------------|--------------------|---------------|
|
|-------------|--------------------|---------------|
|
||||||
| CLI server | Go 1.26, stdlib | 0 |
|
| CLI server | Go 1.26, stdlib | 0 |
|
||||||
| Web UI | HTML/CSS/JS (vanilla) | 0 |
|
| Web UI | HTML/CSS/JS (vanilla) | 0 |
|
||||||
| Electron | Electron 33, electron-builder | Node deps |
|
| Electron | Electron 33, electron-builder | Node deps |
|
||||||
| Extraction | akaiutil (C), bash | vendored |
|
| Extraction | akaiutil (C), bash | vendored C source |
|
||||||
|
|
||||||
Zero Go dependencies. The web UI uses no framework — vanilla JS, Web Audio API, Server-Sent Events.
|
Zero Go dependencies. The web UI uses no framework — vanilla JS, Web Audio API, Server-Sent Events.
|
||||||
|
|
||||||
@@ -84,6 +99,7 @@ See [open issues](https://git.notsosm.art/david/akai-utils/issues).
|
|||||||
|---|---------|--------|
|
|---|---------|--------|
|
||||||
| — | Search, download, extract, pipeline (CLI) | done |
|
| — | Search, download, extract, pipeline (CLI) | done |
|
||||||
| — | HTTP server + web UI + Electron shell | done |
|
| — | HTTP server + web UI + Electron shell | done |
|
||||||
|
| — | Docker compose + mise toolchain + toolchain checks | done |
|
||||||
| #1 | Disk Browser — browse AKAI filesystem in web UI | todo |
|
| #1 | Disk Browser — browse AKAI filesystem in web UI | todo |
|
||||||
| #2 | Disk Inspector — detailed disk metadata | todo |
|
| #2 | Disk Inspector — detailed disk metadata | todo |
|
||||||
| #3 | WAV→Disk Packager — create AKAI ISOs from WAVs | todo |
|
| #3 | WAV→Disk Packager — create AKAI ISOs from WAVs | todo |
|
||||||
|
|||||||
Reference in New Issue
Block a user