Documentation

Redis and SQLite databases on demand

Quick Start

1. Create a database

Log in to cinchdb.dev, navigate to your project environment, and create a database.

2. Generate credentials

Click "Generate Token" on your database page. Copy the password.

3. Connect

redis-cli -h tcp.cinchdb.dev -p 6379
AUTH cinch <your-password>
PING

Core Concepts

Organization
Team workspace. Contains projects.
Project
Application or service (e.g., "api", "web"). Contains environments.
Environment
Isolated instance (production, staging, dev). Contains databases.
Database
Redis-compatible cache or SQLite database. One or more per environment.

Connection Examples

Python

import redis

r = redis.Redis(
    host='tcp.cinchdb.dev',
    port=6379,
    password='cinch_abc123...',
    decode_responses=True
)

r.set('key', 'value')
print(r.get('key'))  # 'value'

Node.js

import { createClient } from 'redis'

const client = createClient({
  socket: {
    host: 'tcp.cinchdb.dev',
    port: 6379
  },
  password: 'cinch_abc123...'
})

await client.connect()
await client.set('key', 'value')
const value = await client.get('key')  // 'value'

Connection String

redis://:cinch_abc123...@tcp.cinchdb.dev:6379

HTTP API (Serverless/Edge)

For serverless functions and edge environments that can't maintain persistent TCP connections.

# Using curl
curl -X POST https://http.cinchdb.dev/execute \
  -H "Authorization: Bearer cinch_abc123..." \
  -H "Content-Type: application/json" \
  -d '{"command": "SET", "args": ["key", "value"]}'

# Response: {"result": "OK"}

curl -X POST https://http.cinchdb.dev/execute \
  -H "Authorization: Bearer cinch_abc123..." \
  -H "Content-Type: application/json" \
  -d '{"command": "GET", "args": ["key"]}'

# Response: {"result": "value"}

JavaScript Fetch

async function redis(command, ...args) {
  const res = await fetch('https://http.cinchdb.dev/execute', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer cinch_abc123...',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ command, args })
  })
  const data = await res.json()
  return data.result
}

await redis('SET', 'key', 'value')  // 'OK'
await redis('GET', 'key')           // 'value'

Key Features

  • Auto-stop after idle (configurable timeout)
  • Per-environment isolation
  • Fork environments with data
  • Standard Redis protocol (600+ commands)
  • Full-text search (FTS5)
  • Query history and time-travel

API Reference

REST API for programmatic access. Authenticate with API key from your account settings.

Authentication

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.cinchdb.dev/users/me

List Databases

GET /orgs/:org/projects/:proj/environments/:env/databases

Create Database

POST /orgs/:org/projects/:proj/environments/:env/databases
Body: { "name": "my-database" }

Generate Token

POST /orgs/:org/projects/:proj/environments/:env/databases/:id/token
Response: { "password": "cinch_abc123..." }

Get Connection Info

GET /orgs/:org/projects/:proj/environments/:env/databases/:id/connection
Response: {
  "host": "tcp.cinchdb.dev",
  "port": 6379,
  "password": "cinch_abc123...",
  "redis_url": "redis://..."
}

Support

Questions or issues? Email support@cinchdb.dev