Skip to content

[Feature Request] CLI interface for AI agent file access #59417

@amdhelper

Description

@amdhelper

Background

I use OpenClaw, an AI agent platform, and self-host Nextcloud for file storage and sync.

Problem

Nextcloud has occ (the PHP CLI) but it's server-side only. There's no lightweight CLI for external tools to query files, shares, or calendar/contacts from a client machine.

Feature Request

Add a nextcloud-cli client tool:

  1. Files

    • nextcloud-cli files list <path> — list files in a folder
    • nextcloud-cli files search <query> — search files
    • nextcloud-cli files download <remote> <local> — download file
    • nextcloud-cli files upload <local> <remote> — upload file
  2. Shares

    • nextcloud-cli shares list — list shared files/folders
    • nextcloud-cli shares create <path> --public — create public share link
  3. Calendar & Contacts

    • nextcloud-cli calendar events --date today — get today's events
    • nextcloud-cli calendar events --range 7d — get next 7 days
    • nextcloud-cli contacts search <name> — search contacts
  4. Notes & Deck

    • nextcloud-cli notes list — list Nextcloud Notes
    • nextcloud-cli deck boards — list Deck boards/cards
  5. Activity

    • nextcloud-cli activity recent --limit 20 — recent activity feed

All output as JSON for machine consumption.

Use Case

An AI agent could:

  • Search user's files when answering questions
  • Check calendar for upcoming events
  • Create notes from conversations
  • Manage file shares

This makes Nextcloud a personal cloud API for AI agents.

Implementation

  • Use Nextcloud's existing WebDAV and OCS APIs
  • Store auth token in system keyring
  • Could be a separate Python/Node package

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions