[Beginner] CLI --queries Syntax Error & Missing list-documents in Docs (macOS/Bash)
- 0
- Self Hosted
Hi everyone! I am a beginner with Appwrite and trying to use the CLI, but I'm stuck with a syntax error. Any guidance would be greatly appreciated! 🙏
Environment:
- Appwrite CLI: v18.2.0
- Appwrite Cloud (sgp region)
- OS: macOS 26.4 (Apple M5) / Bash
My Goal & Journey:
I want to fetch the latest few records from my memory collection.
When I ran the list-documents command without any options, I only got the default 25 records out of 38. So, I figured I needed to use --queries with limit or orderDesc, but I keep hitting a Syntax error.
What I tried: I tried formatting the queries in a few different ways, but none of them worked in my Bash terminal:
- JSON array format ->
Invalid query method:appwrite databases list-documents --database-id [ID] --collection-id memory --queries '["limit(100)"]' --json - String format ->
Invalid query: Syntax errorappwrite databases list-documents --database-id [ID] --collection-id memory --queries 'limit(100)' --json - Escaping parentheses ->
Invalid query: Syntax errorappwrite databases list-documents --database-id [ID] --collection-id memory --queries limit\(100\) --json
My Questions:
- What is the exact syntax/escaping required for the
--queriesparameter in Bash to get the latest rows? - Where can I find the official documentation for this? I checked the CLI Commands page (https://appwrite.io/docs/tooling/command-line/commands), but I couldn't find the
list-documentssubcommand listed there.
Thank you in advance for your time!
Recommended threads
- [SOLVED] curl error Number: 6 — function...
Hello, I invested a lot of time in this error in a fresh install of appwrite 1.8.1 and lasted until fix, this if for helping anyone that can have the same weird...
- general_bad_request when creating accoun...
I have created a new bug request, could anyone have a look - https://github.com/appwrite/appwrite/issues/11908?
- Cannot use custom SMTP for messaging (SM...
Hey there! I'm on Appwrite Self-hosted 1.9.0. I've never used the messaging feature before, always sent emails through functions or a custom backend, but I'v...