⚡ zMesh
The AI-First Backend as a Service — From Your Terminal
Database • Edge Functions • Storage • AI Gateway • Auth — One CLI.
What is zMesh?
zMesh is an AI-first Backend as a Service that gives you a full backend — PostgreSQL database, serverless edge functions, file storage, AI gateway, authentication — without writing a single line of infrastructure code.
This CLI lets you manage everything from your terminal.
pip install zmesh-cli
Quick Start
# Authenticate
zmesh login
# Create a new project
zmesh init --name "My App"
# Create a table
zmesh database query "CREATE TABLE users (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
email TEXT UNIQUE
)"
# Deploy an edge function
zmesh functions deploy ./api.js
# Upload a file
zmesh storage upload ./logo.png --path assets/logo.png
That's it. Your backend is live.
Features
Commands
Authentication & Projects
| Command | Description |
|---|---|
zmesh login |
Authenticate with email/password |
zmesh logout |
Clear stored credentials |
zmesh whoami |
Show current user & linked project |
zmesh projects |
List all your projects |
zmesh init --name "App" |
Create & link a new project |
zmesh link <project-id> |
Link to an existing project |
zmesh unlink |
Unlink current directory |
Database
| Command | Description |
|---|---|
zmesh database tables |
List all tables |
zmesh database query "<sql>" |
Execute raw SQL |
zmesh database query --file schema.sql |
Run SQL from file |
zmesh database migrate <file> |
Run a migration script |
zmesh database seed <file> |
Seed data from JSON |
Edge Functions
| Command | Description |
|---|---|
zmesh functions list |
List all deployed functions |
zmesh functions deploy <file> |
Deploy a JS or Python function |
zmesh functions invoke <slug> |
Invoke with optional --payload |
zmesh functions logs <slug> |
View invocation history |
zmesh functions delete <slug> |
Remove a function |
Deploy with options:
zmesh functions deploy ./send-email.js \
--name send-email \
--description "Transactional email sender" \
--entry-point handler \
--env SMTP_HOST=smtp.example.com \
--timeout 10000
Storage
| Command | Description |
|---|---|
zmesh storage list |
List files (with --bucket, --prefix) |
zmesh storage upload <file> |
Upload with --path and --bucket |
zmesh storage download <path> |
Download to --output |
zmesh storage delete <path> |
Remove a file |
Environment Variables
| Command | Description |
|---|---|
zmesh env --list |
List all env vars |
zmesh env --set KEY=value |
Set an env var |
zmesh env --unset KEY |
Remove an env var |
Edge Functions
zMesh's edge functions run in a custom-built sandboxed runtime — no AWS Lambda, no third-party FaaS. Each function gets isolated subprocess execution with OS-level resource limits and a pre-injected zmesh SDK with direct database access.
JavaScript
// get-users.js
exports.handler = async (payload, zmesh) => {
const users = await zmesh.db.query(
'SELECT * FROM users WHERE active = $1', [true]
);
const newLog = await zmesh.db.insert('audit_log', {
action: 'list_users',
count: users.length
});
const secret = zmesh.env.API_SECRET;
return { users, logged: true };
};
Python
# get-users.py
def handler(payload, zmesh):
users = zmesh.db.query(
"SELECT * FROM users WHERE active = %s", (True,)
)
zmesh.db.insert("audit_log", {
"action": "list_users",
"count": len(users)
})
return {"users": users}
SDK Reference
| Method | Description |
|---|---|
zmesh.db.query(sql, params) |
Execute SQL, return rows |
zmesh.db.queryOne(sql, params) |
Execute SQL, return single row |
zmesh.db.insert(table, data) |
Insert a record |
zmesh.db.select(table, where, params) |
Select with conditions |
zmesh.db.update(table, data, where, params) |
Update matching rows |
zmesh.db.remove(table, where) |
Delete matching rows |
zmesh.env.KEY |
Access environment variable |
zmesh.projectId |
Current project ID |
End-to-End Example
Build a complete blog API in under 2 minutes:
# 1. Create project
zmesh init --name "Blog API"
# 2. Create schema
zmesh database query "
CREATE TABLE posts (
id SERIAL PRIMARY KEY,
title TEXT NOT NULL,
body TEXT,
author TEXT,
created_at TIMESTAMP DEFAULT NOW()
)"
# 3. Write a function
cat > get-posts.js << 'EOF'
exports.handler = async (payload, zmesh) => {
const posts = await zmesh.db.query(
'SELECT * FROM posts ORDER BY created_at DESC LIMIT $1',
[payload.limit || 10]
);
return { posts };
};
EOF
# 4. Deploy
zmesh functions deploy ./get-posts.js
# 5. Test
zmesh functions invoke get-posts --payload '{"limit": 5}'
# 6. Call from your app
curl -X POST https://api.zmesh.in/api/functions/get-posts \
-H "x-api-key: zb_your_key" \
-H "Content-Type: application/json" \
-d '{"limit": 5}'
Configuration
| Location | Purpose |
|---|---|
~/.zmesh/config.json |
Global — API URL, auth token |
.zmesh/config.json |
Local — linked project & org |
.zmesh/.env |
Function environment variables |
Self-Hosted
zmesh login --api-url https://api.yourdomain.com/v1
Requirements
- Python 3.11+
- A zMesh account
Links
| 🌐 Website | zmesh.in |
| 📖 Docs | zmesh.in/docs |
| 🖥️ Dashboard | app.zmesh.in |
| 📧 Support | hello@zmesh.in |
Built by Zyora
MIT License
Metadata
Release files for zmesh-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zmesh_cli-0.1.0.tar.gz | 19.2 kB | Without provenance | Details for zmesh_cli-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zmesh_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for zmesh_cli-0.1.0-py3-none-any.whl |
Total release size: 39.0 kB
Release files / zmesh_cli-0.1.0.tar.gz
| Download URL | zmesh_cli-0.1.0.tar.gz |
|---|---|
| Size | 19.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c25c84eb38b4a7ced22227f2a15940c8241f6a40ec6f0dc081b59c4c3d7ea4d
|
|
BLAKE2b-256 checksum How to use checksums |
7aa866238672f2a2f8fe6bd0ad069c18622b7422e557f48fcf824ceb6207b097
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / zmesh_cli-0.1.0-py3-none-any.whl
| Download URL | zmesh_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d95374dab90359bb0e1f9bdb7de9e1951d6fda22dab5fe4a7b4c8f948306d2ba
|
|
BLAKE2b-256 checksum How to use checksums |
0997f735bb344fc0c6c15f680dd6cd2f3aebcb5bd0a04ee48db198a17a168106
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for zmesh-cli 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.