ctxcode 0.2.0__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ctxcode
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Extract your codebase context for AI assistants
5
5
  Project-URL: Homepage, https://github.com/hanu-14/codecontext
6
6
  Project-URL: Repository, https://github.com/hanu-14/codecontext
@@ -28,7 +28,7 @@ Description-Content-Type: text/markdown
28
28
  <img src="https://img.shields.io/badge/python-3.9%2B-blue" alt="Python 3.9+">
29
29
  <img src="https://img.shields.io/badge/license-MIT-green" alt="MIT">
30
30
  <img src="https://img.shields.io/badge/dependencies-0-brightgreen" alt="Zero dependencies">
31
- <img src="https://img.shields.io/badge/version-0.2.0-blue" alt="v0.2.0">
31
+ <img src="https://img.shields.io/badge/version-0.2.2-blue" alt="v0.2.2">
32
32
  </p>
33
33
 
34
34
  A zero-dependency CLI tool that packages your project structure, key files, and git history into a formatted prompt for Claude, ChatGPT, and other AI coding assistants.
@@ -46,14 +46,14 @@ When asking AI assistants about your code, you spend minutes copy-pasting file t
46
46
  ## Install
47
47
 
48
48
  ```bash
49
- pip install codecontext
49
+ pip install ctxcode
50
50
  ```
51
51
 
52
52
  Or run directly:
53
53
 
54
54
  ```bash
55
- curl -O https://raw.githubusercontent.com/hanu-14/codecontext/main/src/codecontext/cli.py
56
- python cli.py
55
+ curl -O https://raw.githubusercontent.com/hanu-14/codecontext/main/src/ctxcode/cli.py
56
+ python -m ctxcode
57
57
  ```
58
58
 
59
59
  ## Usage
