An open API service indexing awesome lists of open source software.

https://github.com/ck3mp3r/context

Task management and knowledge tracking system with git-based sync, built for AI-assisted workflows
https://github.com/ck3mp3r/context

ai-agents leptos mcp rest-api rust self-hosted sqlite task-management wasm websocket

Last synced: 4 months ago
JSON representation

Task management and knowledge tracking system with git-based sync, built for AI-assisted workflows

Awesome Lists containing this project

README

          

# context (c5t)

> **⚠️ EXPERIMENTAL**: This project is under active development and subject to breaking changes. Database schema, API endpoints, and CLI commands may change without notice. Use at your own risk.

Task management and knowledge tracking system with git-based sync, built for AI-assisted workflows.

**AI Agent Workflows:** Designed for autonomous AI agents to create persistent, multi-step workflows using session notes and task lists that survive context compaction and session boundaries. See [Agent-Based Workflows](docs/mcp.md#agent-based-workflows) for patterns and examples.

## Features

- **Projects & Task Lists** - Organize work hierarchically with M:N relationships
- **Tasks** - Track work with status, priority, subtasks, and timestamps
- **Notes** - Full-text searchable knowledge base with tags and project links
- **Skills** - Reusable agent instructions and capabilities with full-text search
- **Session Notes** - Persistent state for AI agents that survives context compaction
- **Agent Workflows** - Autonomous multi-step workflows with task tracking and state recovery
- **Real-time Updates** - WebSocket-based live sync between CLI/MCP and Web UI
- **Git Sync** - JSONL-based sync via git for cross-machine collaboration
- **MCP Server** - Model Context Protocol integration for AI agents (remote HTTP/SSE)
- **REST API** - HTTP API with OpenAPI documentation
- **Web UI** - Leptos-based WASM frontend embedded in single binary
- **SQLite Storage** - Local-first with optional sync

## Quick Start

**Install:**
```sh
# Homebrew (macOS/Linux)
brew tap ck3mp3r/context
brew install ck3mp3r/context/context

# Or Nix
nix profile install github:ck3mp3r/context

# Or Docker
docker run -d -p 3737:3737 -v ~/.local/share/c5t:/data ghcr.io/ck3mp3r/context:latest
```

See [User Guide](docs/user-guide.md#installation) for detailed installation instructions.

**Run the API server (includes Web UI, REST API, and MCP server):**

```sh
c5t api
```

Then access:
- **Web UI**: http://localhost:3737/ (real-time updates via WebSocket)
- **REST API**: http://localhost:3737/api/v1/*
- **OpenAPI Docs**: http://localhost:3737/docs
- **MCP Server**: http://localhost:3737/mcp
- **WebSocket**: ws://localhost:3737/ws (automatic connection from Web UI)

**Real-time Updates**: Changes made via CLI, REST API, or MCP tools instantly appear in the Web UI without refresh. The connection status indicator (left edge of header) shows WebSocket state.

**Git Sync** - Sync your data across machines using a private git repository:

```sh
# 1. Create private git repo (GitHub example)
gh repo create c5t-sync --private

# 2. Initialize sync
c5t sync init git@github.com:username/c5t-sync.git

# 3. Export your data (run daily or when done working)
c5t sync export -m "End of day sync"

# 4. On another machine: import data
c5t sync import

# 5. Check sync status anytime
c5t sync status
```

**Multi-machine workflow:**
```sh
# Machine A (end of day)
c5t sync export -m "Updated project tasks"

# Machine B (start of day)
c5t sync import # Pull changes from Machine A
# ... work on tasks ...
c5t sync export # Push changes back

# Machine A (next day)
c5t sync import # Pull changes from Machine B
```

See [Sync Guide](docs/sync.md) for SSH setup, conflict resolution, and troubleshooting.

## Container Deployment

Run c5t in a container using pre-built multi-arch images from GitHub Container Registry:

```sh
# Pull latest image (supports amd64 and arm64)
docker pull ghcr.io/ck3mp3r/context:latest

# Run with persistent data volume
docker run -d \
-p 3737:3737 \
-v ~/.local/share/c5t:/data \
--name c5t \
--restart unless-stopped \
ghcr.io/ck3mp3r/context:latest
```

Access the Web UI at http://localhost:3737

**Available tags:**
- `latest` - Latest release (multi-arch manifest)
- `0.2.0` - Specific version (multi-arch manifest)
- `0.2.0-amd64` - x86_64-linux specific
- `0.2.0-arm64` - aarch64-linux specific

**Volume mounts:**
- `/data` - Required for database persistence (maps to `~/.local/share/c5t`)

**Environment variables:**
- `PORT=3737` - API server port
- `TZ=UTC` - Timezone

**Notes:**
- Container size: ~150MB (includes git for sync support)
- Base c5t binary: ~23MB
- Custom minimal git: ~126MB (stripped of docs, perl, python, GUI tools)
- Images built from static musl binaries for minimal attack surface

**docker-compose.yml example:**

```yaml
services:
c5t:
image: ghcr.io/ck3mp3r/context:latest
ports:
- "3737:3737"
volumes:
- ~/.local/share/c5t:/data
environment:
- TZ=UTC
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3737/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
```

**Git sync in containers:** Mount `~/.ssh:/data/.ssh:ro` (SSH) or use Personal Access Token in URL (HTTPS). See [Sync Guide - Container Deployments](docs/sync.md#container-deployments).

**Note**: Health check runs from Docker host (requires curl on host), checking `http://localhost:3737/health`

## Documentation

- **[User Guide](docs/user-guide.md)** - Complete guide for end users
- [Development Guide](docs/development.md) - Setup, building, testing
- [API Reference](docs/api.md) - REST API endpoints
- [MCP Tools](docs/mcp.md) - Model Context Protocol tools
- [Frontend Architecture](docs/frontend.md) - Leptos WASM UI & build process
- [Database Schema](docs/schema.md) - SQLite schema and migrations
- [Sync Guide](docs/sync.md) - Git-based cross-machine synchronization

## Architecture

**Single unified binary** (`c5t`) with embedded WASM frontend.

The `c5t api` command serves:
- **Web UI** at `/` (Leptos WASM SPA, embedded in binary)
- **REST API** at `/api/v1/*` (Axum handlers)
- **WebSocket** at `/ws` (real-time updates)
- **MCP Server** at `/mcp` (Model Context Protocol)
- **OpenAPI Docs** at `/docs` (Swagger UI)

## License

GPL v2 - See [LICENSE](LICENSE) file for details.