ToollessToolless

CLI Overview

Command-line interface for Toolless

The Toolless CLI provides powerful commands to interact with your databases directly from the terminal.

Installation

Install globally for CLI access:

Terminal
npm install -g toollessdb

Available Commands

CommandAliasDescription
listlsList databases and collections
queryqQuery documents
insertiInsert a document
updateuUpdate documents
deletedDelete documents
export-Export collection to JSON
import-Import JSON into collection
compact-Compact collection files
drop-Drop a collection
index-Manage indexes
stats-Show database statistics
shellshInteractive REPL
studio-Launch web UI

Global Options

All commands support these options:

OptionDescriptionDefault
-p, --pathPath to database directory./data
--helpShow command help-

Database Directory

The CLI uses ./data as the default database directory — always relative to your current working directory. This is a fixed convention with no configuration file needed.

Terminal
# Run from your project root (where ./data lives)
toollessdb list           # lists databases in ./data
toollessdb query mydb users   # reads from ./data/mydb

# Override with --path for a custom location
toollessdb query mydb users -p /custom/path

Always run CLI commands from the directory that contains your ./data folder. The CLI does not walk up parent directories to find databases.

Quick Examples

Terminal
# List all databases
toollessdb list

# Query users collection
toollessdb query myapp users -f '{"active": true}'

# Insert a document
toollessdb insert myapp users '{"name": "Alice", "email": "alice@example.com"}'

# Update documents
toollessdb update myapp users '{"name": "Alice"}' '{"$set": {"verified": true}}'

# Delete documents
toollessdb delete myapp users '{"inactive": true}' --many

# Launch studio
toollessdb studio ./data

# Interactive shell
toollessdb shell -d myapp

Use toollessdb <command> --help to see detailed options for any command.

On this page