myte
v0.0.47
Published
Myte developer CLI.
Readme
myte
Canonical npm package for the Myte CLI.
Install
Local install:
npm install myte- run with
npx myte ... - or
npm exec myte -- ...
Global install:
npm i -g myte- run with
myte ...
No install:
npx myte@latest ...
npm install myte does not add myte to your shell PATH. Use npx myte or npm exec myte -- ... unless you installed globally.
Requirements
- Node
18+ - macOS, Linux, or Windows
MYTE_API_KEY=<project_api_key>in your shell or workspace.envMYTEAI_API_KEY=<inference_api_key>only formyte aiMYTEAI_API_KEY=<inference_api_key>formytecodygitinPATHonly forquery --with-diff- No runtime npm dependencies beyond the Myte packages themselves.
The CLI searches for .env in the current folder and then up parent directories.
Common Commands
npx myte config --jsonnpx myte bootstrapnpx myte sync-qaqcnpx myte feedback-syncnpx myte feedback get --feedback-id <id>npx myte feedback history --feedback-id <id>npx myte feedback status --feedback-id <id> --status in_review --reason "Ready for review"npx myte feedback edit --feedback-id <id> --title "Updated title" --feedback-text "Updated body" --reason "Clarify scope"npx myte feedback assign --feedback-id <id> --user-id <user_id> --reason "Assign to builder"npx myte feedback archive --feedback-id <id> --reason "Superseded"npx myte feedback validate --file ./MyteCommandCenter/reviews/feedback/<id>-edit.ymlnpx myte feedback submit --file ./MyteCommandCenter/reviews/feedback/<id>-edit.yml --confirm-write --approval-artifact ./MyteCommandCenter/reviews/feedback/<id>-edit.ymlnpx myte feedback reviews --status opennpx myte feedback revise --request-id <id> --file ./MyteCommandCenter/reviews/feedback/<id>-edit.yml --confirm-write --approval-artifact ./MyteCommandCenter/reviews/feedback/<id>-edit.ymlnpx myte feedback review --request-id <id> --action approve --reason "Looks correct"npx myte feedback review --request-ids "<id1,id2>" --action approve --reason "Batch approval"npx myte feedback move --feedback-id <id> --to-state in_progress --reason "Started"npx myte feedback move --feedback-ids "<id1,id2>" --to-state in_progress --reason "Batch move"npx myte feedback comment --feedback-id <id> --body-file ./updates/feedback-comment.md --confirm-write --approval-artifact ./updates/feedback-comment.mdnpx myte feedback undo --feedback-id <id> --event-id <event_id> --reason "Undo accidental move"npx myte feedback prd-versions --feedback-id <id>npx myte feedback prd-diff --feedback-id <id> --version-id <version_id> --compare-to <base_version_id>npx myte feedback apply --file ./MyteCommandCenter/reviews/feedback/<id>-edit.ymlnpx myte suggestions syncnpx myte mission archive --mission-ids "M001" --reason "Duplicate disposable mission"npx myte query "Summarize the current branch changes" --with-diffnpx myte create-prd ./drafts/auth-prd.md --confirm-write --approval-artifact ./drafts/auth-prd.mdnpx myte update-team "Backend deploy completed." --confirm-write --approval-artifact ./updates/team.mdnpx myte update-owner --subject "QAQC progress" --body-file ./updates/owner.md --confirm-write --approval-artifact ./updates/owner.mdnpx myte update-client --subject "Weekly client update" --body-file ./updates/week-12.md --confirm-write --approval-artifact ./updates/week-12.mdnpx mytecody doctornpx mytecody doctor --probe-gatewaynpx mytecody update --dry-runnpx mytecody update
Behavior
bootstrap,sync-qaqc,feedback-sync, andsuggestions syncwrite project-scoped local context underMyteCommandCenterin the current workspace unless--output-diris provided.bootstrapwrites mission cards and mission suggestion thread state together; agents should run it before looking for mission or suggestion ids.mission statusis active-state only (todo,in_progress,done). Usemission archivefor project-key lifecycle archival; restore archived missions from the web archived-board view.mission statusandmission archiverefresh local bootstrap + mission-ops state by default after a successful mutation. Use--no-synconly when you intentionally want to skip the local refresh.feedback status|edit|assign|archive|refinewrites local review artifacts underMyteCommandCenter/reviews/feedback.feedback submit|revise|commentare live writes that require--confirm-write --approval-artifact <path>.feedback review|move|undo|applyare governed writes with backend permission checks but no approval artifact flags.feedback-sync|get|history|reviews|prd-versions|prd-diff|validateare read/sync/validation commands with no approval artifact flags.feedback review --request-idssends one backend batch review request with grouped notifications; do not loop single-review calls for batch decisions.feedback move|comment|undo|prd-versions|prd-diff|historycalls the project-key Feedback API while authorization, stale snapshot checks, allowed transitions, and history remain enforced by the backend.feedback move --feedback-idssends one batch board move request.feedback commentcreates text-only feedback-specific comments. Attachments remain web UI only for this project-key endpoint.feedback-syncexcludes archived Feedback from normalMyteCommandCenterstate. Project-key API/CLI can archive authorized Feedback, but Feedback unarchive/restore is web UI only.feedback validate|applyremains available for validation and owner-direct apply paths.query --with-diffis stricter than the snapshot commands. It requires project repositories to be configured by the project owner or builder, and it requires at least one matching local project repo to be resolved for diff collection.- If diff-scoped repo configuration is missing or no local project repo can be resolved,
query --with-diffexits with an error instead of silently dropping diff context. - Most markdown files are excluded from diff context by default so code and runtime configuration changes dominate the payload. Key instruction files such as
README.mdandAGENTS.mdremain eligible.
Approval Artifact Requirements
Only selected project-key writes require a local approval artifact. The CLI adds write_approval metadata only when the command is in the required set and the caller supplies --confirm-write --approval-artifact <path>.
| Category | Commands | Artifact |
| --- | --- | --- |
| Required | create-prd, update-team, update-owner, update-client, feedback submit, feedback revise, feedback comment, suggestions create, suggestions revise | Yes |
| Not required | run-qaqc, mission status, mission archive, suggestions review, feedback review, feedback move, feedback undo, feedback apply | No |
| Never required | config, query, bootstrap, sync-qaqc, feedback-sync, suggestions sync, feedback get/history/reviews/prd-versions/prd-diff/validate, local feedback draft commands | No |
For required actions:
- First create a local
.md,.markdown,.yml,.yaml, or.jsonapproval artifact that lists the command, every target id, and the proposed change. - Show the artifact path and full content or a concise complete summary to the user.
- After explicit approval, rerun the write with
--confirm-write --approval-artifact <path>. - Batch artifacts must enumerate every feedback id, suggestion id, request id, or PRD item.
In plain language, the artifact is the human-reviewed record of the exact write the agent is about to send. It is not a permission grant and it does not bypass project owner/delegate checks, idempotency, stale-state guards, validation, or audit. It tells the API that a human approved this payload.
Minimum artifact contents:
command: the exact CLI command to run.targets: every affected feedback id, request id, suggestion id, mission id, PRD file/client ref, project, or contact id.proposed_change: a complete summary of the status, text, PRD, comment, or mission change.batch_count: required when one command sends multiple items.reasonorapproval_note: why the write is being sent.
Batch guidance:
- Mission edit/create batches use
myte suggestions createormyte suggestions revise. The artifact must list each item. For edits includechange_type: update, the existingmission_id, and changed fields. For new missions includechange_type: create, title, description, and acceptance details. For revisions include eachsuggestion_idand expected revision. - PRD batches use one
myte create-prd fileA.md fileB.md ...; the artifact must list each PRD file/title/client ref andbatch_countmust match the number of PRD items. - Feedback submit/revise/comment artifacts are usually the same YAML or markdown file being submitted. If the command uses inline text or stdin, create a separate approval memo with the feedback id or request id and exact content.
- Team, owner, and client update artifacts should name the audience and include the exact message body or a complete summary. Client updates should include target contact ids when used.
feedback review --request-ids,feedback move --feedback-ids,mission status --mission-ids,mission archive --mission-ids, andrun-qaqc --mission-idsare batched governed writes, but they are markedNot requiredand should not receive approval artifact flags.
For actions marked Not required, call the command directly. The backend still enforces project-key authentication, idempotency, owner/delegate capability rules, stale-state guards, validation, rate limits, and audit history.
Agent Usage Contract
Codex, Claude, and other coding agents should use one project-scoped key per workspace:
MYTE_API_KEY=<project_api_key>The key resolves the project server-side. Agents should not pass project_id manually for normal CLI commands, and they should not call account-scoped web/JWT endpoints with this key.
Recommended agent flow:
- Run
myte config --jsonto confirm the project, API base, configured repos, and local workspace detection. - Run
myte bootstrap --json,myte feedback-sync --json, ormyte sync-qaqc --jsonto hydrate local context underMyteCommandCenter.bootstrapalso writesMyteCommandCenter/AgentsMyteAPI.md, the local action matrix agents should consult before mutating Myte state. Usemyte suggestions sync --jsononly for narrow mission-review refreshes after bootstrap. - Use
myte query "<goal/evidence/ask>" --with-diffwhen local code changes matter. - Use
myte create-prd <file.md> --confirm-write --approval-artifact <path>only after the PRD markdown has been reviewed by a human. The file body is the PRD document;--descriptionis only the short board/card summary. - Use
myte feedback status|edit|assign|archive|refineto create reviewable local artifacts.feedback submitandfeedback reviserequire an approval artifact;feedback reviewdoes not because the backend owner/delegate review membrane is the approval control. - Use
myte feedback moveonly for direct board movement that is intentionally audited, with a clear--reason; use--feedback-idsfor batch moves or batch archive. - Use
myte suggestions create|revise|reviewfor mission review threads.suggestions createandsuggestions reviserequire an approval artifact;suggestions reviewdoes not because the backend Project Owner/elevated-delegate decision is the approval control. Valid createchange_typevalues are exactlyupdateandcreate; revisions keep the existing thread type and must not includechange_type. - Use
myte mission archivefor project-key mission lifecycle archival. Archive requires Project Owner or elevated delegate capability; restore is web-only from the archived missions board. - Use
myte update-team "<content>" --confirm-write --approval-artifact <path>for project/team comments through/api/project-assistant/project-comment, andmyte feedback comment --feedback-id <id> --body-file ./comment.md --confirm-write --approval-artifact ./comment.mdfor feedback-specific implementation notes.
PRD document contract:
- Always put the complete PRD in the markdown file passed to
myte create-prd. titlemaps to the feedback/board title.descriptionmaps to the short feedback/card summary and must not contain the full PRD.- The markdown body is sent as
prd_markdownorticket_markdown, stored as the PRD document source, mirrored as PRD text for search/sync, and used by the backend to generate the PRD DOCX. - The UI renders the PRD from the stored document text, not from the card description.
- Renderer-friendly PRDs should use one
# Title,##sections, concise paragraphs, bullets, GitHub tables/checklists where useful, and fenced code blocks only for real code/config. - Do not wrap the whole PRD in a
```markdownfence. Do not use raw HTML, inline style blocks, or decorative banners. - PRD identity is explicit:
myte create-prdcreates a PRD asset with PRD metadata. Generic uploaded.md,.docx,.pdf, and.txtfiles remain normal attachments unless explicitly created as PRDs.
Preferred file shape:
```myte-kanban
{
"title": "Feedback Search PRD",
"description": "Improve feedback search across titles, descriptions, and stored PRD text.",
"priority": "Medium",
"tags": ["feedback", "search"]
}
```
# Feedback Search PRD
## Goal
Full PRD content goes here.Feedback comments nuance:
myte feedback-syncreads existing feedback comment turns and stores them inMyteCommandCenter/data/feedback.yml.- The web product supports feedback-specific comment create/fetch through JWT-authenticated
/api/feedbacks/<feedback_id>/comments. - The project-key npm CLI supports
myte feedback comment --feedback-id <id> --body "..." --confirm-write --approval-artifact ./comment.mdand--body-file ./comment.md --confirm-write --approval-artifact ./comment.md. - Project-key feedback comments are text-only in this slice and cap content at 500,000 characters. Use the web UI when attachments are required.
Commands
config: verify the project key and inspect local repo resolutionbootstrap: write project board context locallyrun-qaqc: queue QAQC for explicit mission idsmission status: update active mission statemission archive: archive missions without hard deletesync-qaqc: refresh active mission QAQC context locallyfeedback-sync: refresh feedback and PRD context locallyfeedback status|edit|assign|archive|refine: create reviewable local feedback artifacts onlyfeedback submit|revise|comment: live Feedback writes requiring--confirm-write --approval-artifact <path>feedback review|move|undo|apply: governed Feedback writes with no approval artifact flagsfeedback-sync|get|history|reviews|prd-versions|prd-diff|validate: read, sync, or validate Feedback statesuggestions sync|create|revise|review: work with mission suggestion workflow statequery: ask the project assistant, optionally with local diff contextai: use the Myte AI gatewaymytecody: MyteCody team launcher installed by this package. It supportsdoctor,doctor --probe-gateway,update --dry-run, andupdate. On first coding run, it installs the branded MyteCody engine and signed client assets from the Myte release manifest into a user-local Myte cache after signature/hash checks. Coding execution requires those assets, a reachable Myte AI Cody gateway, andMYTEAI_API_KEY. Normal coding runs use the branded Codex harness with Myte context hardening; the experimental controller is not the default product path.mytecody doctorreports both the signed MyteCody engine state and this npm package version.mytecody updateupdates the engine only. Usenpm install -g myte@latestto update the launcher and the Myte API CLI commands shipped by npm.create-prd: upload deterministic PRD markdown as the stored renderable PRD document; usedescriptiononly as the short card summaryupdate-team,update-owner,update-client: send project updates through the project-key surface
Notes
- The package ships the CLI only. Internal rollout notes, validation logs, and project-specific operating docs are not part of the public npm contract.
- The package does not bundle the large MyteCody engine binary or the async
Responses bridge implementation. The
mytecodylauncher installs or updates signed engine/client assets through the Myte release manifest. mytecody updateis intentionally engine-scoped. npm package updates usenpm install -g myte@latest.- The public
mytepackage is the supported entrypoint. The scoped@mytegroupinc/myte-corepackage is the implementation dependency used by the wrapper. - See
THIRD_PARTY_NOTICES.mdandTRADEMARKS.mdfor Codex lineage and Myte brand notices.
Mission Action Map
| Action | Command / Surface | Contract |
| --- | --- | --- |
| Sync mission cards and review threads | myte bootstrap --json | Refreshes MyteCommandCenter/data/missions/*.yml, project structure, and MyteCommandCenter/data/mission-ops.yml. |
| Sync only mission review threads | myte suggestions sync --json | Narrow refresh for mission-ops.yml after bootstrap or a mutation. |
| Suggest edit to existing mission | myte suggestions create --file ./create.yml --confirm-write --approval-artifact ./create.yml with change_type: update and mission_id | Creates or appends to an active review thread; live mission is unchanged until approval. |
| Suggest new mission | myte suggestions create --file ./create.yml --confirm-write --approval-artifact ./create.yml with change_type: create | Requires change_set.title and change_set.description; mission card is created only after approval. |
| Revise a suggestion | myte suggestions revise --file ./revise.yml --confirm-write --approval-artifact ./revise.yml with suggestion_id | Adds another revision to the same thread. Do not include change_type. |
| Review a suggestion | myte suggestions review with review_action: approve|request_changes|reject | Project Owner or elevated mission-review delegate required; no approval artifact required. |
| Update mission status | myte mission status --mission-ids "M001" --status todo|in_progress|done | Active status update only; no approval artifact required; refreshes local bootstrap + mission-ops by default. |
| Archive mission | myte mission archive --mission-ids "M001" --reason "..." | Project Owner or elevated delegate required; no approval artifact required. Keeps the mission record, hides it from normal board/bootstrap state, and refreshes local bootstrap + mission-ops by default. |
After bootstrap, find ids locally:
- existing mission ids:
MyteCommandCenter/data/missions/*.yml->mission_id - suggestion ids:
MyteCommandCenter/data/mission-ops.yml->queue[].suggestion_idorthreads[].suggestion_id - revise revision:
threads[].latest_revisionorthreads[].latest_server_revision.revision - review revision:
threads[].review_revision - thread type:
threads[].change_type
Feedback Action Map
| Command | What It Does | Governance |
| --- | --- | --- |
| feedback-sync | Pulls non-archived feedback metadata, comments, and PRD context into MyteCommandCenter. | Read-only project-key API call; archived Feedback is intentionally excluded. |
| feedback get | Reads one feedback item's current server snapshot and snapshot_hash. | Read-only; backend checks project access. |
| feedback status | Creates a local YAML proposal to change canonical lifecycle state. | No live mutation until submit and owner/delegate review, except owner-direct apply. |
| feedback edit / feedback refine | Creates a local YAML proposal for title, description/body, priority, due date, tags, or notes. | Content changes go through owner-review membrane. |
| feedback assign | Creates a local YAML proposal to change assignee. | Goes through review unless applied through owner-direct path. |
| feedback archive | Creates a local YAML proposal to archive. | Archive is governed by backend owner/delegate capability. |
| feedback submit | Sends a local proposal artifact to the backend as a review request. | Requires --confirm-write --approval-artifact <path>; does not mutate live feedback before approval. |
| feedback revise | Resubmits the original submitter's request after request_changes. | Requires --confirm-write --approval-artifact <path>; only valid for the original submitter and needs_changes requests. |
| feedback reviews | Lists review requests or fetches one request by --request-id. | Read-only; response includes backend permissions. |
| feedback review | Approves, rejects, requests changes, or cancels one review request, or a batch with --request-ids. | No approval artifact required; backend restricts approval/review decisions to Project Owner or elevated delegate for Feedback scope; batch review uses one grouped notification path. |
| feedback move | Moves a card or batch of cards across allowed board states directly with an audit event. | No approval artifact required. --feedback-ids sends one batch request. Blocked with pending_feedback_review while an active linked review request exists; governed states such as archive/reject/deploy/freeze remain backend-authorized. Project-key unarchive is not supported. |
| feedback comment | Creates a text-only comment on one Feedback item. | Requires --confirm-write --approval-artifact <path>; backend checks project-key access, owner/assigned permission, idempotency, and the 500,000-character content cap. Attachments remain web UI only. |
| feedback undo | Reverses an audited board event when there is no conflict. | No approval artifact required; backend validates event ownership/project scope and conflict state. |
| feedback prd-versions | Lists retained PRD baselines/revisions for a feedback item. | Read-only; old S3 objects are retained by reference. |
| feedback prd-diff | Fetches backend-generated text diff for PRD versions. | Read-only; backend controls version access. |
| feedback history | Lists audited feedback board/refinement events. | Read-only; backend checks project access. |
| feedback validate | Sends an artifact to backend validation without mutation. | Useful before submit or owner-direct apply. |
| feedback apply | Applies an artifact through the owner-direct/emergency path. | No approval artifact required; not the normal collaborator flow; normal flow is submit -> review. |
Canonical feedback lifecycle states are frozen, todo, in_progress, in_review, completed, deployed, rejected, and archived.
Reusable live smoke harness after deploy:
npx --package @mytegroupinc/myte-core node ./node_modules/@mytegroupinc/myte-core/scripts/feedback-live-full-harness.js --confirm-live --base-url https://api.myte.dev/apiThe harness creates five disposable TEST feedback items from markdown, verifies batch review and batch board movement, batch archives the disposable items, verifies normal feedback-sync excludes archived items, and verifies the project-key surface does not expose Feedback unarchive/restore.
Direct Project API Surface
All routes use Authorization: Bearer <MYTE_API_KEY>. The CLI adds idempotency and client-session headers on mutation routes.
myte ai is separate from this project-scoped surface. It uses MYTEAI_API_KEY and calls POST https://api.myte.ai/v1/chat/completions, or ${MYTEAI_API_BASE}/v1/chat/completions when that base is configured.
Read/sync routes:
GET /api/project-assistant/query/<job_id>GET /api/project-assistant/configGET /api/project-assistant/bootstrapGET /api/project-assistant/qaqc-syncGET /api/project-assistant/feedback-syncGET /api/project-assistant/feedback/<feedback_id>GET /api/project-assistant/feedback/<feedback_id>/refinement/historyGET /api/project-assistant/feedback-review-requestsGET /api/project-assistant/feedback-review-requests/<request_id>GET /api/project-assistant/feedback/<feedback_id>/eventsGET /api/project-assistant/feedback/<feedback_id>/prd/versionsGET /api/project-assistant/feedback/<feedback_id>/prd/versions/<version_id>/diffGET /api/project-assistant/suggestionsGET /api/project-assistant/run-qaqc/<batch_id>
Mutation routes:
POST /api/project-assistant/queryPOST /api/project-assistant/run-qaqcPOST /api/project-assistant/mission-status-updatePOST /api/project-assistant/mission-archivePOST /api/project-assistant/project-commentPOST /api/project-assistant/update-ownerPOST /api/project-assistant/client-update-draftsPOST /api/project-assistant/create-prdPOST /api/project-assistant/create-prdsPOST /api/project-assistant/feedback/<feedback_id>/refinement/validatePOST /api/project-assistant/feedback/<feedback_id>/refinement/requestsPOST /api/project-assistant/feedback-review-requests/<request_id>/revisePOST /api/project-assistant/feedback/<feedback_id>/refinement/applyPOST /api/project-assistant/feedback-review-requests/<request_id>/reviewPOST /api/project-assistant/feedback-review-requests/batch-reviewPOST /api/project-assistant/feedback-review-requests/<request_id>/request-changesPOST /api/project-assistant/feedback-review-requests/<request_id>/cancelPOST /api/project-assistant/feedback/<feedback_id>/board-movePOST /api/project-assistant/feedback/batch-board-movePOST /api/project-assistant/feedback/<feedback_id>/commentsPOST /api/project-assistant/feedback/<feedback_id>/events/<event_id>/undoPOST /api/project-assistant/suggestionsPOST /api/project-assistant/suggestions/revisePOST /api/project-assistant/suggestions/review
