Skip to content

Add neurostack export — dump index data to JSON #4

@raphasouthall

Description

@raphasouthall

There is currently no way to export the NeuroStack index in a portable format. Adding a `neurostack export` command would let users inspect their index, back it up, or pipe it into other tools.

The command should export:

  • All indexed notes: path, title, summary (if available), PageRank score
  • Optionally: triples, community assignments

Proposed interface:

```bash
neurostack export # exports notes list as JSON to stdout
neurostack export --include triples # include triples per note
neurostack export --output export.json # write to file instead of stdout
```

Where to look:

  • `src/neurostack/schema.py` — database schema and table structure
  • `src/neurostack/cli.py` — where to add the new command
  • `src/neurostack/graph.py`, `src/neurostack/triples.py` — data sources

Acceptance criteria:

  • `neurostack export` outputs a JSON array of indexed notes to stdout
  • Each note entry includes: `path`, `title`, `pagerank`, `summary` (null if not computed)
  • `--output ` writes to a file instead of stdout
  • `--include triples` adds a `triples` key to each note entry
  • Command appears in `--help` with a description
  • At least one test covers the basic export

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCLI-related issuesenhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions