Allow droids to interact with Outline Wiki via the outlinectl CLI (auth, collections, docs) with automation-friendly JSON output.
This skill enables droids to operate an Outline Wiki instance through the included .NET CLI (Outlinectl.Cli).
Use this skill for:
For automation, prefer --json output and non-interactive commands.
This skill is environment-first. Droids should read configuration from environment variables and only pass explicit CLI options when overriding defaults.
OUTLINE_BASE_URL (recommended): Outline instance URL (e.g. https://docs.example.com)OUTLINE_API_TOKEN (recommended): Outline API tokenprofile (optional): Defaults to default (used for local config/credential store)Notes:
docs search, provide --collection-id and/or --parent-id explicitly when you need scoped results.--token-stdin when you cannot set OUTLINE_API_TOKEN safely (e.g., piping from a secret manager).OUTLINE_API_TOKEN overrides the stored token.From the repo (recommended for droids working in this workspace):
cd 1-Presentation\Outlinectl.Cli
dotnet run -- --help
Notes:
-- is passed to the CLI.--json, --quiet, --verbose.When --json is set, stdout is a single JSON envelope:
{
"ok": true,
"command": "docs.search",
"data": { },
"meta": { "durationMs": 0, "version": "1.0.0" }
}
On errors:
{
"ok": false,
"command": "docs.get",
"error": { "code": "", "message": "...", "hint": "..." },
"meta": { "durationMs": 0, "version": "1.0.0" }
}
0: Success2: Invalid input / missing required values (e.g., missing token)3: Not logged in (local status check)4: Document not found / get failed10: Unknown/unhandled error130: Cancelled (Ctrl+C)Before running any commands, the agent MUST authenticate and confirm it succeeded.
Success criteria:
0.--json is used, stdout JSON envelope has "ok": true for auth.login.Default (environment-first, non-interactive):
dotnet run --project .\1-Presentation\Outlinectl.Cli -- auth login --profile default --json
Then immediately verify local auth status:
```powershell
dotnet run --project .\1-Presentation\Outlinectl.Cli -- auth status --json
If the agent fails to authenticate, it MUST exit and inform the user that it failed to authenticate.
dotnet run --project .\1-Presentation\Outlinectl.Cli -- auth status --json
dotnet run --project .\1-Presentation\Outlinectl.Cli -- collections list --limit 50 --offset 0 --json
# Scope search to a collection (and optionally a parent document subtree).
dotnet run --project .\1-Presentation\Outlinectl.Cli -- docs search --query "policy" --collection-id "<COLLECTION_ID>" --parent-id "<PARENT_DOC_ID>" --limit 10 --offset 0 --json
Notes:
--query is required by the CLI.--collection-id and --parent-id as required inputs if you don't have these values ask the user for them.Automation / structured:
dotnet run --project .\1-Presentation\Outlinectl.Cli -- docs get --id "<DOC_ID>" --format json --json
Human-readable markdown (stdout is raw markdown text; do NOT use --json):
dotnet run --project .\1-Presentation\Outlinectl.Cli -- docs get --id "<DOC_ID>" --format markdown
From stdin (preferred for large content):
@"
# Title
Body goes here.
"@ | dotnet run --project .\\1-Presentation\\Outlinectl.Cli -- docs create --title "My Doc" --stdin --json
From file:
dotnet run --project .\1-Presentation\Outlinectl.Cli -- docs create --title "My Doc" --collection-id "<COLLECTION_ID>" --file ".\doc.md" --json
dotnet run --project .\1-Presentation\Outlinectl.Cli -- docs update --id "<DOC_ID>" --title "New Title" --file ".\updated.md" --json
Exports markdown files to a directory (optionally including descendants):
dotnet run --project .\1-Presentation\Outlinectl.Cli -- docs export "<DOC_ID>" --output-dir ".\export" --subtree --json
Use the shell only for manual exploration; avoid it for automation:
dotnet run --project .\1-Presentation\Outlinectl.Cli -- shell
Inside the shell, run commands as you would normally:
docs search --query "onboarding" --json
auth status --json
exit
