cxthub-cli

module
v0.0.0-...-eeaec4b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: Apache-2.0

README

cxt CLI

The cxt command-line client for portable coding-agent context.

This public repository, wnsdy95/cxthub-cli, is a generated distribution of the public CXTHub monorepo. That monorepo is the only source of truth. Each export is an allowlisted snapshot of one exact source commit, without source Git history. .cxthub-source.json records its source commit and per-file provenance. Do not edit this mirror or open implementation pull requests here: changes, reviews, and fixes belong in the monorepo contribution flow.

Build from source first

Use the Go version declared in go.mod (Go 1.26.9 or later), Git, and Python 3 for the batched tests. The module is github.com/wnsdy95/cxthub-cli at this repository's root; the executable is named cxt.

git clone https://github.com/wnsdy95/cxthub-cli.git
cd cxthub-cli
go build -o bin/cxt ./cmd/cxt
./bin/cxt --help

For a reproducible build, check out the exported commit recorded in the verified release set before building. This README does not assert that binary releases already exist in this repository. No installer is exported here for bootstrap; use the source build until a target release is explicitly published. The existing monorepo installer, download URLs, and release workflow remain unchanged for compatibility; see the existing installation instructions.

Checks

Run from this repository's root:

go build ./...
go vet ./...
go test $(go list ./... | grep -v '/internal/adapters/delivery/cli$')
python3 scripts/test-go-batches.py ./internal/adapters/delivery/cli/

CI runs ordinary tests for the other CLI packages and bounded serial batches for the delivery/CLI package. The export includes docs/CLI.md, integrations/** including tracked dotfiles, schemas/cir.schema.json, schemas/testdata/**, and scripts/test-go-batches.py at their root-relative paths. The CLI reference and integration assets are required by help and integration tests; they are not optional packaging extras.

The export does not include the backend or frontend. Cross-module parity checks and full-stack integration tests run in the monorepo, not this CI. Successful build/vet or focused tests are not a full-suite pass; all required CI must still complete successfully. A green mirror build does not replace monorepo checks or authorize a deployment.

Releases and ownership

goreleaser.yaml and the manually dispatched release workflow are preparation for future releases. Maintainers must first verify the complete four-repository release set and green CI, then cut a new immutable vX.Y.Z tag from exported main. Dispatch the release workflow from main with that tag. It rejects tags outside exported main and existing releases. Never move or replace a published tag; publish a new patch version instead. No cloud deployment runs here.

See the source distribution runbook for provenance, synchronization, and release-set verification. Shared LICENSE, NOTICE, and third-party notices are exported from the monorepo.

Directories

Path Synopsis
cmd
cxt command
Package main is the entry point for the cxt client binary.
Package main is the entry point for the cxt client binary.
internal
adapters/agenttokens
Package agenttokens counts CXTHub-owned plain text locally.
Package agenttokens counts CXTHub-owned plain text locally.
adapters/authcfg
Package authcfg stores CLI login tokens — compatible with git credential store.
Package authcfg stores CLI login tokens — compatible with git credential store.
adapters/backendclient
Package backendclient implements the REST client for the RemoteSync outbound port.
Package backendclient implements the REST client for the RemoteSync outbound port.
adapters/boundary
Package boundary handles context transition boundaries (.cxt/boundary.json) recording, isolation, and execution.
Package boundary handles context transition boundaries (.cxt/boundary.json) recording, isolation, and execution.
adapters/branchjournal
Package branchjournal records Git operations outside the disposable .cxt replica.
Package branchjournal records Git operations outside the disposable .cxt replica.
adapters/capture
Package capture contains the concrete implementation of the CaptureSource outbound port.
Package capture contains the concrete implementation of the CaptureSource outbound port.
adapters/capturejournal
Package capturejournal stores capture recovery decisions independently of the original attempts.
Package capturejournal stores capture recovery decisions independently of the original attempts.
adapters/chunkcas
Package chunkcas is the single source of truth for session doc chunk CAS decomposition/reassembly rules.
Package chunkcas is the single source of truth for session doc chunk CAS decomposition/reassembly rules.
adapters/codec
Package codec — cir.go: CIR-related internal utilities (shared logic for two codecs).
Package codec — cir.go: CIR-related internal utilities (shared logic for two codecs).
adapters/delivery
Package delivery contains the driving adapters for the cxt client.
Package delivery contains the driving adapters for the cxt client.
adapters/delivery/cli
agent_wrapper.go — Agent CLI Wrapper (default execution path): cxt claude / cxt codex.
agent_wrapper.go — Agent CLI Wrapper (default execution path): cxt claude / cxt codex.
adapters/delivery/hook
Package hook contains the hook event handlers for the cxt hook subcommand (domain model, capture path).
Package hook contains the hook event handlers for the cxt hook subcommand (domain model, capture path).
adapters/delivery/mcp
Package mcp contains the stdio MCP server driver (domain model — read-only redefinition as of 2026-07-09).
Package mcp contains the stdio MCP server driver (domain model — read-only redefinition as of 2026-07-09).
adapters/gitctx
Package gitctx contains the concrete implementation of the GitContext outbound port.
Package gitctx contains the concrete implementation of the GitContext outbound port.
adapters/githooks
Package githooks connects cxt to git hooks — "using git means cxt follows along".
Package githooks connects cxt to git hooks — "using git means cxt follows along".
adapters/memory
Package memory contains adapters for native-memory ingestion, injection, and deterministic self-distillation (compatibility rules).
Package memory contains adapters for native-memory ingestion, injection, and deterministic self-distillation (compatibility rules).
adapters/nativeclaude
Package nativeclaude owns a versioned, local Claude stream-JSON process.
Package nativeclaude owns a versioned, local Claude stream-JSON process.
adapters/nativecodex
Package nativecodex implements the local app-server protocol boundary.
Package nativecodex implements the local app-server protocol boundary.
adapters/providerfs
ledger.go — Session ledger (.cxt/session-ledger.json): Adjusting the assumption that "active session = latest mtime".
ledger.go — Session ledger (.cxt/session-ledger.json): Adjusting the assumption that "active session = latest mtime".
adapters/remotecfg
Package remotecfg implements git's remote concept.
Package remotecfg implements git's remote concept.
adapters/secretscrypto
Package secretscrypto — .cxtsecrets end-to-end encryption (WebCrypto and byte-compatible).
Package secretscrypto — .cxtsecrets end-to-end encryption (WebCrypto and byte-compatible).
adapters/session
Package session materializes encoded CIR output as native target-provider session files (compatibility rules).
Package session materializes encoded CIR output as native target-provider session files (compatibility rules).
adapters/sessionnotice
Package sessionnotice reads a worktree selection for identifier-only hook delivery.
Package sessionnotice reads a worktree selection for identifier-only hook delivery.
adapters/storage
Package storage contains the implementation of a content-addressed local file store for the SessionStore outbound port.
Package storage contains the implementation of a content-addressed local file store for the SessionStore outbound port.
app
Package app contains the implementation of use-case services.
Package app contains the implementation of use-case services.
domain
Package domain contains the core domain entities, value objects, and invariants of cxt.
Package domain contains the core domain entities, value objects, and invariants of cxt.
ports/inbound
Package inbound declares the cxt entry (inbound) port interfaces and DTOs.
Package inbound declares the cxt entry (inbound) port interfaces and DTOs.
ports/outbound
Package outbound declares the driven(outbound) port interface of cxt.
Package outbound declares the driven(outbound) port interface of cxt.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL