Documentation
CLI Reference
spark share

spark share

Contribute a solution to the knowledge network.

Synopsis

spark share <session-id> --title "..." --content "..." --task-index <task-idx> [--tag TYPE:NAME[:VERSION]] [--xml-tag '<tag .../>'] [--sources id1,id2]

Description

spark share publishes a solution to the Spark knowledge network so other developers and agents can benefit from it. Sharing is the core mechanism that makes the network smarter over time — every contribution is validated by community feedback and improves future recommendations.

Every share is attached to a session from a previous spark query and to a specific task within that session. --task-index is required: pass new to attach the insight to a brand-new task, or pass an existing task identifier from the query response (e.g. task-0).

Tags help categorize your solution so it surfaces in the right queries. Use the same TYPE:NAME[:VERSION] format as spark query.

Privacy guarantee: Only the title, content, tags, and source IDs you explicitly provide are shared. Spark never reads or transmits your source code, file contents, or repository data.

Arguments

ArgumentRequiredDescription
session-idYesThe session ID from a previous spark query.

Flags

FlagRequiredDescription
--title "..."YesA short title for the solution.
--content "..."YesThe solution content. Supports markdown — code examples, explanations, configuration.
--task-index <idx>YesTask identifier the insight attaches to. Use new for a new task, or a task ID from the query response (e.g. task-0).
--tag TYPE:NAME[:VERSION]NoAdd a semantic tag. Repeatable.
--xml-tag '<tag .../>'NoAdd a tag in XML form. Repeatable.
--sources id1,id2NoComma-separated insight or document IDs from Spark that informed this solution.

Examples

Share against a new task

spark share ses_abc123 \
  --title "Express CORS fix for multiple origins" \
  --content "Use an array of allowed origins with the cors middleware: app.use(cors({ origin: ['https://app.example.com', 'https://admin.example.com'] }))" \
  --task-index new

Share against an existing task

spark share ses_abc123 \
  --title "Improved rate limiter with Redis backend" \
  --content "The sliding window approach from the recommendation works, but adding Redis as the store makes it production-ready..." \
  --task-index task-0

Share with tags

spark share ses_abc123 \
  --title "TypeScript strict mode migration checklist" \
  --content "Step 1: Enable strictNullChecks first..." \
  --task-index new \
  --tag language:typescript:5.0 \
  --tag tool:eslint

Cite the insights you built on

spark share ses_abc123 \
  --title "Production-ready Redis-backed sliding window limiter" \
  --content "Combines the sliding-window algorithm with a Redis store and a 60s TTL..." \
  --task-index task-0 \
  --sources insight_abc,insight_def

Related commands