| [ Web Proxy ] |
| Viewing: https://commandcode.ai/docs/workflows | [Back] [Original] |
Step-by-step recipes for everyday tasks. Each workflow shows a concrete scenario, the prompts to use, and what to expect.
Start Command Code in the project root and ask for a high-level overview, then drill into specifics.
Get a broad overview
> give me a brief overview of this codebase - structure, key packages, and entry points
Explore the architecture
> explain the architecture patterns used here and how the modules connect
Zoom into a specific area
> how is the payment system implemented? walk me through the flow from checkout to confirmation
Taste learning shows up inline as it happens: a green TASTE row lands in the transcript with what was learned, its confidence, and a link to the taste.md it was written to.
Use @ to include files or directories in any prompt. This gives Command Code the exact context it needs.
Reference a single file
> explain the validation logic in @src/lib/auth.ts
This helps Command Code focus on the right file and provide targeted suggestions.
Reference a directory
> look at @src/app/api and explain the route structure
Command Code reads the directory listing and explains how the files relate.
Use the IDE extension for instant context
If you're using an IDE like Visual Studio Code or Cursor, install the Command Code extension with /ide or cmd --ide-setup. Once installed, selecting lines of code or clicking a file in your editor automatically injects that context into your prompt. No need to reference file paths manually with @.
@ triggers autocomplete for files and directories - start typing and press tab to select.
Share an error, let Command Code trace the root cause, and apply the fix.
Share the error
> I'm seeing a TypeError when I run `pnpm dev` - "Cannot read properties of undefined (reading 'map')"
Find the root cause
> find where this error originates and explain why it happens
Apply the fix and verify
> fix the bug in @src/components/UserList.tsx and run `pnpm dev` to verify
Paste the full stack trace into the prompt - Command Code uses it to pinpoint the exact file and line causing the error.
Modernize a module while keeping behavior identical.
Identify what to refactor
> refactor @src/api/client.ts from callbacks to async/await - keep the same public API
Review and apply changes
Command Code shows a diff. Approve the edits or ask for adjustments before they're written.
Run tests to confirm
> run the tests for the API client to make sure nothing broke
Press Esc twice to open the checkpoint selector and rewind if the refactor went wrong.
Add tests for a module using the testing framework your project already uses.
Generate tests
> add tests for @src/lib/auth.ts using Vitest - cover the happy path, invalid tokens, and expired sessions
Run and iterate
> run the tests and fix any failures
Add edge cases
> add edge case tests for concurrent session limits and malformed JWTs
Ask Command Code to run tests after writing them - it catches failures and iterates until the suite passes.
Review changes, generate a PR, and polish the description - all without leaving the terminal.
Review your changes
> summarize the changes I've made to the auth module and check for anything I missed
Create the PR
> create a pull request for these changes with a clear description and test plan
Command Code generates the title, description, and test plan using your commit history and diff.
Polish the description
> add a section about migration steps and link to the relevant RFC
Command Code requires the GitHub CLI (gh) to create PRs. Install and authenticate it first.
Paste a screenshot of the broken UI directly into the terminal and let Command Code identify and fix the issue.
Share the screenshot
Copy a screenshot to your clipboard and paste it into the terminal, or reference an image file:
> the modal is broken - here's what QA reported @screenshots/broken-modal.png
Identify the issue
Command Code analyzes the image, identifies the visual bug (overlapping elements, wrong spacing, missing styles), and locates the responsible component.
Apply the fix
> fix the z-index and padding issues in @src/components/Modal.tsx
Reference images with @path/to/screenshot.png - Command Code reads them like any other file. To paste one straight from your clipboard, press ctrl+v - see Pasting images.
Pick up where you left off with --continue (most recent) or --resume (conversation picker).
Continue the most recent conversation
cmd --continue
This resumes your last conversation immediately.
Browse and select a past conversation
cmd --resume
This displays an interactive picker:
Modified # Messages Git Branch Summary
1. 20 hours ago 172 main Follow this practice and up...
2. 21 hours ago 13 main Add the common workflows he...
3. 22 hours ago 2 main does this {src/components/u...
4. 22 hours ago 82 main pnpm dlx shadcn@latest add ...
5. 1 day ago 2 ankit/features all tools support you have
6. 2 days ago 20 ankit/commands Update the content in each ...
Use arrow keys to navigate, Enter to select, Esc to exit.
Your taste profile carries between sessions - Command Code remembers your preferences even in new conversations.
Use plan mode to explore the codebase and design an approach before any files change.
Enter plan mode
cmd --plan
Or press shift+tab inside an active session to cycle into plan mode.
Describe what you want to build
> design a role-based access control system for the API - explore the current auth setup first
Command Code reads files and proposes an implementation plan without making changes.
Review the plan and execute
Review the proposed steps. Approve to let Command Code implement them, or refine the plan first.
Plan mode is read-only - Command Code explores but does not change files until you approve. See Plan mode.
Push your taste profile to the cloud and pull it on another machine.
Push from your current machine
cmd taste push
Pull on another machine
cmd taste pull
Verify your profiles
cmd taste list
This shows all taste profiles synced to your account. Manage your taste at Command Code Studio.
cmd taste and npx taste are equivalent. See Taste commands for the full list.
Use the /review command to get an analysis of a PR without leaving the terminal.
Start the review
/review 42
Command Code fetches the PR diff, analyzes the changes, and provides a structured review.
Read the analysis
The review covers code quality, potential bugs, missing tests, and style issues.
Fetch PR comments to address feedback
/pr-comments
Retrieves all PR comments - issue comments and inline review comments - from the pull request associated with your current branch so you can address feedback directly in your session.
Leave comments
> add a comment on the PR about the missing error handling in the webhook handler
Use /pr-comments on your feature branch to pull in all review feedback and address comments without leaving the terminal.
Create a shareable link to show teammates what you've tried.
Debug with Command Code
Work through the problem in a normal session - reproduce the bug, investigate, try fixes.
Share the session
/share
This copies a shareable link to your clipboard.
Stop sharing when done
/unshare
Local file paths are automatically removed from shared conversations.
Press ctrl+g to open your $EDITOR for multi-line prompts with code examples.
Open your editor
Press ctrl+g in the input line. Your configured $EDITOR opens with a temporary file.
Write your prompt
Write a detailed, multi-paragraph prompt. Include code examples, constraints, or references. Save and close the editor.
Submit
The editor content becomes your prompt and is submitted automatically.
Set your editor: export EDITOR=vim or export EDITOR="code --wait". See Setting up your editor.
Questions or feedback? Join the Discord community.
| Web Proxy Viewer | New URL | Original Page |