Generate your first context
Install ContextCraft, then open a terminal in your repository. Choose a token budget and describe the task:
contextcraft . --budget 8000 --focus "authentication" --stats -o context.md
This writes Markdown to context.md and prints statistics to stderr. The budget
is a positive integer, such as 8000.
Open the result
The artifact starts with a file listing, followed by selected source. A shortened example looks like this:
# Repository context
## Files
- "src/auth.py"
## "src/auth.py" (SIGS)
```python
def authenticate(token: str)
```
Your paths, selected detail, and source depend on the repository, focus, and budget. Read the four detail tiers to understand what was retained.
Review before sharing
Open context.md and check the files and source it contains. Secret protection
redacts detected matches by default, but review the result before sending it to
a model. The output file is excluded from directory discovery on later runs.
Adjust the next run
Use a more specific task description or change the budget:
contextcraft . --budget 16000 --focus "refresh an expired session" -o context.md
Continue with read the result, then learn to choose files, focus a subsystem, or export JSON or XML.