combicode 1.1.0 → 1.4.0
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.
- package/CHANGELOG.md +42 -0
- package/README.md +20 -10
- package/index.js +18 -2
- package/package.json +5 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.4.0](https://github.com/aaurelions/combicode/compare/combicode-js-v1.3.0...combicode-js-v1.4.0) (2025-08-13)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* Add --llms-txt flag for llms.txt documentation context ([0817554](https://github.com/aaurelions/combicode/commit/081755435594b0ca5208609b2724eb47bd73c2dc))
|
|
9
|
+
|
|
10
|
+
## [1.3.0](https://github.com/aaurelions/combicode/compare/combicode-js-v1.2.1...combicode-js-v1.3.0) (2025-06-25)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* Add package-lock.json for reproducible builds ([06a417a](https://github.com/aaurelions/combicode/commit/06a417a155e9b72e26d0e091d181cfb8c53f0d28))
|
|
16
|
+
* **ci:** implement independent package versioning for monorepo ([d02cf23](https://github.com/aaurelions/combicode/commit/d02cf233239c7af8db19061f34b769178334b388))
|
|
17
|
+
* improve CLI output and version reporting ([7963a10](https://github.com/aaurelions/combicode/commit/7963a10782c2626608750de53023d37d327d51b2))
|
|
18
|
+
* improve CLI output and version reporting ([e74f6d8](https://github.com/aaurelions/combicode/commit/e74f6d8fbed4f9cdf8ad82f3dae87069f66f7bb6))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **ci:** permission error ([156b76d](https://github.com/aaurelions/combicode/commit/156b76d3ab1550123df2ded6b1da5d6e2e2cc008))
|
|
24
|
+
* **npm:** Set public access for publishing and bump version to 1.0.1 ([6c91eb7](https://github.com/aaurelions/combicode/commit/6c91eb714c81ec0201bb0fcfad8ad9fb4124cd7e))
|
|
25
|
+
* Use scoped npm package name and bump python version ([8a1b347](https://github.com/aaurelions/combicode/commit/8a1b347f6c54c9762acf354ef289c293d3ef21a3))
|
|
26
|
+
|
|
27
|
+
## [1.2.0](https://github.com/aaurelions/combicode/compare/combicode-js-v1.1.0...combicode-js-v1.2.0) (2025-06-25)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
* Add package-lock.json for reproducible builds ([06a417a](https://github.com/aaurelions/combicode/commit/06a417a155e9b72e26d0e091d181cfb8c53f0d28))
|
|
33
|
+
* **ci:** implement independent package versioning for monorepo ([d02cf23](https://github.com/aaurelions/combicode/commit/d02cf233239c7af8db19061f34b769178334b388))
|
|
34
|
+
* improve CLI output and version reporting ([7963a10](https://github.com/aaurelions/combicode/commit/7963a10782c2626608750de53023d37d327d51b2))
|
|
35
|
+
* improve CLI output and version reporting ([e74f6d8](https://github.com/aaurelions/combicode/commit/e74f6d8fbed4f9cdf8ad82f3dae87069f66f7bb6))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Bug Fixes
|
|
39
|
+
|
|
40
|
+
* **ci:** permission error ([156b76d](https://github.com/aaurelions/combicode/commit/156b76d3ab1550123df2ded6b1da5d6e2e2cc008))
|
|
41
|
+
* **npm:** Set public access for publishing and bump version to 1.0.1 ([6c91eb7](https://github.com/aaurelions/combicode/commit/6c91eb714c81ec0201bb0fcfad8ad9fb4124cd7e))
|
|
42
|
+
* Use scoped npm package name and bump python version ([8a1b347](https://github.com/aaurelions/combicode/commit/8a1b347f6c54c9762acf354ef289c293d3ef21a3))
|
package/README.md
CHANGED
|
@@ -80,18 +80,28 @@ Use the `--exclude` or `-e` flag with comma-separated glob patterns.
|
|
|
80
80
|
npx combicode -e "**/*_test.py,docs/**"
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
+
### Generating Context for `llms.txt`
|
|
84
|
+
|
|
85
|
+
The `--llms.txt` or `-l` flag is designed for projects that use an [`llms.txt`](https://llmstxt.org/) file to specify important documentation. When this flag is used, Combicode inserts a specialized system prompt telling the LLM that the provided context is the project's definitive documentation for a specific version. This helps the LLM provide more accurate answers and avoid using deprecated functions.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Combine all markdown files for an llms.txt context
|
|
89
|
+
npx combicode -l -i .md -o llms.txt
|
|
90
|
+
```
|
|
91
|
+
|
|
83
92
|
## All CLI Options
|
|
84
93
|
|
|
85
|
-
| Option | Alias | Description
|
|
86
|
-
| ---------------- | ----- |
|
|
87
|
-
| `--output` | `-o` | The name of the output file.
|
|
88
|
-
| `--dry-run` | `-d` | Preview files without creating the output file.
|
|
89
|
-
| `--include-ext` | `-i` | Comma-separated list of extensions to exclusively include.
|
|
90
|
-
| `--exclude` | `-e` | Comma-separated list of additional glob patterns to exclude.
|
|
91
|
-
| `--
|
|
92
|
-
| `--no-
|
|
93
|
-
| `--
|
|
94
|
-
| `--
|
|
94
|
+
| Option | Alias | Description | Default |
|
|
95
|
+
| ---------------- | ----- | ------------------------------------------------------------------------------ | --------------- |
|
|
96
|
+
| `--output` | `-o` | The name of the output file. | `combicode.txt` |
|
|
97
|
+
| `--dry-run` | `-d` | Preview files without creating the output file. | `false` |
|
|
98
|
+
| `--include-ext` | `-i` | Comma-separated list of extensions to exclusively include. | (include all) |
|
|
99
|
+
| `--exclude` | `-e` | Comma-separated list of additional glob patterns to exclude. | (none) |
|
|
100
|
+
| `--llms-txt` | `-l` | Use a specialized system prompt for context generated from an `llms.txt` file. | `false` |
|
|
101
|
+
| `--no-gitignore` | | Do not use patterns from the project's `.gitignore` file. | `false` |
|
|
102
|
+
| `--no-header` | | Omit the introductory prompt and file tree from the output. | `false` |
|
|
103
|
+
| `--version` | `-v` | Show the version number. | |
|
|
104
|
+
| `--help` | `-h` | Show the help message. | |
|
|
95
105
|
|
|
96
106
|
## License
|
|
97
107
|
|
package/index.js
CHANGED
|
@@ -8,7 +8,7 @@ const glob = require("fast-glob");
|
|
|
8
8
|
|
|
9
9
|
const { version } = require("./package.json");
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const DEFAULT_SYSTEM_PROMPT = `You are an expert software architect. The user is providing you with the complete source code for a project, contained in a single file. Your task is to meticulously analyze the provided codebase to gain a comprehensive understanding of its structure, functionality, dependencies, and overall architecture.
|
|
12
12
|
|
|
13
13
|
A file tree is provided below to give you a high-level overview. The subsequent sections contain the full content of each file, clearly marked with "// FILE: <path>".
|
|
14
14
|
|
|
@@ -17,6 +17,13 @@ Your instructions are:
|
|
|
17
17
|
2. **Identify Key Components:** Pay close attention to configuration files (like package.json, pyproject.toml), entry points (like index.js, main.py), and core logic.
|
|
18
18
|
`;
|
|
19
19
|
|
|
20
|
+
const LLMS_TXT_SYSTEM_PROMPT = `You are an expert software architect. The user is providing you with the full documentation for a project, sourced from the project's 'llms.txt' file. This file contains the complete context needed to understand the project's features, APIs, and usage for a specific version. Your task is to act as a definitive source of truth based *only* on this provided documentation.
|
|
21
|
+
|
|
22
|
+
When answering questions or writing code, adhere strictly to the functions, variables, and methods described in this context. Do not use or suggest any deprecated or older functionalities that are not present here.
|
|
23
|
+
|
|
24
|
+
A file tree of the documentation source is provided below for a high-level overview. The subsequent sections contain the full content of each file, clearly marked with "// FILE: <path>".
|
|
25
|
+
`;
|
|
26
|
+
|
|
20
27
|
function loadDefaultIgnorePatterns() {
|
|
21
28
|
const configPath = path.resolve(__dirname, "config", "ignore.json");
|
|
22
29
|
try {
|
|
@@ -108,6 +115,12 @@ async function main() {
|
|
|
108
115
|
describe: "Comma-separated glob patterns to exclude",
|
|
109
116
|
type: "string",
|
|
110
117
|
})
|
|
118
|
+
.option("l", {
|
|
119
|
+
alias: "llms-txt",
|
|
120
|
+
describe: "Use the system prompt for llms.txt context",
|
|
121
|
+
type: "boolean",
|
|
122
|
+
default: false,
|
|
123
|
+
})
|
|
111
124
|
.option("no-gitignore", {
|
|
112
125
|
describe: "Ignore the project's .gitignore file",
|
|
113
126
|
type: "boolean",
|
|
@@ -192,7 +205,10 @@ async function main() {
|
|
|
192
205
|
const outputStream = fs.createWriteStream(argv.output);
|
|
193
206
|
|
|
194
207
|
if (!argv.noHeader) {
|
|
195
|
-
|
|
208
|
+
const systemPrompt = argv.llmsTxt
|
|
209
|
+
? LLMS_TXT_SYSTEM_PROMPT
|
|
210
|
+
: DEFAULT_SYSTEM_PROMPT;
|
|
211
|
+
outputStream.write(systemPrompt + "\n");
|
|
196
212
|
outputStream.write("## Project File Tree\n\n");
|
|
197
213
|
outputStream.write("```\n");
|
|
198
214
|
const tree = generateFileTree(relativeFiles, projectRoot);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "combicode",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "A CLI tool to combine a project's codebase into a single file for LLM context.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
"prompt",
|
|
25
25
|
"developer-tool",
|
|
26
26
|
"codegen",
|
|
27
|
-
"chatgpt"
|
|
27
|
+
"chatgpt",
|
|
28
|
+
"llms.txt",
|
|
29
|
+
"llms",
|
|
30
|
+
"llms-full.txt"
|
|
28
31
|
],
|
|
29
32
|
"author": "A. Aurelions",
|
|
30
33
|
"license": "MIT",
|