Skip to main content

CLI Commands

Global flags

  • --help
  • --json to switch from compact plain text to raw JSON
  • --api-base-url <url>

Auth

nylio login
nylio login --print-url
nylio auth status
nylio whoami
nylio logout

Workspaces

nylio workspaces list

Documents

Create a personal document:
nylio documents create --title "Draft"
nylio documents create --title "Draft" --markdown "# Draft"
cat body.md | nylio documents create --title "Draft" --stdin
List documents:
nylio documents list --limit 10
nylio documents list --workspace-scope personal
nylio documents list --workspace-slug my-workspace --limit 25
Fetch a document by id or Nylio URL:
nylio documents get doc_123
nylio documents get https://app.nylio.app/app/doc/doc_123
Apply one exact string replacement to a personal document:
nylio documents edit doc_123 "Old heading" "New heading"
nylio documents edit --document doc_123 --old-string "Old heading" --new-string "New heading"
printf 'New heading' | nylio documents edit --document doc_123 --old-string "Old heading" --new-string-stdin
Preview a write without sending it:
nylio documents edit --document doc_123 --old-string "Old heading" --new-string "New heading" --dry-run
Replace the full enhanced markdown body:
nylio documents replace doc_123 "# New title"
nylio documents replace --document doc_123 --stdin < body.md
cat body.md | nylio documents replace --document doc_123 --stdin
Preview a full replace without sending it:
nylio documents replace --document doc_123 --stdin --dry-run < body.md
Export one document:
nylio documents export doc_123 --format markdown
nylio documents export doc_123 --format pdf --output ./draft.pdf
nylio documents export doc_123 --format docx
nylio search "project plan"
nylio search "quarterly review" --workspace-slug my-workspace --limit 5

Write-safety rules

  • documents edit performs one replacement per call
  • documents edit supports at most one stdin-backed field per invocation
  • Write commands are scoped to personal documents owned by the authenticated user
  • documents replace expects Nylio enhanced markdown, not plain rich-text HTML