Open-source CLI for the Nylio public API.
Related docs:
- npm package: nylio-cli
- monorepo integration note:
function/docs/nylio-cli.md
npm install -g nylio-climacOS users can also install a self-contained Bun-compiled binary via Homebrew once a tap formula is published.
nylio --help
nylio --version
nylio completion zsh
nylio documents --help
nylio login
nylio login --print-url
nylio auth status
nylio whoami
nylio mcp info
nylio mcp info --json
nylio workspaces list
nylio documents create --title "Draft"
nylio documents list --limit 10 --offset 0
nylio documents get <document-id-or-url>
nylio documents import ./draft.docx
nylio documents import ./notes.md
nylio documents import ./my-vault
nylio comments list --document <document-id-or-url>
nylio comments create --document <document-id-or-url> --text "Please clarify this section."
nylio comments reply --comment <comment-id> --text "Updated in the latest pass."
nylio comments resolve --thread <thread-id>
nylio documents edit --document <document-id-or-url> --old-string "<oldString>" --new-string "<newString>"
nylio documents edit --select --old-string "<oldString>" --new-string "<newString>"
cat replacement.txt | nylio documents edit --document <document-id-or-url> --old-string "<oldString>" --new-string-stdin
cat addition.md | nylio documents append <document-id-or-url> --stdin
cat introduction.md | nylio documents prepend <document-id-or-url> --stdin
nylio documents patch <document-id-or-url> --file changes.patch
nylio documents replace --document <document-id-or-url> --markdown "<full-enhanced-markdown-body>"
cat body.md | nylio documents replace --document <document-id-or-url> --stdin
nylio documents export <document-id-or-url> --format markdown
nylio search "query"Each command and subcommand now supports --help with targeted examples, for example:
nylio documents get --help
nylio documents replace --helpnpm run check:publish-safety
npm run lint
npm run typecheck
npm run build
npm pack --dry-runThe publish safety check fails if the CLI imports server-only code, workspace-internal aliases, or files outside src.
GitHub Actions publishes the package from the Publish CLI workflow when you push a tag in the format v<version>, for example:
git tag v0.1.0
git push origin v0.1.0That same workflow also creates a GitHub Release for the tag and uploads:
nylio-cli-<version>-darwin-arm64.tar.gznylio-cli-<version>-darwin-x64.tar.gzSHA256SUMSnylio.rbfor Homebrew
GitHub Releases are the distribution point for the self-contained macOS binaries. Homebrew should point at those release assets.
Manual local publish is also wired:
npm run publish:npmTo build the macOS release artifacts locally:
npm run release:artifacts -- --repo prodev1000/nylio-cli --tag v0.1.0That writes the archives, checksums, and a generated Homebrew formula to dist/release.
The generated nylio.rb formula is intended for a tap repo and references the GitHub Release assets for the tagged version.
Recommended setup:
- keep
npmas the cross-platform install path - publish macOS Bun binaries to GitHub Releases
- maintain a small Homebrew tap repo that contains the generated
nylio.rb
Once a tap exists, installs look like:
brew tap <owner>/<tap-repo>
brew install nylio--api-base-url <url>overrides the default API origin- default output is compact plain text
--jsonrenders machine-readable JSON outputBETTER_AUTH_URLsets the default API origin when--api-base-urlis not passedNYLIO_OAUTH_CLI_CLIENT_IDoverrides the OAuth client id for custom environments
- Unknown flags fail fast instead of being ignored.
nylio mcp info --jsonprints the hosted MCP endpoint, audience, scopes, and copyable API-key/Bearer config snippets for agents.nylio api-keys create --name <name> --scopes <csv>creates scoped public API keys for apps and agents after OAuth login, with optional metadata and per-key rate-limit settings.nylio tags listandnylio documents tags ...expose workspace tags and document tag assignment.nylio documents list --sort title_asc --kind markdown --tag <name>filters and sorts document lists.nylio documents tabs ...andnylio documents history ...wrap tab management and document version restore APIs.nylio share ...,nylio projects ...,nylio sources ..., andnylio imports ...expose the broader public app API for agents without adding custom CLI-only behavior.- Write commands accept explicit flags instead of requiring positional-only input.
nylio documents import <path>uploads a local.docx,.odt, Markdown, text, or Obsidian vault.zipfile and creates personal documents.nylio documents export <id> --format markdown --target tab.<id>exports one editable markdown target.- Passing a local directory to
nylio documents importpackages it as an Obsidian vault ZIP before upload. nylio documents replace --stdinreads the replacement body from stdin.nylio documents edit --old-string-stdinand--new-string-stdinlet you pipe one side of the edit.nylio comments create --author-mode assistantandnylio comments reply --author-mode assistantpost from the user's AI assistant label.--dry-runfetches current content and prints a readable unified diff without mutating it.--if-updated-at <timestamp>rejects edits when the latest API timestamp no longer matches.documents append,documents prepend, anddocuments patchprovide safer targeted updates.documents edit --selectopens an interactive document picker.nylio completion bash|zsh|fishgenerates shell completion scripts.
The CLI uses OAuth 2.1 Authorization Code + PKCE against the Nylio Better Auth issuer and stores user tokens locally at ~/.config/nylio/auth.json.
Use nylio login --print-url if you do not want the CLI to open a browser automatically.
MIT