Use tc sql when your app stores structured data in a TinyCloud space and you want SQLite semantics from the terminal.
Core commands
Targeting
--db picks the database name inside the current space. --space targets a different owned space.
Parameters
Pass bind parameters as a JSON array.
Outputs
query prints a table in the terminal and JSON with --json
execute returns changes and lastInsertRowId
export writes a .db file locally
copy moves rows between databases and can run as a dry run
Practical order
- Create or host the target space
- Run
tc sql execute to materialize the schema
- Query with
tc sql query
- Export only when you need a local copy
If a SQL command fails because the target space is not hosted, host the owned space first and retry the command.