@@ -1,182 +1,182 @@
1
- # codecontext
2
-
3
- <p align="center">
4
- <b>Extract your codebase context for AI assistants.</b><br>
5
- <a href="https://github.com/hanu-14/codecontext/actions/workflows/ci.yml">
6
- <img src="https://github.com/hanu-14/codecontext/actions/workflows/ci.yml/badge.svg" alt="CI">
7
- </a>
8
- <img src="https://img.shields.io/badge/python-3.9%2B-blue" alt="Python 3.9+">
9
- <img src="https://img.shields.io/badge/license-MIT-green" alt="MIT">
10
- <img src="https://img.shields.io/badge/dependencies-0-brightgreen" alt="Zero dependencies">
11
- <img src="https://img.shields.io/badge/version-0.2.0-blue" alt="v0.2.0">
12
- </p>
13
-
14
- A zero-dependency CLI tool that packages your project structure, key files, and git history into a formatted prompt for Claude, ChatGPT, and other AI coding assistants.
15
-
16
- ```bash
17
- pip install ctxcode
18
- cd my-project
19
- codecontext
20
- ```
21
-
22
- ## Why?
23
-
24
- When asking AI assistants about your code, you spend minutes copy-pasting file trees, key files, and git history. `codecontext` does it in one command — giving the AI full project context for better answers.
25
-
26
- ## Install
27
-
28
- ```bash
29
- pip install codecontext
30
- ```
31
-
32
- Or run directly:
33
-
34
- ```bash
35
- curl -O https://raw.githubusercontent.com/hanu-14/codecontext/main/src/codecontext/cli.py
36
- python cli.py
37
- ```
38
-
39
- ## Usage
40
-
41
- ```bash
42
- # Full context (tree + files + git history)
43
- codecontext
44
-
45
- # Specific project
46
- codecontext path/to/project
47
-
48
- # Output formats
49
- codecontext --format markdown # default - ready for AI chat
50
- codecontext --format plain # plain text
51
- codecontext --format json # machine-readable
52
-
53
- # Copy to clipboard
54
- codecontext --clipboard
55
-
56
- # Save to file
57
- codecontext -o context.md
58
-
59
- # Exclude custom patterns
60
- codecontext --exclude "*.log" "tmp/" "*.csv"
61
-
62
- # Show hidden files
63
- codecontext --hidden
64
-
65
- # Exclude git info
66
- codecontext --no-git
67
-
68
- # Adjust limits
69
- codecontext --max-files 100 --max-lines 150
70
- ```
71
-
72
- ### Short alias
73
-
74
- ```bash
75
- ctx # same as codecontext
76
- ctx ./src # specific directory
77
- ctx --clipboard # copy to clipboard
78
- ```
79
-
80
- ## Configuration
81
-
82
- Place a `.codecontext.toml` in your project root:
83
-
84
- ```toml
85
- git = true
86
- max_files = 300
87
- max_lines = 250
88
- format = "markdown"
89
- exclude = ["*.log", "tmp/"]
90
- hidden = false
91
- ```
92
-
93
- JSON and YAML formats are also supported (`.codecontext.json`, `.codecontext.yml`).
94
-
95
- ## Output
96
-
97
- The tool produces a structured document with:
98
-
99
- 1. **Project metadata** — path, git remote, branch
100
- 2. **Git history** — recent commits and uncommitted changes
101
- 3. **File tree** — with file sizes for every entry
102
- 4. **Key files** — source files with syntax highlighting
103
- 5. **Stats summary** — total files and size at a glance
104
-
105
- Perfect for pasting directly into Claude, ChatGPT, or any AI coding assistant.
106
-
107
- ## Features
108
-
109
- - **Zero dependencies** — pure Python, no pip installs beyond this package
110
- - **Smart ignore** — automatically skips `.git`, `node_modules`, `__pycache__`, binaries, and more
111
- - **Git aware** — includes branch, remote, recent commits, and diff stats
112
- - **File limit safety** — won't overwhelm your context window
113
- - **Language detection** — syntax-highlighted code blocks for 30+ languages
114
- - **Clipboard support** — `--clipboard` copies output directly to your clipboard
115
- - **Multiple formats** — markdown, plain text, or JSON
116
- - **Config file** — project-specific settings via `.codecontext.toml`
117
- - **Custom excludes** — ignore additional patterns with `--exclude`
118
- - **File sizes** — every file in the tree shows its size
119
-
120
- ## Example
121
-
122
- ```bash
123
- $ codecontext --format markdown
124
- ```
125
-
126
- Produces:
127
-
128
- ```
129
- # Codebase Context
130
-
131
- Generated from: /Users/me/my-project
132
- Remote: git@github.com:user/my-project.git
133
- Branch: main
134
-
135
- Recent commits:
136
- abc1234 feat: add user authentication
137
- def5678 fix: resolve payment timeout
138
-
139
- ## Project Structure
140
-
141
- my-project/
142
- ├── src/
143
- │ ├── main.py (2KB)
144
- │ └── utils.py (1KB)
145
- ├── tests/
146
- │ └── test_main.py (3KB)
147
- ├── pyproject.toml (1KB)
148
- └── README.md (3KB)
149
-
150
- ## Key Files (6 files, 10KB)
151
-
152
- ### `src/main.py`
153
-
154
- ```python
155
- def greet(name):
156
- return f"Hello, {name}!"
157
- ```
158
-
159
- ...
160
- ```
161
-
162
- ## Changelog
163
-
164
- ### v0.2.0
165
- - Clipboard support (`--clipboard`)
166
- - Multiple output formats: markdown, plain, JSON
167
- - Configuration file support (`.codecontext.toml`, `.json`, `.yml`)
168
- - File sizes in tree output
169
- - Custom exclude patterns (`--exclude`)
170
- - Hidden files flag (`--hidden`)
171
- - Stats summary in output
172
-
173
- ### v0.1.0
174
- - Initial release
175
- - File tree with smart ignore patterns
176
- - Git history integration
177
- - Syntax highlighting for 30+ languages
178
- - CLI alias `ctx`
179
-
180
- ## License
181
-
182
- MIT
1
+ # codecontext
2
+
3
+ <p align="center">
4
+ <b>Extract your codebase context for AI assistants.</b><br>
5
+ <a href="https://github.com/hanu-14/codecontext/actions/workflows/ci.yml">
6
+ <img src="https://github.com/hanu-14/codecontext/actions/workflows/ci.yml/badge.svg" alt="CI">
7
+ </a>
8
+ <img src="https://img.shields.io/badge/python-3.9%2B-blue" alt="Python 3.9+">
9
+ <img src="https://img.shields.io/badge/license-MIT-green" alt="MIT">
10
+ <img src="https://img.shields.io/badge/dependencies-0-brightgreen" alt="Zero dependencies">
11
+ <img src="https://img.shields.io/badge/version-0.2.2-blue" alt="v0.2.2">
12
+ </p>
13
+
14
+ A zero-dependency CLI tool that packages your project structure, key files, and git history into a formatted prompt for Claude, ChatGPT, and other AI coding assistants.
15
+
16
+ ```bash
17
+ pip install ctxcode
18
+ cd my-project
19
+ codecontext
20
+ ```
21
+
22
+ ## Why?
23
+
24
+ When asking AI assistants about your code, you spend minutes copy-pasting file trees, key files, and git history. `codecontext` does it in one command — giving the AI full project context for better answers.
25
+
26
+ ## Install
27
+
28
+ ```bash
29
+ pip install ctxcode
30
+ ```
31
+
32
+ Or run directly:
33
+
34
+ ```bash
35
+ curl -O https://raw.githubusercontent.com/hanu-14/codecontext/main/src/ctxcode/cli.py
36
+ python -m ctxcode
37
+ ```
38
+
39
+ ## Usage
40
+
41
+ ```bash
42
+ # Full context (tree + files + git history)
43
+ codecontext
44
+
45
+ # Specific project
46
+ codecontext path/to/project
47
+
48
+ # Output formats
49
+ codecontext --format markdown # default - ready for AI chat
50
+ codecontext --format plain # plain text
51
+ codecontext --format json # machine-readable
52
+
53
+ # Copy to clipboard
54
+ codecontext --clipboard
55
+
56
+ # Save to file
57
+ codecontext -o context.md
58
+
59
+ # Exclude custom patterns
60
+ codecontext --exclude "*.log" "tmp/" "*.csv"
61
+
62
+ # Show hidden files
63
+ codecontext --hidden
64
+
65
+ # Exclude git info
66
+ codecontext --no-git
67
+
68
+ # Adjust limits
69
+ codecontext --max-files 100 --max-lines 150
70
+ ```
71
+
72
+ ### Short alias
73
+
74
+ ```bash
75
+ ctx # same as codecontext
76
+ ctx ./src # specific directory
77
+ ctx --clipboard # copy to clipboard
78
+ ```
79
+
80
+ ## Configuration
81
+
82
+ Place a `.codecontext.toml` in your project root:
83
+
84
+ ```toml
85
+ git = true
86
+ max_files = 300
87
+ max_lines = 250
88
+ format = "markdown"
89
+ exclude = ["*.log", "tmp/"]
90
+ hidden = false
91
+ ```
92
+
93
+ JSON and YAML formats are also supported (`.codecontext.json`, `.codecontext.yml`).
94
+
95
+ ## Output
96
+
97
+ The tool produces a structured document with:
98
+
99
+ 1. **Project metadata** — path, git remote, branch
100
+ 2. **Git history** — recent commits and uncommitted changes
101
+ 3. **File tree** — with file sizes for every entry
102
+ 4. **Key files** — source files with syntax highlighting
103
+ 5. **Stats summary** — total files and size at a glance
104
+
105
+ Perfect for pasting directly into Claude, ChatGPT, or any AI coding assistant.
106
+
107
+ ## Features
108
+
109
+ - **Zero dependencies** — pure Python, no pip installs beyond this package
110
+ - **Smart ignore** — automatically skips `.git`, `node_modules`, `__pycache__`, binaries, and more
111
+ - **Git aware** — includes branch, remote, recent commits, and diff stats
112
+ - **File limit safety** — won't overwhelm your context window
113
+ - **Language detection** — syntax-highlighted code blocks for 30+ languages
114
+ - **Clipboard support** — `--clipboard` copies output directly to your clipboard
115
+ - **Multiple formats** — markdown, plain text, or JSON
116
+ - **Config file** — project-specific settings via `.codecontext.toml`
117
+ - **Custom excludes** — ignore additional patterns with `--exclude`
118
+ - **File sizes** — every file in the tree shows its size
119
+
120
+ ## Example
121
+
122
+ ```bash
123
+ $ codecontext --format markdown
124
+ ```
125
+
126
+ Produces:
127
+
128
+ ```
129
+ # Codebase Context
130
+
131
+ Generated from: /Users/me/my-project
132
+ Remote: git@github.com:user/my-project.git
133
+ Branch: main
134
+
135
+ Recent commits:
136
+ abc1234 feat: add user authentication
137
+ def5678 fix: resolve payment timeout
138
+
139
+ ## Project Structure
140
+
141
+ my-project/
142
+ ├── src/
143
+ │ ├── main.py (2KB)
144
+ │ └── utils.py (1KB)
145
+ ├── tests/
146
+ │ └── test_main.py (3KB)
147
+ ├── pyproject.toml (1KB)
148
+ └── README.md (3KB)
149
+
150
+ ## Key Files (6 files, 10KB)
151
+
152
+ ### `src/main.py`
153
+
154
+ ```python
155
+ def greet(name):
156
+ return f"Hello, {name}!"
157
+ ```
158
+
159
+ ...
160
+ ```
161
+
162
+ ## Changelog
163
+
164
+ ### v0.2.0
165
+ - Clipboard support (`--clipboard`)
166
+ - Multiple output formats: markdown, plain, JSON
167
+ - Configuration file support (`.codecontext.toml`, `.json`, `.yml`)
168
+ - File sizes in tree output
169
+ - Custom exclude patterns (`--exclude`)
170
+ - Hidden files flag (`--hidden`)
171
+ - Stats summary in output
172
+
173
+ ### v0.1.0
174
+ - Initial release
175
+ - File tree with smart ignore patterns
176
+ - Git history integration
177
+ - Syntax highlighting for 30+ languages
178
+ - CLI alias `ctx`
179
+
180
+ ## License
181
+
182
+ MIT
@@ -1,39 +1,39 @@
1
- [build-system]
2
- requires = ["hatchling"]
3
- build-backend = "hatchling.build"
4
-
5
- [project]
6
- name = "ctxcode"
7
- version = "0.2.0"
8
- description = "Extract your codebase context for AI assistants"
9
- readme = "README.md"
10
- license = {text = "MIT"}
11
- requires-python = ">=3.9"
12
- authors = [
13
- {name = "Mohammed Hanan", email = "hananmtp313@gmail.com"},
14
- ]
15
- keywords = ["cli", "ai", "code-review", "productivity", "developer-tools"]
16
- classifiers = [
17
- "Development Status :: 4 - Beta",
18
- "Environment :: Console",
19
- "Intended Audience :: Developers",
20
- "Topic :: Software Development :: Code Generators",
21
- "License :: OSI Approved :: MIT License",
22
- "Programming Language :: Python :: 3",
23
- ]
24
- dependencies = []
25
-
26
- [project.urls]
27
- Homepage = "https://github.com/hanu-14/codecontext"
28
- Repository = "https://github.com/hanu-14/codecontext"
29
- Issues = "https://github.com/hanu-14/codecontext/issues"
30
-
31
- [project.scripts]
32
- codecontext = "codecontext.cli:main"
33
- ctx = "codecontext.cli:main"
34
-
35
- [tool.hatch.build.targets.wheel]
36
- packages = ["src/codecontext"]
37
-
38
- [tool.hatch.build.targets.sdist]
39
- include = ["/src"]
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "ctxcode"
7
+ version = "0.2.2"
8
+ description = "Extract your codebase context for AI assistants"
9
+ readme = "README.md"
10
+ license = {text = "MIT"}
11
+ requires-python = ">=3.9"
12
+ authors = [
13
+ {name = "Mohammed Hanan", email = "hananmtp313@gmail.com"},
14
+ ]
15
+ keywords = ["cli", "ai", "code-review", "productivity", "developer-tools"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Environment :: Console",
19
+ "Intended Audience :: Developers",
20
+ "Topic :: Software Development :: Code Generators",
21
+ "License :: OSI Approved :: MIT License",
22
+ "Programming Language :: Python :: 3",
23
+ ]
24
+ dependencies = []
25
+
26
+ [project.urls]
27
+ Homepage = "https://github.com/hanu-14/codecontext"
28
+ Repository = "https://github.com/hanu-14/codecontext"
29
+ Issues = "https://github.com/hanu-14/codecontext/issues"
30
+
31
+ [project.scripts]
32
+ codecontext = "ctxcode.cli:main"
33
+ ctx = "ctxcode.cli:main"
34
+
35
+ [tool.hatch.build.targets.wheel]
36
+ packages = ["src/ctxcode"]
37
+
38
+ [tool.hatch.build.targets.sdist]
39
+ include = ["/src"]