Skip to content

Commit 191f72e

Browse files
authored
Merge pull request #233 from context-hub/feature/readme
update readme
2 parents aa9d513 + 04930f4 commit 191f72e

File tree

1 file changed

+73
-28
lines changed

1 file changed

+73
-28
lines changed

README.md

Lines changed: 73 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ctx: The missing link between your codebase and your LLM. Context as Code (CaC) tool with MCP server inside.
1+
# CTX: The missing link between your codebase and your LLM.
22

33
<p>
44
<a href="https://docs.ctxgithub.com/"><img alt="Docs" src="https://img.shields.io/badge/docs-green"></a>
@@ -12,43 +12,88 @@
1212

1313
## Table of Contents
1414

15-
- [How it works](#how-it-works)
1615
- [Quick Start](#quick-start)
17-
- [Full Documentation](#full-documentation)
16+
- [Full Documentation](https://docs.ctxgithub.com)
1817
- [License](#license)
1918

20-
**CTX** is a tool made to solve a big problem when chatting with LLMs like ChatGPT or Claude: **giving them enough
21-
context about your project**.
19+
During development, your codebase constantly evolves. Files are added, modified, and removed. Each time you need to
20+
continue working with an LLM, you need to regenerate context to provide updated information about your current codebase
21+
state.
2222

23-
> There is an article about Context Generator
24-
> on [Medium](https://medium.com/p/ef72df0f83d1) that explains the
25-
> motivation behind the project and the problem it solves.
23+
**CTX** helps developers organize contexts and automatically collect information from their codebase into structured
24+
documents that can be easily shared with LLM.
2625

27-
When you're using AI in development, context isn't just helpful — it's everything.
28-
Instead of manually copying or explaining your entire codebase each time, ctx automatically builds neat, organized
29-
context files from:
26+
For example, a developer describes what context they need:
3027

31-
- Code files,
32-
- GitHub and Gitlab repositories,
33-
- Git commits and diffs
34-
- Web pages (URLs) with CSS selectors,
35-
- MCP servers
36-
- and plain text.
28+
```yaml
29+
# context.yaml
30+
documents:
31+
- description: User Authentication System
32+
outputPath: auth.md
33+
sources:
34+
- type: file
35+
description: Authentication Controllers
36+
sourcePaths:
37+
- src/Auth
38+
filePattern: "*.php"
39+
40+
- type: file
41+
description: Authentication Models
42+
sourcePaths:
43+
- src/Models
44+
filePattern: "*User*.php"
45+
46+
- description: Another Document
47+
outputPath: another-document.md
48+
sources:
49+
- type: file
50+
sourcePaths:
51+
- src/SomeModule
52+
```
53+
54+
This configuration will gather all PHP files from the `src/Auth` directory and any PHP files containing "**User**" in
55+
their name from the `src/Models` directory into a single context file `.context/auth.md`. This file can then be pasted
56+
into a chat session or provided via the built-in [MCP server](https://docs.ctxgithub.com/mcp/).
57+
58+
### How it works
59+
60+
**CTX automatically builds structured context documents from:**
61+
62+
- [Code files and directories](https://docs.ctxgithub.com/sources/file-source.html)
63+
- [GitHub repositories](https://docs.ctxgithub.com/sources/github-source.html)
64+
- [Git commit changes and diffs](https://docs.ctxgithub.com/sources/git-diff-source.html)
65+
- W[eb pages (URLs) with CSS selectors](https://docs.ctxgithub.com/sources/url-source.html)
66+
- Plain text
67+
- and more!
3768

38-
It was created to solve a common problem: **efficiently providing AI language models like Claude with necessary
39-
context about your codebase.**
69+
**Process:**
4070

41-
## How it works
71+
- Collects code from specified sources
72+
- Filters files through pattern matching, content search, size, or date criteria
73+
- Applies modifiers (e.g., extracting function signatures without implementation)
74+
- Organizes content into structured markdown documents
75+
- Saves context files ready for LLM consumption
76+
- Optionally serves context through MCP server for direct AI assistant access
4277

43-
1. Gathers code from files, directories, GitHub or Gitlab repositories, web pages, or plain text.
44-
2. Targets specific files through pattern matching, content search, size, or date filters
45-
3. Applies optional modifiers (like extracting PHP signatures without implementation details)
46-
4. Organizes content into well-structured markdown documents
47-
5. Saves context files ready to be shared with LLMs
48-
6. Optionally serves context through an MCP server, allowing AI assistants like Claude to directly access project
49-
information
78+
> Here is a [Quickstart guide](https://docs.ctxgithub.com/quick-start.html) to get you started with CTX.
79+
80+
### The Problem CTX Solves
81+
82+
**Without such a tool, you would need to:**
83+
84+
- Manually search for all files that were changed
85+
- Copy their contents each time
86+
- Explain the codebase structure repeatedly
87+
- Spend significant time maintaining context consistency
88+
89+
This repetitive process becomes frustrating and can discourage continued development, as you end up doing the same
90+
context-gathering work over and over instead of writing code.
91+
92+
Since CTX describes contexts, this process becomes automated.
93+
94+
---
5095

51-
# Quick Start
96+
## Quick Start
5297

5398
Getting started with CTX is straightforward. Follow these simple steps to create your first context file.
5499

0 commit comments

Comments
 (0)