For AI agents: the complete documentation index is available at https://docs.flezise.com/llms.txt, the full documentation bundle is available at https://docs.flezise.com/llms-full.txt, and this page is available as Markdown at https://docs.flezise.com/reference/swecli-platform.md.

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:

FlagDefaultPurpose
--workspace.Workspace directory containing .swe.yaml
--config(workspace .swe.yaml)Explicit config file path

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.

swecli platform context
swecli platform context
swecli platform --workspace /workspace context

project

Fetch the current project record.

swecli platform project
swecli platform project

Knowledge search and context

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.

swecli platform search "query" [flags]
FlagDefaultPurpose
--type(all)Filter by artifact type, comma-separated
--phase(all)Filter by phase, comma-separated
--top-k(server default)Number of results
--modehybridhybrid, vector, or keyword
--no-synthesizeoffSkip answer synthesis, return results only
swecli platform search "session timeout handling"
swecli platform search "auth flow" --type story --phase analysis --no-synthesize

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.

swecli platform context-pack [--task "..." | --artifact-id ID] [flags]
FlagDefaultPurpose
--task(none)Free-text task to gather context for
--artifact-id(workspace artifact)Artifact to gather context for
--budget8000Token budget for the pack
--include(all)Comma-separated layers: dependencies, code, knowledge, summary, conversation
swecli platform context-pack --task "add rate limiting to the login endpoint"
swecli platform context-pack --artifact-id STORY-014 --budget 4000 --include dependencies,knowledge

List artifacts semantically related to one artifact.

swecli platform related ARTIFACT_ID [flags]
FlagDefaultPurpose
--top-k10Number of related artifacts
swecli platform related PRD-001 --top-k 5

knowledge-map

Print the project knowledge map.

swecli platform knowledge-map
swecli platform knowledge-map

Code intelligence

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.

swecli platform code-search "query" [flags]
FlagDefaultPurpose
--k12Maximum results
--project(workspace project)Project ID override
swecli platform code-search "jwt verification"
swecli platform code-search "retry backoff" --k 5

code-neighbors

List files and symbols connected to one symbol in the code graph.

swecli platform code-neighbors "symbol" [flags]
FlagDefaultPurpose
--hops1Graph hops from the symbol
--project(workspace project)Project ID override
swecli platform code-neighbors "SessionManager" --hops 2

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.

swecli platform code-graph FILE_OR_SYMBOL [flags]
FlagDefaultPurpose
--hops1Neighborhood size around matching nodes
swecli platform code-graph src/auth/session.py --hops 2

dag

Print the entire project graph unfiltered, drafts included.

swecli platform dag
swecli platform dag

Artifact graph and traceability

deps

Show the dependency graph of one artifact.

swecli platform deps ARTIFACT_ID [flags]
FlagDefaultPurpose
--depth2Graph depth
--reverseoffReverse the dependency direction
--include-draftsoffInclude draft artifacts
swecli platform deps STORY-014 --depth 3

impact

Show artifacts affected by a change to one artifact (the reverse dependency graph).

swecli platform impact ARTIFACT_ID [flags]
FlagDefaultPurpose
--depth2Graph depth
--include-draftsoffInclude draft artifacts
swecli platform impact PRD-001

impacted

Find artifacts impacted either by an artifact (same as impact) or by a source file, through acceptance-criteria trace links.

swecli platform impacted ARTIFACT_ID [--depth 2] [--include-drafts]
swecli platform impacted --file PATH
FlagDefaultPurpose
--file(none)Find artifacts whose acceptance criteria trace to this file
--depth2Reverse-dependency depth in artifact mode
--include-draftsoffInclude draft artifacts in artifact mode
swecli platform impacted --file src/auth/session.py
swecli platform impacted STORY-014 --depth 1

trace

Resolve traceability links between artifacts, acceptance criteria, and source files. Exactly one selector is required: an artifact reference, --file, or --requirement.

swecli platform trace ARTIFACT_ID [--ac N]
swecli platform trace --file PATH
swecli platform trace --requirement TOKEN
FlagDefaultPurpose
--ac(all)Acceptance-criteria index to trace, with an artifact reference
--file(none)Trace from a source file
--requirement(none)Trace from a requirement token
swecli platform trace STORY-014 --ac 2
swecli platform trace --file src/auth/session.py

Artifacts

list-artifacts

List the project's artifacts.

swecli platform list-artifacts [flags]
FlagDefaultPurpose
--phase(all)Filter by phase
--status(all)Filter by status
swecli platform list-artifacts --phase planning --status approved

get-artifact

Fetch one artifact by ID.

swecli platform get-artifact ARTIFACT_ID
swecli platform get-artifact PRD-001

create-artifact

Create an artifact in the project. Content comes from --content-file or piped stdin.

swecli platform create-artifact --title TITLE --type TYPE --phase PHASE [flags]
FlagDefaultPurpose
--title(required)Artifact title
--type(required)Artifact type
--phase(required)Artifact phase
--status(none)Optional initial status
--content-file(stdin)Content file path
swecli platform create-artifact --title "Session hardening" --type story --phase planning --content-file story.md

template

Fetch the content template for an artifact type.

swecli platform template ARTIFACT_TYPE
swecli platform template prd

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.

swecli platform verify-ac-coverage --artifact-id ID [flags]
FlagDefaultPurpose
--artifact-id(required)Artifact whose acceptance criteria to verify
--scan-dir.Directory to scan for annotations
swecli platform verify-ac-coverage --artifact-id STORY-014 --scan-dir src

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.

swecli platform asis [TARGET] [flags]
FlagDefaultPurpose
--staleoffList only stale as-is artifacts
swecli platform asis
swecli platform asis --stale

Pipeline and actions

pipeline-status

Show the project's lifecycle and phase status.

swecli platform pipeline-status
swecli platform pipeline-status

intake

Fetch the project's intake record. See Intake interview.

swecli platform intake
swecli platform intake

pending-actions

List pending actions, for the current project by default.

swecli platform pending-actions [flags]
FlagDefaultPurpose
--project(workspace project)Project ID
--all-projectsoffAll accessible projects
--limit50Maximum items
--offset0Pagination offset
swecli platform pending-actions --all-projects --limit 10

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.

swecli platform preview-status [flags]
FlagDefaultPurpose
--feature-id(workspace preview)Preview feature ID
swecli platform preview-status

preview-logs

Fetch logs from one container of a preview environment.

swecli platform preview-logs CONTAINER_NAME [flags]
FlagDefaultPurpose
--tail200Log lines
--feature-id(workspace preview)Preview feature ID
swecli platform preview-logs backend --tail 500

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.

swecli platform evidence verify BUNDLE.tar.gz [flags]
FlagDefaultPurpose
--pubkey(from bundle)Expected signer public key: base64 raw ed25519, or a file path
swecli platform evidence verify evidence-bundle.tar.gz
swecli platform evidence verify evidence-bundle.tar.gz --pubkey signer.pub

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, and compose-openapi composes an OpenAPI document from a compact contract file. Each prints its own usage with --help.