/install aipexbase-cli
AiPexBase CLI Skill
About AiPexBase
AiPexBase is a BaaS (Backend as a Service) platform that provides database, authentication, file storage, and other backend capabilities.
GitHub: https://github.com/kuafuai/aipexbase
Prerequisites:
- Deployed AiPexBase service (to get baseUrl)
- API Key (obtained from service admin dashboard)
- Installed aipexbase-cli:
npm install -g aipexbase-cli
Core command format:
baas -c \x3Cconfig-file> \x3Ccommand> [options]
Important: All commands must use the -c parameter to specify the configuration file!
Configuration File
Must create configuration file first (even an empty file is fine):
echo '{}' > config.json
- Configuration can be filled or updated through the
configcommand.
Command Reference
1. Configuration Management
# Set configuration
baas -c config.json config --base-url "http://localhost:8080" --api-key "your-api-key"
# View configuration
baas -c config.json config --show
2. Database Operations
Query:
# Query all
baas -c config.json db list \x3Ctable>
# Equal query
baas -c config.json db list \x3Ctable> --where '{"status": "active"}'
# Comparison query
baas -c config.json db list \x3Ctable> --where '{"price": {"gt": 100}}'
# Multiple conditions
baas -c config.json db list \x3Ctable> --where '{"price": {"gte": 100, "lte": 1000}, "status": "active"}'
# Pagination
baas -c config.json db page \x3Ctable> --page-num 1 --page-size 20
# Sorting
baas -c config.json db list \x3Ctable> --order "created_at:desc"
# Single record
baas -c config.json db get \x3Ctable> --where '{"id": "rec_xxx"}'
Modify:
# Insert
baas -c config.json db insert \x3Ctable> --data '{"field1": "value1", "field2": "value2"}'
# Update
baas -c config.json db update \x3Ctable> --where '{"id": "rec_xxx"}' --data '{"field1": "new-value"}'
# Delete
baas -c config.json db delete \x3Ctable> --where '{"id": "rec_xxx"}'
where operators:
| Operator | Description | Example |
|---|---|---|
| Direct value | Equal | {"status": "active"} |
gt |
Greater than | {"price": {"gt": 100}} |
gte |
Greater than or equal | {"age": {"gte": 18}} |
lt |
Less than | {"stock": {"lt": 10}} |
lte |
Less than or equal | {"score": {"lte": 60}} |
neq |
Not equal | {"status": {"neq": "deleted"}} |
like |
Fuzzy match | {"name": {"like": "Zhang"}} |
in |
In array | {"status": {"in": ["active", "pending"]}} |
between |
Range | {"price": {"between": [100, 1000]}} |
3. Application and Table Management
# Create application
baas -c config.json manage create-app --name "App Name" --user-id "User ID"
# Create table
baas -c config.json manage create-table \
--app-id "App ID" \
--table-name "Table Name" \
--columns '[
{"columnName": "name", "columnType": "string", "columnComment": "Name"},
{"columnName": "age", "columnType": "number", "columnComment": "Age"}
]'
Field types:
| Type | Description | Type | Description |
|---|---|---|---|
string |
Short text | password |
Password (encrypted) |
text |
Long text | phone |
Phone (validated) |
number |
Integer | email |
Email (validated) |
decimal |
Decimal | images |
Images |
boolean |
Boolean | files |
Files |
date |
Date | videos |
Videos |
datetime |
Datetime | quote |
Reference |
4. User Authentication
# Login
baas -c config.json login --phone "13800138000" --code "123456"
# Logout
baas -c config.json logout
# Generate login link
baas -c config.json login-link --channel "web" --user-id "user123"
5. File Upload
baas -c config.json upload --file "/path/to/file.jpg" --table "Table Name"
Parameter Specifications
JSON Format Requirements
Rules:
- Use single quotes
'...'for outer layer - Use double quotes
"..."for inner layer - JSON must be valid
Correct examples:
✓ --data '{"name": "Zhang San", "age": 25}'
✓ --where '{"status": "active"}'
Incorrect examples:
✗ --data "{"name": "Zhang San"}" # Outer layer cannot use double quotes
✗ --data "{'name': 'Zhang San'}" # Inner layer cannot use single quotes
columns Format
[
{
"columnName": "Field Name",
"columnType": "Field Type",
"columnComment": "Field Description"
}
]
Quick Example
# 1. Create configuration file
echo '{}' > config.json
# 2. Set configuration
baas -c config.json config --base-url "http://localhost:8080" --api-key "your-key"
# 3. Create application
baas -c config.json manage create-app --name "My App" --user-id "admin"
# 4. Create table
baas -c config.json manage create-table \
--app-id "baas_xxx" \
--table-name "users" \
--columns '[{"columnName": "username", "columnType": "string", "columnComment": "Username"}]'
# 5. Insert data
baas -c config.json db insert users --data '{"username": "zhangsan"}'
# 6. Query data
baas -c config.json db list users --where '{"username": "zhangsan"}'
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install aipexbase-cli - After installation, invoke the skill by name or use
/aipexbase-cli - Provide required inputs per the skill's parameter spec and get structured output
What is aipexbase-cli?
Use aipexbase-cli to operate AiPexBase BaaS service, supporting database operations, application management, user authentication, etc. It is an AI Agent Skill for Claude Code / OpenClaw, with 176 downloads so far.
How do I install aipexbase-cli?
Run "/install aipexbase-cli" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is aipexbase-cli free?
Yes, aipexbase-cli is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does aipexbase-cli support?
aipexbase-cli is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created aipexbase-cli?
It is built and maintained by KuaFuAI (@kuafuai); the current version is v1.0.0.