Documentation
CLI Reference
spark share-task

spark share-task

Share a solution via query pattern, without needing a session ID.

Synopsis

spark share-task "<query>" --insight "..." [--tag TYPE:NAME[:VERSION]]

Description

spark share-task lets you contribute a solution to the knowledge network using a query string instead of a session ID. This is useful when you want to share knowledge proactively — for example, when you have solved a problem and want to make the solution available to others, but you did not start from a spark query session.

The query text you provide acts as the search pattern that will match this solution to future queries. Write it the way someone would describe the problem they are trying to solve.

Like spark share, only the data you explicitly provide is transmitted. No source code or file contents are read or sent.

Use spark share-task when you want to contribute knowledge independently. Use spark share when you are building on an existing query session.

Arguments

ArgumentRequiredDescription
queryYesThe query text that describes the problem this solution addresses. Wrap in quotes.

Flags

FlagRequiredDescription
--insight "..."YesThe solution content. Can include code examples and explanations.
--tag TYPE:NAME[:VERSION]NoAdd a semantic tag. Repeatable.

Examples

Basic share

spark share-task "how to fix Next.js hydration mismatch errors" \
  --insight "Hydration mismatches occur when server and client render different content. Common causes: 1) Using Date.now() or Math.random() during render. 2) Browser extensions injecting elements. Fix: wrap dynamic content in a useEffect or use suppressHydrationWarning for intentional differences."

Share with tags

spark share-task "PostgreSQL connection timeout in Docker" \
  --insight "Set connect_timeout=10 in your connection string and ensure the database container has a health check. Docker Compose: add 'healthcheck' to the postgres service and 'depends_on: db: condition: service_healthy' to your app service." \
  --tag tool:docker \
  --tag tool:postgresql

Share a configuration pattern

spark share-task "ESLint flat config migration from .eslintrc" \
  --insight "Export an array from eslint.config.js instead of a JSON object. Each array element is a config object with optional 'files' glob patterns. Plugins are imported directly instead of referenced by string name." \
  --tag tool:eslint:9.0 \
  --tag language:javascript

Related commands