Document local CLI setup and harden live search suggestions

This commit is contained in:
master
2026-03-07 03:12:40 +02:00
parent 5e15ab15b1
commit 28932d4a85
10 changed files with 551 additions and 24 deletions

View File

@@ -312,15 +312,52 @@ docker compose -f devops/compose/docker-compose.advisoryai-knowledge-test.yml up
# Wait for health check
docker compose -f devops/compose/docker-compose.advisoryai-knowledge-test.yml ps
# Prepare sources and rebuild index
stella advisoryai sources prepare --json
stella advisoryai index rebuild --json
# Start the local AdvisoryAI service against that database
export ADVISORYAI__AdvisoryAI__KnowledgeSearch__ConnectionString="Host=localhost;Port=55432;Database=advisoryai_knowledge_test;Username=stellaops_knowledge;Password=stellaops_knowledge"
export ADVISORYAI__AdvisoryAI__KnowledgeSearch__RepositoryRoot="$(pwd)"
dotnet run --project "src/AdvisoryAI/StellaOps.AdvisoryAI.WebService/StellaOps.AdvisoryAI.WebService.csproj" --no-launch-profile
# In a second shell, rebuild the live corpus in the required order
dotnet run --project "src/Cli/StellaOps.Cli/StellaOps.Cli.csproj" -- advisoryai sources prepare --json
dotnet run --project "src/Cli/StellaOps.Cli/StellaOps.Cli.csproj" -- advisoryai index rebuild --json
curl -X POST http://127.0.0.1:10451/v1/search/index/rebuild \
-H "X-StellaOps-Scopes: advisory-ai:admin" \
-H "X-StellaOps-Tenant: test-tenant"
# Run tests with the Live category (requires database)
dotnet test "src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/StellaOps.AdvisoryAI.Tests.csproj" \
--filter "Category=Live" -v normal
```
### CLI setup in a source checkout
Do not assume `stella` is already installed on the machine running local AdvisoryAI work.
From a repository checkout, either run the CLI through `dotnet run` or publish a local binary first.
Quick references:
- Build/install note and command reference: `docs/API_CLI_REFERENCE.md`
- CLI quickstart: `docs/modules/cli/guides/quickstart.md`
Local examples:
```bash
# Run directly from source without installing to PATH
dotnet run --project "src/Cli/StellaOps.Cli/StellaOps.Cli.csproj" -- advisoryai sources prepare --json
# Publish a reusable local binary
dotnet publish "src/Cli/StellaOps.Cli/StellaOps.Cli.csproj" -c Release -o ".artifacts/stella-cli"
# Windows
.artifacts/stella-cli/StellaOps.Cli.exe advisoryai index rebuild --json
# Linux/macOS
./.artifacts/stella-cli/StellaOps.Cli advisoryai index rebuild --json
```
If the CLI is not built yet, the equivalent HTTP endpoints are:
- `POST /v1/advisory-ai/index/rebuild` for the docs/OpenAPI/Doctor corpus
- `POST /v1/search/index/rebuild` for unified overlay domains
Or use the full CI testing stack:
```bash
docker compose -f devops/compose/docker-compose.testing.yml --profile ci up -d

View File

@@ -20,6 +20,29 @@
### Installation
#### Option 0: Source Checkout (local development)
If you are working from this repository checkout, do not assume `stella` is already installed on `PATH`.
Build or run the CLI from source first.
Quick references:
- `docs/API_CLI_REFERENCE.md`
- `src/AdvisoryAI/__Tests/INFRASTRUCTURE.md`
```bash
# Run directly from source
dotnet run --project "src/Cli/StellaOps.Cli/StellaOps.Cli.csproj" -- --help
# Publish a reusable local binary
dotnet publish "src/Cli/StellaOps.Cli/StellaOps.Cli.csproj" -c Release -o ".artifacts/stella-cli"
# Windows
.artifacts/stella-cli/StellaOps.Cli.exe advisoryai index rebuild --json
# Linux/macOS
./.artifacts/stella-cli/StellaOps.Cli advisoryai index rebuild --json
```
#### Option 1: .NET Tool (Recommended)
```bash