API Reference¶
The Python SDK entry point is contextcraft.ContextCraft. The pages below
cover compilation, result models, AST data, and language extension interfaces.
Signatures are generated from the installed package.
Command-line interface¶
Both contextcraft and contextcraft-ai expose the same command:
contextcraft [OPTIONS] [PATH]
contextcraft --help
PATH defaults to the current directory. Artifacts go to stdout unless
--output is set; telemetry goes to stderr unless --quiet is set.
Option |
Description |
Default |
|---|---|---|
|
Token budget, as an integer or shorthand such as |
|
|
Tiktoken encoding name used for token accounting (e.g. |
|
|
Query or symbol keywords to bias ranking |
None |
|
Relative file path or glob to boost (repeatable) |
None |
|
|
|
|
Write the artifact to a file |
None |
|
Include glob (repeatable) |
None |
|
Additional exclude glob (repeatable) |
None |
|
Copy the artifact to the clipboard |
Off |
|
Disable secret redaction |
Off |
|
Ignore neither |
Off |
|
Suppress telemetry |
Off |
|
Show the version and exit |
|
|
Show usage and exit |
contextcraft . --budget 16k --focus-file 'src/**' --format xml -o context.xml