swecli platform
swecli platform is the command group agents and power users run inside a sandbox to inspect a codebase, gather context for a task, and verify run evidence. This page lists every subcommand with its flags and an example; the resource verbs (artifact, work-item, run, and the rest) are on the swecli reference.
Platform commands read the sandbox workspace configuration to resolve the project, the API address, and the current artifact. Two runtime flags come before the subcommand:
The project comes from .swe.yaml or the SWE_PROJECT_ID environment variable. Commands that need a project fail with project_id missing when neither is set. The --format and --project global flags of the resource verbs do not apply here; commands print JSON unless noted.
Workspace context
context
Print the resolved workspace configuration: project ID, API URL, the artifact the sandbox is bound to, and the preview feature ID.
project
Fetch the current project record.
Knowledge search and context
search
Search the project knowledge base. By default the answer is synthesized from the matching sources; pass --no-synthesize for raw results only, which is faster. This is the same content the assistant searches in the ✦ Agentic panel; see Knowledge base.
context-pack
Assemble a token-budgeted context pack for a task or an artifact. Without --task or --artifact-id, the artifact bound in .swe.yaml is used.
related
List artifacts semantically related to one artifact.
knowledge-map
Print the project knowledge map.
Code intelligence
code-search
Search the project code graph for files and symbols. Output is one hit per line: path, symbol and line when known, and a relevance score.
code-neighbors
List files and symbols connected to one symbol in the code graph.
code-graph
Print the slice of the project graph around a file or symbol: nodes whose ID, display ID, title, or file path match the query, expanded by --hops, draft nodes excluded.
dag
Print the entire project graph unfiltered, drafts included.
Artifact graph and traceability
deps
Show the dependency graph of one artifact.
impact
Show artifacts affected by a change to one artifact (the reverse dependency graph).
impacted
Find artifacts impacted either by an artifact (same as impact) or by a source file, through acceptance-criteria trace links.
trace
Resolve traceability links between artifacts, acceptance criteria, and source files. Exactly one selector is required: an artifact reference, --file, or --requirement.
Artifacts
list-artifacts
List the project's artifacts.
get-artifact
Fetch one artifact by ID.
create-artifact
Create an artifact in the project. Content comes from --content-file or piped stdin.
template
Fetch the content template for an artifact type.
verify-ac-coverage
Scan a directory for @implements AC#<n> annotations and check that every structured acceptance criterion of an artifact is covered. Prints a coverage report, records the result on the artifact, and exits non-zero when a criterion is uncovered or an @sdlc annotation pins a stale content hash.
asis
List the project's as-is baseline artifacts grouped by layer, or print one by target. A target is the artifact type, optionally with a qualifier (type:qualifier); a unique prefix is enough. See As-is wiki.
Pipeline and actions
pipeline-status
Show the project's lifecycle and phase status.
intake
Fetch the project's intake record. See Intake interview.
pending-actions
List pending actions, for the current project by default.
Preview environments
Inspect the running preview environment for a feature; see Preview environments.
preview-status
Show the status of the preview environment for a feature. Without --feature-id, the feature bound in the workspace configuration is used.
preview-logs
Fetch logs from one container of a preview environment.
Compliance evidence
evidence verify
Verify an exported compliance evidence bundle offline. No API calls and no configuration are needed. Three properties are checked: the signature over the manifest, the content-tree integrity recorded in the manifest, and audit-chain continuity within the exported segment. The command exits non-zero when any check fails. Bundles are exported from a run timeline; see Runs.
Internal commands
Four subcommands exist for the agent pipeline and rarely need a human. present-content stages content for a person to accept in the UI, update-intake patches the project intake record, compose-openapi composes an OpenAPI document from a compact contract file, and serve runs a loopback HTTP API inside the sandbox for the TDD evidence protocol. Each prints its own usage with --help.