npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@oldskultxo/cce

v1.0.0

Published

Codex Context Engine CLI runtime layer for Codex CLI

Downloads

118

Readme

cce — Codex with adaptive context

Codex is powerful.

But it forgets everything between runs.

cce is an experiment to fix that.

It is designed to reduce wasted context, reuse memory across runs, and make Codex workflows more consistent inside a real repository.

Why cce

Codex is powerful, but raw Codex usage is still mostly stateless:

  • you repeat repository context
  • you lose previous decisions between runs
  • you oversend context for simple tasks
  • you undersend context for complex tasks

cce adds:

  • adaptive context selection: direct, light, full
  • cheap-first escalation when low-context execution is insufficient
  • persistent repository memory
  • path-aware memory retrieval
  • project facts detection
  • failure-aware retry behavior
  • context telemetry and learning
  • automatic model routing by task/context level
  • knowledge mods in .codex_context_engine/library/
  • communication modes including caveman

What you get

  • less manual prompt setup
  • less repeated repository context
  • better reuse of prior work
  • safer long-running Codex executions
  • project-local runtime scaffolding

Positioning

cce is not a replacement for Codex.

It is a runtime layer for Codex:

  • Codex still does the execution
  • cce decides how much context to send
  • cce stores reusable memory and runtime state

Install

npm install -g @oldskultxo/cce
npm install -g @openai/codex

First-time setup

cd /path/to/your/project
cce init
cce auth login
cce auth status

Then run:

cce run "inspect the auth flow and suggest improvements"

Quick examples

Run a task:

cce run "implement JWT middleware and update login route"

Run from a prompt file:

cce run @prompt.md

Ask for a plan:

cce plan "design a migration plan for the settings API"

Force minimal context:

cce run --context direct "explain this regex"

Force full engine context:

cce run --context full @roadmap.md

Inspect runtime health:

cce doctor

Core concepts

1. Adaptive context

cce chooses one of:

  • direct — near-raw prompt, minimal overhead
  • light — compact packet, small memory slice
  • full — full engine packet, project facts, selected memory, mods

This is the main mechanism for reducing token waste.

When auto is enabled, cce can start cheaper and escalate only if the task clearly needs more context.

2. Persistent memory

cce stores reusable execution history, facts, and failure patterns in repository-local runtime folders.

This lets later runs reuse signal instead of rebuilding everything from scratch.

3. Project facts

cce detects stack, package manager, important files, source folders, test folders, and entry points.

These facts are only injected when they are likely to help.

4. Mods

Reusable knowledge lives in:

.codex_context_engine/library/mods/<mod_name>/

Use mods to organize domain-specific instructions, references, and patterns.

5. Communication modes

Communication mode affects how results are communicated, not the reasoning goal.

Modes:

  • normal
  • caveman_lite
  • caveman_full
  • caveman_ultra

Runtime scaffold

cce init creates and repairs a local runtime scaffold such as:

.codex_context_engine/
  config.json
  state.json
  tmp/
  rules/
  memory/
  planner/
  cost/
  task_memory/
  failure_memory/
  memory_graph/
  metrics/
  global_metrics/
  library/
  AGENTS.md
  CONTEXT_SAVINGS.md

These are runtime artifacts and should stay out of version control.

Documentation

Detailed command usage lives under docs/.

Getting started

Command reference

Current status

cce is usable now, but it should still be considered an evolving product.

This is an early version but it already provides:

  • a publishable package shape
  • adaptive context routing
  • repository-local memory
  • safer execution controls
  • structured command help and docs

The next level is proving optimization with hard measurements across real workloads.

  • deeper retrieval
  • better mod usage
  • stronger planning layer

Feedback is very welcome.

Contributing

Contributions welcome.

Focus areas:

  • savings reports
  • optimization strategies
  • failure handling improvements
  • evolving features
  • comments