{"id":50234521,"url":"https://github.com/arach/contextual","last_synced_at":"2026-06-06T00:02:57.084Z","repository":{"id":361493151,"uuid":"1235117981","full_name":"arach/contextual","owner":"arach","description":"Hangar-themed UI for context engineering on pi.dev sessions — three-pane workshop (threads / conversation / context rack), session-forest tree, built on HudsonKit.","archived":false,"fork":false,"pushed_at":"2026-05-30T21:25:39.000Z","size":407,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-30T23:14:18.182Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arach.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-11T02:59:45.000Z","updated_at":"2026-05-11T22:57:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/arach/contextual","commit_stats":null,"previous_names":["arach/contextual"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/arach/contextual","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arach%2Fcontextual","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arach%2Fcontextual/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arach%2Fcontextual/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arach%2Fcontextual/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arach","download_url":"https://codeload.github.com/arach/contextual/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arach%2Fcontextual/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33964367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-26T19:00:32.276Z","updated_at":"2026-06-06T00:02:57.079Z","avatar_url":"https://github.com/arach.png","language":"TypeScript","funding_links":[],"categories":["Themes"],"sub_categories":[],"readme":"# Contextual\n\nA deliberately *designed* context environment for agentic engineering. Decouples conversation threads from LLM context management: every dispatch is composed fresh from a Fixed zone (pinned-every-call modules) and a Soft zone (recent turns + summaries). Statelessness is a feature.\n\n## Backends\n\nContextual is vendor-neutral. Two backends ship today:\n\n- **pi-coding-agent** — spawns the `pi` CLI (`@earendil-works/pi-coding-agent`) per dispatch. Native session tree, fork, and on-disk workspace materialization. Pick this when you want pi's rich session ergonomics.\n- **pi-ai** — in-process via `@earendil-works/pi-ai`. Stateless; every call rebuilds the full Context from Contextual's Fixed/Soft state. Multiple providers (Anthropic, OpenAI, Google, Mistral, Bedrock). Pick this when you want pure context control.\n\nToggle per-thread via the backend chip in the top bar.\n\n## Setup\n\nInstall dependencies (bun is required):\n\n```bash\nbun install\n```\n\nFor the **pi-coding-agent** backend, install pi globally:\n\n```bash\nnpm install -g @earendil-works/pi-coding-agent\npi login   # OAuth or API key, your choice\n```\n\nFor the **pi-ai** backend, you'll need an `ANTHROPIC_API_KEY` (or the corresponding key for whichever provider you select). Storage is handled by the `secret` CLI on this machine — never in a `.env` file:\n\n```bash\nsecret set ANTHROPIC_API_KEY     # prompts for the value\n```\n\n## Run\n\nStart the dev server with the credential injected into the child env:\n\n```bash\nsecret run ANTHROPIC_API_KEY -- bun dev\n```\n\nFor pi-coding-agent only:\n\n```bash\nbun dev\n```\n\nOpen `http://localhost:5173`.\n\n## Architecture\n\n- `src/lib/backends/types.ts` — Backend interface, DispatchRequest, DispatchResult\n- `src/lib/backends/pi-coding-agent.ts` — pi CLI backend (subprocess, native sessions)\n- `src/lib/backends/pi-ai.ts` — pi-ai backend (in-process, stateless)\n- `src/lib/backends/client.ts` — browser-side fetch client\n- `vite-plugin-backends.ts` — dev-server router that dispatches to the right backend\n\nContextual owns the canonical branch/tree manifest. pi-coding-agent dispatches mirror to native pi sessions at `~/.contextual/sessions/`; pi-ai dispatches are stateless and have no on-disk footprint.\n\nSee `docs/CTX-001-pi-ai-backend.md` for the design rationale.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farach%2Fcontextual","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farach%2Fcontextual","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farach%2Fcontextual/lists"}