Skip to main content
TRW
Skip to content
TRWCLI Flags Reference

CLI flags reference

Every installer flag, every trw-mcp subcommand flag, and the env vars that flip debug/verbose behavior. Reference tables only.

Installer flags

Flags accepted by install.sh (which shells out to install-trw.py). The installer is the canonical entry point — run curl -fsSL https://trwframework.com/install.sh | bash for user projects.

FlagShortWhat it doesExample
target_dirPositional. Project directory to install into. Defaults to the current directory.python3 install-trw.py .
--upgradeUpgrade the trw-mcp package without re-running project bootstrap.--upgrade
--ai / --no-aiInstall (or skip) the [ai] extra (Anthropic SDK for experimental AI-assisted tooling).--no-ai
--sqlite-vec / --no-sqlite-vecInstall (or skip) the [vectors] extra that enables sqlite-vec embeddings.--sqlite-vec
--quiet-qMinimal output; one line per phase.--quiet
--scriptForce non-interactive mode. All prompts use their defaults; required values must come from flags or env.--script
--name VALUEInstallation ID written to .trw/config.yaml.--name my-repo
--api-key VALUEPlatform API key for hosted sync and telemetry.--api-key trw_dk_...
--telemetry / --no-telemetryOpt in or out of platform telemetry. Default in script mode: --no-telemetry.--telemetry
--skip-authSkip the device-authorization flow during install.--skip-auth
--pip-target DIRInstall packages to DIR instead of the default site-packages (useful for tmpfs or container overlays).--pip-target /tmp/pkgs
--ide VALUEClient profile(s) to configure. Comma-separated. Prompted in interactive mode.--ide cursor-ide,codex,gemini

trw-mcp flags

trw-mcp is both an MCP server (default behavior: run the server) and a small CLI for bootstrap, maintenance, and offline fallback. Global flags apply to every subcommand.

Global flags

FlagShortWhat it doesDefault
--version-VPrint version and exit.
--debugEnable debug logging to .trw/logs/ and stderr.off
--verbose-vIncrease verbosity (-v DEBUG, -vv DEBUG+file). Stacks with --debug.0
--quiet-qSuppress everything below WARNING.off
--log-level LEVELExplicit level: DEBUG, INFO, WARNING, ERROR, CRITICAL. Overrides -v/--debug.auto
--log-jsonForce JSON log output (default: auto-detect TTY).auto
--transport VALUETransport: stdio, sse, streamable-http.stdio
--host VALUEBind address for HTTP transport.127.0.0.1
--port VALUEBind port for HTTP transport.8100

Subcommands

Invoked as trw-mcp <subcommand> [flags]. Omitted or serve runs the MCP server.

SubcommandPurposeNotable flags
serveRun the MCP server. Default when no subcommand is supplied.(uses global --transport, --host, --port)
init-projectBootstrap TRW in a project directory.--force, --ide, --source-package, --test-path, --runs-root
update-projectUpdate framework files without clobbering user config.--pip-install, --dry-run, --ide
auditComprehensive TRW health audit for a project.--format, --output, --fix
exportExport learnings, runs, or analytics to JSON/CSV.--scope, --format, --output, --since, --min-impact
import-learningsImport learnings from an export file.--min-impact, --tags, --dry-run
authManage platform authentication: login, logout, status.--api-url (on login)
uninstallRemove TRW files from a project.--dry-run, --yes
config-referencePrint every TRW_* env var with its default and description.
check-instructionsValidate instruction files reference only exposed MCP tools.
localOffline fallback: init a run, write a checkpoint without the MCP server.--task, --message, --run-path
gcSweep stale active runs. Default is dry-run (reports only).--no-dry-run, --staleness-hours, --grace-hours, --json
build-releaseBuild a release bundle of bundled data.--version, --output-dir, --push, --backend-url, --api-key

Skill invocation

TRW ships slash-command skills (for example /trw-ceremony-guide, /trw-prd-ready) that each client invokes in its native slash surface — Claude Code and Cursor IDE type them into the chat, opencode and Codex execute them through their command menus. The installer writes the skill files to each client's skill directory so invocation is uniform across clients; the underlying CLI is the same either way.

Debugging flags

Preferred path: trw-mcp --debug (writes to .trw/logs/ and stderr) or -vv (DEBUG plus a log file).

SettingWhat it doesExample
--debugEnable debug logs + write to .trw/logs/.trw-mcp --debug serve
-vvDEBUG level plus per-session log file.trw-mcp -vv
--log-jsonForce JSON output for log aggregation.trw-mcp --log-json
TRW_DEBUGEnv-var equivalent of config.debug. Same effect as --debug.TRW_DEBUG=1 trw-mcp

Crash traces land in .trw/logs/crash.log — see server/__main__.py for the top-level crash handler.

Related pages

Next

Flags override config at runtime. The config schema shows every knob; troubleshooting helps when a flag and config disagree.