Skip to main content

CODITECT Cloud Sync Client

Syncs local context data to CODITECT cloud backend. Supports multi-tenant, multi-user, multi-session architecture.

Authentication Methods: 1. Email/Password (default) - Uses /api/v1/auth/login/ 2. API Token - Pre-generated access token 3. License Key (future) - Auto-generates JWT from license

Configuration: ~/.coditect/config.json or $PROJECT/.coditect/config.json { "cloud": { "api_url": "https://api.coditect.ai", "email": "user@example.com", "password": "...", // or use CODITECT_PASSWORD env var "access_token": "...", // alternative: pre-generated token "tenant_id": "...", "offline_mode": false } }

Environment Variables: CODITECT_API_URL - Override API URL CODITECT_EMAIL - User email for authentication CODITECT_PASSWORD - User password (required with email) CODITECT_ACCESS_TOKEN - Pre-generated access token (alternative to email/password) CODITECT_TENANT_ID - Tenant ID CODITECT_OFFLINE - Set to "true" for offline-only mode

File: cloud_sync_client.py

Classes

CloudConfig

Cloud connection configuration.

TaskEvent

Task tracking event to sync to cloud.

CloudSyncClient

Client for syncing context data to CODITECT cloud.

Functions

main()

CLI for cloud sync operations.

sync_task(task)

Sync a task event to the cloud.

sync_tasks_batch(tasks)

Sync multiple tasks in a batch.

process_sync_queue()

Process queued events that failed to sync previously.

get_sync_status()

Get current sync status including queue depth and auth info.

test_connection()

Test connection and authentication to the cloud API.

Usage

python cloud_sync_client.py