-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
cliCLI-related issuesCLI-related issuesenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
`neurostack search "query"` currently prints results as formatted text. This is useful for humans but hard to pipe into other tools.
Add a `--json` flag that outputs results as a JSON array instead. Each element should include at minimum: `path`, `title`, `score`, and `snippet`.
Example:
```bash
neurostack search "memory consolidation" --json
```
```json
[
{
"path": "neuroscience/memory.md",
"title": "Memory Consolidation",
"score": 0.91,
"snippet": "Consolidation transfers information from hippocampus to neocortex..."
}
]
```
Where to look:
- CLI entry point: `src/neurostack/cli.py`
- Search logic: `src/neurostack/search.py`
- The `search` subcommand is defined in `cli.py` using Click or similar — look for the `@cli.command()` decorator for `search`
Acceptance criteria:
- `neurostack search "query" --json` outputs valid JSON to stdout
- Each result object includes `path`, `title`, `score`, and `snippet`
- Default (non-JSON) output is unchanged
- `--json` is documented in `--help`
- At least one test covers the JSON output path
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
cliCLI-related issuesCLI-related issuesenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed