Repository navigation
Expand file tree
/
Copy pathtips.json
More file actions
815 lines (815 loc) · 66 KB
/
Copy pathtips.json
File metadata and controls
815 lines (815 loc) · 66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
{
"version": "1.2.13",
"categories": [
{ "id": "input", "label": "Typing & Input", "icon": "\u2328\ufe0f" },
{ "id": "agents", "label": "Agents", "icon": "\ud83e\udd16" },
{ "id": "sessions", "label": "Sessions & History", "icon": "\ud83d\udcac" },
{ "id": "sharing", "label": "Sharing & Export", "icon": "\ud83d\udce4" },
{ "id": "navigation", "label": "Navigation & UI", "icon": "\ud83e\udded" },
{ "id": "config", "label": "Configuration", "icon": "\u2699\ufe0f" },
{ "id": "permissions", "label": "Permissions & Safety", "icon": "\ud83d\udd12" },
{ "id": "tools", "label": "Tools & Plugins", "icon": "\ud83d\udd27" },
{ "id": "commands", "label": "Custom Commands", "icon": "\ud83d\udcdd" },
{ "id": "themes", "label": "Themes", "icon": "\ud83c\udfa8" },
{ "id": "models", "label": "Models & Providers", "icon": "\ud83d\udd0c" },
{ "id": "cli", "label": "CLI & Scripting", "icon": "\ud83d\udcbb" },
{ "id": "formatting", "label": "Formatting & LSP", "icon": "\ud83d\udccf" },
{ "id": "github", "label": "GitHub Integration", "icon": "\ud83d\udc19" },
{ "id": "undoredo", "label": "Undo / Redo", "icon": "\u21a9\ufe0f" },
{ "id": "other", "label": "Other", "icon": "\ud83d\udce6" }
],
"tips": [
{
"id": 1,
"category": "input",
"tip": "Type @ followed by a filename to fuzzy search and attach files",
"shortcut": "@",
"description": "When you're typing a message to the AI, type the @ symbol and then start typing part of a filename. OpenCode will search your entire project for files that match what you're typing and show you a list to pick from. When you select a file, its full contents get included in your message as context \u2014 so the AI can actually read and understand that file when answering your question. This is how you say 'hey AI, look at this specific file.'",
"keywords": ["file", "attach", "search", "context", "fuzzy"]
},
{
"id": 2,
"category": "input",
"tip": "Start a message with ! to run shell commands directly (e.g., !ls -la)",
"shortcut": "!",
"description": "Normally when you type something in OpenCode, your message goes to the AI. But if you start your message with an exclamation mark (!), OpenCode runs it as a terminal command instead. For example, typing '!ls -la' lists all files in the current directory, and '!git status' shows your git status. The output appears right in the chat. It's a quick way to run commands without leaving OpenCode or asking the AI to do it for you.",
"keywords": ["shell", "command", "terminal", "run", "execute", "bang"]
},
{
"id": 3,
"category": "input",
"tip": "Press Shift+Enter or Ctrl+J to add newlines in your prompt",
"shortcut": "Shift+Enter",
"description": "When you're typing a message in OpenCode, pressing Enter sends it immediately. But sometimes you want to write a message that spans multiple lines \u2014 like pasting code, writing a detailed request, or listing several things. Hold the Shift key and press Enter (or press Ctrl+J) to go to the next line without sending the message. Keep typing, add as many lines as you want, and when you're finally ready to send, just press Enter by itself.",
"keywords": ["newline", "multiline", "enter", "typing"]
},
{
"id": 4,
"category": "input",
"tip": "Press Ctrl+C when typing to clear the input field",
"shortcut": "Ctrl+C",
"description": "If you've been typing a long message and decide you want to start over, press Ctrl+C. It erases everything in the input box so you can start fresh. This only works while you're typing \u2014 it won't stop the AI if it's already generating a response (use Escape for that).",
"keywords": ["clear", "reset", "input", "cancel"]
},
{
"id": 5,
"category": "input",
"tip": "Press Escape to stop the AI mid-response",
"shortcut": "Escape",
"description": "Sometimes the AI starts generating a long answer and you realize it's going in the wrong direction, or you just want it to stop. Press the Escape key and the AI immediately stops generating. Whatever it already wrote stays visible, but it won't continue. You can then type a new message to redirect the conversation.",
"keywords": ["stop", "cancel", "abort", "interrupt"]
},
{
"id": 6,
"category": "input",
"tip": "Press Ctrl+X E or /editor to compose messages in your external editor",
"shortcut": "Ctrl+X E",
"description": "For really long or complex messages, the little input box in OpenCode can feel limiting. This shortcut opens your system's default text editor (whatever your $EDITOR environment variable is set to \u2014 like vim, nano, VS Code, or Sublime Text). You write your entire message there with full editing power \u2014 copy/paste, find/replace, multiple cursors, whatever your editor supports. When you save and close the editor, the text gets sent to OpenCode as your message.",
"keywords": ["editor", "external", "vim", "compose", "long message"]
},
{
"id": 7,
"category": "input",
"tip": "Press Ctrl+V to paste images from your clipboard into the prompt",
"shortcut": "Ctrl+V",
"description": "If you've copied a screenshot or image to your clipboard (for example, using a screenshot tool, or right-clicking an image and choosing 'Copy'), you can paste it directly into OpenCode with Ctrl+V. The AI can then see and analyze that image \u2014 describe what's in it, read text from screenshots, identify UI elements, spot bugs in error screenshots, and more. This works with most AI models that support vision.",
"keywords": ["image", "paste", "screenshot", "clipboard", "vision"]
},
{
"id": 8,
"category": "input",
"tip": "Drag and drop images into the terminal to add them as context",
"shortcut": null,
"description": "Instead of copy-pasting, you can literally drag an image file from your file manager (like Finder on Mac or Files on Linux) and drop it onto the OpenCode terminal window. The image gets attached to your next message, and the AI can see and analyze it \u2014 just like pasting from clipboard, but using drag-and-drop instead.",
"keywords": ["image", "drag", "drop", "file", "vision"]
},
{
"id": 9,
"category": "agents",
"tip": "Press Tab to cycle between Build and Plan agents",
"shortcut": "Tab",
"description": "OpenCode comes with two built-in agents (think of them as two different 'modes' the AI operates in). The Build agent is the default \u2014 it can read your code, edit files, run shell commands, and actually make changes to your project. The Plan agent is read-only \u2014 it can look at your code and give you suggestions, but it won't touch anything. Press the Tab key to switch between them. Use Build when you want the AI to do work, and Plan when you just want advice.",
"keywords": ["build", "plan", "switch", "mode", "agent"]
},
{
"id": 10,
"category": "agents",
"tip": "Switch to Plan agent to get suggestions without making actual changes",
"shortcut": "Tab",
"description": "The Plan agent is like having a senior developer look over your shoulder and give advice without touching your keyboard. When you switch to Plan mode, the AI can read all your files, analyze your code, suggest approaches, and explain things \u2014 but it absolutely cannot edit any files or run any commands. This is perfect when you want to think through a problem, get architecture advice, or understand code before committing to changes.",
"keywords": ["plan", "read-only", "suggest", "advice", "safe"]
},
{
"id": 11,
"category": "agents",
"tip": "Use @agent-name in prompts to invoke specialized subagents",
"shortcut": "@",
"description": "If you or your team has created custom agents (specialized AI personas with specific instructions and permissions), you can call them by name using the @ symbol. For example, if you created a 'reviewer' agent, type '@reviewer check this function for security issues' and that specific agent handles the request using its own custom instructions, model, and permission settings. It's like calling in a specialist.",
"keywords": ["subagent", "invoke", "mention", "specialized", "custom"]
},
{
"id": 12,
"category": "agents",
"tip": "Run opencode agent create for guided agent creation",
"shortcut": null,
"description": "This command starts an interactive wizard in your terminal that walks you through creating a brand new custom agent step-by-step. It asks you questions like: What should this agent do? What AI model should it use? Should it be a primary agent or a subagent? What's its creativity level? What permissions does it have (can it edit files? run commands?). When you're done answering, it generates a ready-to-use agent configuration file. No need to write config files by hand.",
"keywords": ["create", "wizard", "interactive", "setup", "new agent"]
},
{
"id": 13,
"category": "agents",
"tip": "Add .md files to .opencode/agent/ for specialized AI personas",
"shortcut": null,
"description": "This is the manual way to create agents (as opposed to the guided wizard). You create a Markdown file inside the .opencode/agent/ folder in your project (for example, .opencode/agent/reviewer.md). The file has two parts: a YAML header at the top (between --- lines) where you set the model, permissions, and mode, and then the body text which becomes the agent's instructions \u2014 telling it who it is, what it's good at, and how it should behave.",
"keywords": ["agent", "markdown", "create", "manual", "persona"]
},
{
"id": 14,
"category": "agents",
"tip": "Configure per-agent permissions for edit, bash, and webfetch tools",
"shortcut": null,
"description": "Each agent you create can have completely different rules about what it's allowed to do. You might have a 'build' agent that can edit any file and run any shell command freely, while your 'reviewer' agent can only read files and is blocked from editing or running commands. The three main permission categories are: 'edit' (can it change files?), 'bash' (can it run terminal commands?), and 'webfetch' (can it access the internet?). Each can be set to 'allow', 'deny', or 'ask' (requires your approval each time).",
"keywords": ["permissions", "edit", "bash", "webfetch", "allow", "deny", "ask"]
},
{
"id": 15,
"category": "agents",
"tip": "Set agent temperature from 0.0 (focused) to 1.0 (creative)",
"shortcut": null,
"description": "Temperature is a setting that controls how 'random' or 'creative' the AI's responses are. At 0.0, the AI gives the most predictable, consistent, deterministic answers \u2014 it always picks the most likely next word. At 1.0, it's much more creative and varied \u2014 you'll get different answers each time you ask the same question. For writing code, lower temperatures (0.0\u20130.3) are usually better because you want reliable, correct output. For brainstorming or creative writing, higher temperatures work well.",
"keywords": ["temperature", "creativity", "randomness", "deterministic"]
},
{
"id": 16,
"category": "agents",
"tip": "Configure steps to limit agentic iterations per request",
"shortcut": null,
"description": "When the AI works on a complex task, it doesn't just answer in one shot. It loops through a cycle: think about what to do, use a tool (read a file, run a command, edit code), look at the result, think again, use another tool, and so on. The 'steps' setting puts a maximum cap on how many of these loops the AI can do before it's forced to stop and give you a final answer. This prevents the AI from going on endlessly if it gets stuck in a complicated task, and helps control costs since each step uses tokens.",
"keywords": ["steps", "iterations", "limit", "loop", "agentic"]
},
{
"id": 17,
"category": "agents",
"tip": "Override global tool settings per agent configuration",
"shortcut": null,
"description": "You can set up default permission rules that apply to all agents globally (like 'always ask before running shell commands'). But then for a specific agent, you can override those defaults. For example, your global config might require approval for all bash commands, but your 'build' agent could be configured to auto-allow git commands without asking. The agent-level settings take priority over the global ones, giving you fine-grained control.",
"keywords": ["override", "global", "per-agent", "tools", "settings"]
},
{
"id": 18,
"category": "sessions",
"tip": "Press Ctrl+X N or /new to start a fresh conversation session",
"shortcut": "Ctrl+X N",
"description": "This starts a completely new conversation from scratch. The AI forgets everything from your previous chat \u2014 all the context, all the files you discussed, all the changes you made together. It's like meeting the AI for the first time again. Your old session isn't deleted though \u2014 it's saved and you can go back to it later. Use this when you're switching to a completely different task.",
"keywords": ["new", "session", "fresh", "start over", "clean"]
},
{
"id": 19,
"category": "sessions",
"tip": "Use /sessions or Ctrl+X L to list and continue previous conversations",
"shortcut": "Ctrl+X L",
"description": "Every conversation you've had with OpenCode is saved. This command shows you a list of all your past sessions \u2014 with their names, dates, and a preview of what you were working on. You can scroll through the list, pick any session, and jump right back into it. The AI remembers everything from that conversation and you can continue where you left off. Great for picking up work from yesterday or last week.",
"keywords": ["sessions", "list", "history", "continue", "resume"]
},
{
"id": 20,
"category": "sessions",
"tip": "Run /compact to summarize long sessions near context limits",
"shortcut": null,
"description": "Every AI model has a maximum amount of text it can 'remember' at once (called the context window). If your conversation gets really long \u2014 lots of messages, lots of file contents, lots of tool outputs \u2014 you'll eventually hit that limit, and the AI starts 'forgetting' the earlier parts of your conversation. The /compact command takes your entire conversation so far and condenses it into a short summary, freeing up space so you can keep working without losing the important context.",
"keywords": ["compact", "summarize", "context", "limit", "memory", "token"]
},
{
"id": 21,
"category": "sessions",
"tip": "Use opencode --continue to resume the last session",
"shortcut": null,
"description": "When you open OpenCode from your terminal, it normally starts a brand new session. But if you add the --continue flag (like 'opencode --continue'), it picks up exactly where your last conversation left off. The AI remembers everything you discussed and all the changes that were made. It's a quick way to get back to work without navigating through the sessions list.",
"keywords": ["continue", "resume", "last session", "flag"]
},
{
"id": 22,
"category": "sessions",
"tip": "Press Ctrl+X Right/Left to cycle through parent and child sessions",
"shortcut": "Ctrl+X Right",
"description": "Sessions can branch off from each other, creating a tree-like structure (similar to git branches). For example, you might fork a conversation to try a different approach. These arrow key shortcuts let you navigate between a session and its branches \u2014 Right arrow goes to child/branched sessions, Left arrow goes back to the parent session you branched from.",
"keywords": ["parent", "child", "branch", "fork", "navigate"]
},
{
"id": 23,
"category": "sessions",
"tip": "Use /rename to rename the current session",
"shortcut": null,
"description": "OpenCode automatically generates names for your sessions (usually based on the first message). If you want something more memorable or descriptive, use /rename to give it a custom name \u2014 like 'auth-refactor', 'fix-login-bug', or 'database-migration-v2'. This makes it much easier to find specific sessions later when browsing your history.",
"keywords": ["rename", "session", "name", "label"]
},
{
"id": 24,
"category": "sharing",
"tip": "Run /share to create a public link to your conversation at opencode.ai",
"shortcut": null,
"description": "This creates a public URL (a web link) that anyone can visit to read your entire conversation. The link goes to opencode.ai and shows your full chat with all messages, code, and AI responses. This is useful for showing a colleague how you solved a problem, sharing a debugging session in a bug report, or creating a tutorial-style walkthrough of how you built something.",
"keywords": ["share", "link", "public", "url", "web"]
},
{
"id": 25,
"category": "sharing",
"tip": "Press Ctrl+X X or /export to save the conversation as Markdown",
"shortcut": "Ctrl+X X",
"description": "This saves your entire conversation to a Markdown (.md) file on your computer. The file contains all your messages, the AI's responses, code blocks, and tool outputs \u2014 formatted as readable Markdown. You can open it in any text editor, include it in documentation, or keep it as a record of how you built something.",
"keywords": ["export", "markdown", "save", "file", "download"]
},
{
"id": 26,
"category": "sharing",
"tip": "Press Ctrl+X Y to copy the assistant's last message to clipboard",
"shortcut": "Ctrl+X Y",
"description": "Quickly copies the AI's most recent response to your system clipboard. After pressing this shortcut, you can paste (Ctrl+V) that response into any other application \u2014 a code editor, a document, an email, a Slack message, wherever you need it. It copies the complete text including any code blocks.",
"keywords": ["copy", "clipboard", "yank", "last message"]
},
{
"id": 27,
"category": "sharing",
"tip": "Set \"share\": \"auto\" to automatically share all sessions",
"shortcut": null,
"description": "When you add '\"share\": \"auto\"' to your OpenCode configuration file, every conversation you have automatically gets a public shareable link without you needing to run /share manually. This is useful for teams that want full transparency and want to share all AI interactions by default \u2014 like for training, auditing, or collaboration purposes.",
"keywords": ["share", "auto", "automatic", "config"]
},
{
"id": 28,
"category": "sharing",
"tip": "Set \"share\": \"disabled\" to prevent any session sharing",
"shortcut": null,
"description": "The opposite of auto-sharing. When you add '\"share\": \"disabled\"' to your config, the sharing feature is completely turned off. Nobody can create public links \u2014 not even accidentally. The /share command won't work. This is important for teams working on sensitive, proprietary, or confidential codebases where no conversation should ever be made public.",
"keywords": ["share", "disabled", "prevent", "private", "security"]
},
{
"id": 29,
"category": "sharing",
"tip": "Run /unshare to remove a session from public access",
"shortcut": null,
"description": "If you previously shared a session (created a public link) and then realize you don't want it public anymore \u2014 maybe it contains sensitive information, a secret, or just something you'd rather keep private \u2014 run /unshare. It takes down the public link so nobody can access it anymore. Anyone who visits the old URL will get an error instead of your conversation.",
"keywords": ["unshare", "remove", "delete", "private", "revoke"]
},
{
"id": 30,
"category": "navigation",
"tip": "Press Ctrl+P to see all available actions and commands",
"shortcut": "Ctrl+P",
"description": "This opens the 'command palette' \u2014 a searchable popup that lists every single action and command available in OpenCode. If you forget a keyboard shortcut, don't remember the name of a command, or just want to see what's possible, press Ctrl+P and browse or search. It works just like the command palette in VS Code (Ctrl+Shift+P) \u2014 start typing to filter the list, then press Enter to run the action you want.",
"keywords": ["command palette", "actions", "search", "help", "all commands"]
},
{
"id": 31,
"category": "navigation",
"tip": "The leader key is Ctrl+X; combine with other keys for quick actions",
"shortcut": "Ctrl+X",
"description": "Most keyboard shortcuts in OpenCode follow a two-step pattern: first press Ctrl+X (this is called the 'leader key'), release it, then press another key to trigger the action. Think of Ctrl+X as saying 'hey OpenCode, I'm about to give you a command' \u2014 and the next key you press tells it which command. For example: Ctrl+X then N = new session, Ctrl+X then E = open editor, Ctrl+X then B = toggle sidebar. It's like a prefix that unlocks a whole set of shortcuts.",
"keywords": ["leader", "prefix", "shortcut", "keybind", "ctrl+x"]
},
{
"id": 32,
"category": "navigation",
"tip": "Press F2 to quickly switch between recently used models",
"shortcut": "F2",
"description": "If you frequently switch between different AI models (like Claude Sonnet, GPT-4, Gemini, etc.), pressing F2 shows a quick picker with just your recently used models. This is faster than opening the full model list with /models \u2014 it only shows the ones you've actually used, so you can switch back and forth quickly.",
"keywords": ["model", "switch", "recent", "quick", "F2"]
},
{
"id": 33,
"category": "navigation",
"tip": "Press Ctrl+X B to show/hide the sidebar panel",
"shortcut": "Ctrl+X B",
"description": "OpenCode has a sidebar panel that shows extra information (like a file tree, session details, or other contextual info). If you want more screen space for the main chat, hide the sidebar with this shortcut. Need to see it again? Press the same shortcut to bring it back. It toggles on and off.",
"keywords": ["sidebar", "panel", "toggle", "hide", "show"]
},
{
"id": 34,
"category": "navigation",
"tip": "Use PageUp/PageDown to navigate through conversation history",
"shortcut": "PageUp",
"description": "When your conversation gets long and scrolls off the screen, use the PageUp and PageDown keys to scroll through it. PageUp moves toward older messages (scrolls up), PageDown moves toward newer messages (scrolls down). Each press jumps a full 'page' worth of content, so it's faster than scrolling line by line.",
"keywords": ["scroll", "navigate", "page", "history", "up", "down"]
},
{
"id": 35,
"category": "navigation",
"tip": "Press Ctrl+G or Home to jump to the beginning of the conversation",
"shortcut": "Ctrl+G",
"description": "Instantly scrolls all the way to the very top of your conversation \u2014 the first message you sent in this session. Useful when you have a long chat and need to reference something from the beginning without manually scrolling through dozens of messages.",
"keywords": ["top", "beginning", "start", "jump", "home"]
},
{
"id": 36,
"category": "navigation",
"tip": "Press Ctrl+Alt+G or End to jump to the most recent message",
"shortcut": "End",
"description": "The opposite of jumping to the top. This instantly scrolls all the way to the bottom of your conversation \u2014 the most recent message. Useful after scrolling up to check something \u2014 one keypress brings you back to where the action is.",
"keywords": ["bottom", "end", "latest", "recent", "jump"]
},
{
"id": 37,
"category": "navigation",
"tip": "Press Ctrl+X G or /timeline to jump to specific messages",
"shortcut": "Ctrl+X G",
"description": "Opens a timeline view that shows an overview of every message in your conversation. You can see the list of all messages (yours and the AI's) and click or select any specific one to jump directly to it. Much faster than scrolling when you need to find a particular message in a long session.",
"keywords": ["timeline", "jump", "goto", "specific", "message"]
},
{
"id": 38,
"category": "navigation",
"tip": "Press Ctrl+X H to toggle code block visibility in messages",
"shortcut": "Ctrl+X H",
"description": "The AI's responses often contain a mix of explanatory text and code blocks. If you want to focus on just the text explanations (hiding the code), or just see the code (hiding the explanations), this shortcut toggles code blocks on and off. Useful when the AI gave a long response with lots of code and you want to quickly read just the narrative parts.",
"keywords": ["code", "toggle", "hide", "show", "visibility"]
},
{
"id": 39,
"category": "navigation",
"tip": "Press Ctrl+X S or /status to see system status info",
"shortcut": "Ctrl+X S",
"description": "Shows you a dashboard of information about OpenCode's current state: which AI model you're using, how many tokens you've used in this session, what MCP servers are connected, your current permissions, and other system-level details. It's your 'what's going on under the hood' view.",
"keywords": ["status", "info", "system", "tokens", "model"]
},
{
"id": 40,
"category": "navigation",
"tip": "Enable tui.scroll_acceleration for smooth macOS-style scrolling",
"shortcut": null,
"description": "By default, scrolling in OpenCode might feel choppy or linear. If you add '\"tui\": { \"scroll_acceleration\": true }' to your config, scrolling behavior changes to feel like a native macOS app \u2014 it starts slow when you begin scrolling and speeds up the more you scroll. This makes navigating long conversations feel much smoother and more natural.",
"keywords": ["scroll", "smooth", "acceleration", "macos", "tui"]
},
{
"id": 41,
"category": "navigation",
"tip": "Toggle username display in chat via command palette (Ctrl+P)",
"shortcut": "Ctrl+P",
"description": "By default, each message in the chat shows who sent it \u2014 'You' for your messages and 'Assistant' for the AI's responses. If you prefer a cleaner look without these labels, open the command palette (Ctrl+P), search for the username toggle option, and turn it off. The messages still appear in order, just without the name labels.",
"keywords": ["username", "display", "toggle", "clean", "labels"]
},
{
"id": 42,
"category": "navigation",
"tip": "Run /help or Ctrl+X H to show the help dialog",
"shortcut": "Ctrl+X H",
"description": "Opens the built-in help screen that shows all available commands, keyboard shortcuts, and features in OpenCode. This is your in-app reference guide \u2014 whenever you're unsure what you can do or how to do it, /help is the first place to look.",
"keywords": ["help", "guide", "reference", "shortcuts", "commands"]
},
{
"id": 43,
"category": "navigation",
"tip": "Press Ctrl+Z to suspend the terminal and return to your shell",
"shortcut": "Ctrl+Z",
"description": "This is a standard Unix feature that works in OpenCode too. Pressing Ctrl+Z pauses (suspends) OpenCode and drops you back to your normal terminal shell. OpenCode is still running in the background \u2014 it's just paused. When you're done with whatever you needed to do in your shell, type 'fg' (foreground) and press Enter to come right back to OpenCode exactly where you left off.",
"keywords": ["suspend", "background", "shell", "fg", "pause"]
},
{
"id": 44,
"category": "config",
"tip": "Create opencode.json in project root for project-specific settings",
"shortcut": null,
"description": "Each project can have its own OpenCode configuration. Create a file called 'opencode.json' in your project's root directory (the same folder where package.json or pyproject.toml lives). Any settings you put here only apply when you run OpenCode inside this project. For example, one project might use Claude as the default model while another uses GPT-4. These project settings override your global settings when there's a conflict.",
"keywords": ["config", "project", "local", "settings", "opencode.json"]
},
{
"id": 45,
"category": "config",
"tip": "Place settings in ~/.config/opencode/opencode.json for global config",
"shortcut": null,
"description": "While project configs only apply to one project, the global config applies everywhere \u2014 to every project you open with OpenCode. The file lives at ~/.config/opencode/opencode.json (the ~ means your home directory). Put your default model, preferred theme, default permissions, and other settings here. If a specific project needs different settings, its project-level opencode.json will override the global ones.",
"keywords": ["global", "config", "default", "home", "settings"]
},
{
"id": 46,
"category": "config",
"tip": "Add $schema to your config for autocomplete in your editor",
"shortcut": null,
"description": "Add this line to the very top of your opencode.json file: '\"$schema\": \"https://opencode.ai/config.json\"'. This tells your code editor (VS Code, Cursor, etc.) about the structure of OpenCode's config file. Once added, you get: autocomplete suggestions when you press Ctrl+Space (showing all valid config keys), hover documentation when you mouse over any key, red squiggly underlines for invalid values, and dropdown suggestions for settings that have specific allowed values. It makes editing your config much easier and less error-prone.",
"keywords": ["schema", "autocomplete", "editor", "validation", "intellisense"]
},
{
"id": 47,
"category": "config",
"tip": "Configure model in config to set your default model",
"shortcut": null,
"description": "Instead of choosing an AI model every time you start OpenCode, set a default in your config file. Add '\"model\": \"anthropic/claude-sonnet-4-5\"' (or whatever model you prefer) to your opencode.json. Now OpenCode automatically uses that model when you start a new session. You can still switch models during a session with /models or F2 \u2014 this just sets the starting default.",
"keywords": ["model", "default", "config", "starting", "automatic"]
},
{
"id": 48,
"category": "config",
"tip": "Override any keybind in config via the keybinds section",
"shortcut": null,
"description": "If you don't like OpenCode's default keyboard shortcuts, you can change any of them. Add a '\"keybinds\"' section to your opencode.json and remap any action to any key combination you prefer. For example, if you want Ctrl+N to start a new session instead of Ctrl+X N, just set it in the keybinds config. This is useful if OpenCode's shortcuts conflict with your terminal's shortcuts or your muscle memory from other tools.",
"keywords": ["keybind", "remap", "shortcut", "customize", "keyboard"]
},
{
"id": 49,
"category": "config",
"tip": "Set any keybind to none to disable it completely",
"shortcut": null,
"description": "If a keyboard shortcut keeps triggering accidentally and annoying you, you can turn it off entirely. In the keybinds section of your config, set the action to '\"none\"'. For example, '\"tips_toggle\": \"none\"' disables the tips toggle shortcut. The feature still exists (you can access it through the command palette), but the keyboard shortcut no longer does anything.",
"keywords": ["disable", "none", "keybind", "off", "remove"]
},
{
"id": 50,
"category": "config",
"tip": "Configure local or remote MCP servers in the mcp config section",
"shortcut": null,
"description": "MCP (Model Context Protocol) is a standard that lets AI tools connect to external services \u2014 like databases, APIs, web browsers, file systems, and more. In your opencode.json, you can configure which MCP servers OpenCode should connect to. These can be running on your own machine ('local') or hosted somewhere on the internet ('remote'). Once connected, the AI gains access to all the tools that MCP server provides. For example, connecting a GitHub MCP server lets the AI interact with your GitHub repos directly.",
"keywords": ["mcp", "server", "local", "remote", "tools", "protocol"]
},
{
"id": 51,
"category": "config",
"tip": "OpenCode auto-handles OAuth for remote MCP servers requiring auth",
"shortcut": null,
"description": "Some MCP servers require you to log in (authenticate) before they'll let you use them \u2014 like a GitHub or Google Workspace server. OpenCode handles this automatically. When you connect to a server that needs OAuth (a common login protocol), OpenCode opens a browser window for you to log in, handles the token exchange, and stores your credentials securely. You only need to do this once; after that, the connection works automatically.",
"keywords": ["oauth", "authentication", "login", "automatic", "mcp"]
},
{
"id": 52,
"category": "config",
"tip": "Use {env:VAR_NAME} syntax to reference environment variables in config",
"shortcut": null,
"description": "Instead of putting sensitive values (like API keys) directly in your config file, you can reference environment variables from your shell. Write '{env:MY_API_KEY}' in your config, and OpenCode automatically replaces it with the value of the MY_API_KEY environment variable from your terminal session. This way your config file can be committed to git safely without exposing secrets \u2014 the actual values come from your shell environment.",
"keywords": ["env", "environment", "variable", "secret", "reference"]
},
{
"id": 53,
"category": "config",
"tip": "Use {file:path} to include file contents in config values",
"shortcut": null,
"description": "Some config values might be really long \u2014 like a detailed system prompt or a long set of instructions. Instead of cramming all that text into your JSON config file, you can point to an external file. Write '{file:./prompts/my-system-prompt.md}' and OpenCode reads that file's contents and uses them as the config value. This keeps your config clean and lets you edit long text in a proper text file.",
"keywords": ["file", "include", "contents", "external", "reference"]
},
{
"id": 54,
"category": "config",
"tip": "Use instructions in config to load additional rules files",
"shortcut": null,
"description": "The 'instructions' config key lets you point to one or more Markdown files that get added to the AI's system prompt (the hidden instructions the AI follows). For example, '\"instructions\": [\"./AGENTS.md\", \"./CODING_STANDARDS.md\"]' would load both files and include their contents as rules the AI must follow. This is how you give the AI project-specific guidelines like coding conventions, architecture decisions, or team preferences.",
"keywords": ["instructions", "rules", "system prompt", "guidelines", "agents.md"]
},
{
"id": 55,
"category": "config",
"tip": "Run opencode debug config to troubleshoot configuration",
"shortcut": null,
"description": "If something's not working the way you expect and you suspect a configuration problem, run this command. It shows you the final merged configuration \u2014 the actual settings OpenCode is using after combining your global config, project config, environment variables, and any other config sources. This helps you see exactly what OpenCode sees, so you can spot if a setting was overridden or misconfigured.",
"keywords": ["debug", "config", "troubleshoot", "merged", "diagnose"]
},
{
"id": 56,
"category": "config",
"tip": "Use --print-logs flag to see detailed logs in stderr",
"shortcut": null,
"description": "When something goes wrong and you need to dig deeper than 'debug config', run OpenCode with the '--print-logs' flag (like 'opencode --print-logs'). This outputs detailed internal logs showing everything OpenCode is doing behind the scenes \u2014 API calls, tool executions, errors, timing info, and more. The logs go to stderr (standard error stream), which you can redirect to a file for analysis. This is the 'show me everything' debugging tool.",
"keywords": ["logs", "debug", "verbose", "stderr", "troubleshoot"]
},
{
"id": 57,
"category": "permissions",
"tip": "Use patterns like \"git *\": \"allow\" for granular bash permissions",
"shortcut": null,
"description": "Instead of allowing or blocking ALL shell commands with a single rule, you can set permissions for specific command patterns. '\"git *\": \"allow\"' means any command starting with 'git' (like git status, git commit, git push) runs without asking for your approval. But other commands might still require permission. The * is a wildcard that matches anything. You can be as specific as you want: '\"npm test\": \"allow\"' only auto-allows that exact command.",
"keywords": ["pattern", "wildcard", "granular", "bash", "allow"]
},
{
"id": 58,
"category": "permissions",
"tip": "Set \"rm -rf *\": \"deny\" to block destructive commands",
"shortcut": null,
"description": "This is a safety rule. 'rm -rf' is one of the most dangerous terminal commands \u2014 it forcefully deletes files and directories without asking for confirmation. By setting this pattern to 'deny' in your permissions, you completely prevent the AI from ever running any 'rm -rf' command, no matter what. The AI cannot override a 'deny' rule \u2014 it's a hard block. You should set up deny rules for any commands you consider too dangerous to ever run automatically.",
"keywords": ["deny", "block", "destructive", "rm", "safety", "dangerous"]
},
{
"id": 59,
"category": "permissions",
"tip": "Configure \"git push\": \"ask\" to require approval before pushing",
"shortcut": null,
"description": "Setting a command to 'ask' means the AI can prepare and suggest the command, but before it actually runs, OpenCode pauses and shows you exactly what's about to happen. You then approve or reject it. For 'git push', this means the AI can stage changes, create commits, and do everything locally \u2014 but when it comes time to push those changes to the remote repository (where your team can see them), it stops and asks you first. You get to review before anything goes public.",
"keywords": ["ask", "approval", "push", "confirm", "review"]
},
{
"id": 60,
"category": "permissions",
"tip": "Permission doom_loop prevents infinite tool call loops",
"shortcut": null,
"description": "Sometimes the AI gets stuck in a loop \u2014 it runs a tool, looks at the result, decides to run the same tool again, looks at the result again, and keeps going in circles without making progress. The 'doom_loop' permission is a built-in safety mechanism that detects this pattern. When OpenCode notices the AI is repeating the same actions over and over, it automatically intervenes and stops the loop, preventing wasted time and tokens.",
"keywords": ["doom loop", "infinite", "loop", "stuck", "safety"]
},
{
"id": 61,
"category": "permissions",
"tip": "Permission external_directory protects files outside project",
"shortcut": null,
"description": "By default, the AI should only be reading and editing files inside your current project directory. The 'external_directory' permission is a safety guard that kicks in if the AI tries to access files outside your project \u2014 like system files (/etc/passwd), other projects, or your home directory. Depending on how you configure it, it can block the access entirely ('deny'), ask for your approval ('ask'), or allow it ('allow'). This prevents the AI from accidentally (or intentionally) messing with files it shouldn't touch.",
"keywords": ["external", "directory", "outside", "protect", "boundary"]
},
{
"id": 62,
"category": "tools",
"tip": "Create .ts files in .opencode/tools/ to define new LLM tools",
"shortcut": null,
"description": "You can give the AI brand new capabilities by creating custom tools. Put a TypeScript (.ts) file in the .opencode/tools/ directory that defines: what the tool is called, what it does (a description the AI reads to decide when to use it), what inputs it takes, and what it actually does when called. The AI then knows this tool exists and can choose to use it when it's helpful. For example, you could create a tool that queries your company's internal API, checks a specific database, or runs a custom analysis script.",
"keywords": ["tools", "custom", "typescript", "define", "create"]
},
{
"id": 63,
"category": "tools",
"tip": "Tool definitions can invoke scripts written in Python, Go, etc",
"shortcut": null,
"description": "Even though custom tools are defined in TypeScript files, the actual work they do doesn't have to be TypeScript. Your tool's TypeScript file is just the 'wrapper' that tells the AI what the tool does and how to call it. Inside, it can shell out to run a Python script, execute a Go binary, call a Rust CLI tool, or anything else your system can run. The AI calls the TypeScript-defined tool, the tool runs your Python/Go/etc script behind the scenes, and the result comes back to the AI.",
"keywords": ["polyglot", "python", "go", "scripts", "invoke"]
},
{
"id": 64,
"category": "tools",
"tip": "Add .ts files to .opencode/plugin/ for event hooks",
"shortcut": null,
"description": "Plugins are different from tools. While tools are things the AI can call, plugins are event listeners that react when things happen in OpenCode. You create a TypeScript file in .opencode/plugin/ that 'hooks into' specific events \u2014 like when a file is edited, a session ends, a tool is about to run, or a message is received. Your plugin code runs automatically when those events occur. This lets you extend OpenCode's behavior in powerful ways without modifying OpenCode itself.",
"keywords": ["plugin", "event", "hook", "extend", "listener"]
},
{
"id": 65,
"category": "tools",
"tip": "Use plugins to send OS notifications when sessions complete",
"shortcut": null,
"description": "A practical example of what plugins can do: you create a plugin that listens for the 'session.idle' event (which fires when the AI finishes working). When it fires, the plugin runs a system command to show a desktop notification \u2014 a popup on your screen that says 'OpenCode: Session completed!' This way, if you switch to another app while the AI is working on a long task, you'll see a notification when it's done. The exact notification command depends on your OS (notify-send on Linux, osascript on macOS).",
"keywords": ["notification", "desktop", "alert", "complete", "idle"]
},
{
"id": 66,
"category": "tools",
"tip": "Create a plugin to prevent OpenCode from reading sensitive files",
"shortcut": null,
"description": "Another plugin example: create a plugin that hooks into the 'tool.execute.before' event (which fires right before any tool runs). Check if the tool is trying to read a file, and if that file matches a sensitive pattern (like .env, credentials.json, *.key, *.pem), throw an error to block it. The AI never sees the file contents, your secrets stay safe. This is a security layer you build yourself, customized to your project's sensitive files.",
"keywords": ["security", "sensitive", "block", "env", "credentials"]
},
{
"id": 67,
"category": "tools",
"tip": "Set \"tools\": {\"bash\": false} to disable specific tools",
"shortcut": null,
"description": "If you want to completely prevent the AI from using a particular tool, set it to false in the 'tools' config. '\"bash\": false' means the AI literally cannot run any shell commands \u2014 the tool doesn't exist as far as it's concerned. '\"edit\": false' prevents all file editing. '\"webfetch\": false' blocks all web requests. This is a hard disable \u2014 stronger than permissions, because the AI doesn't even know the tool is available.",
"keywords": ["disable", "tools", "false", "remove", "block"]
},
{
"id": 68,
"category": "tools",
"tip": "Set \"mcp_*\": false to disable all tools from an MCP server",
"shortcut": null,
"description": "If you have an MCP server connected that provides multiple tools, but you want to temporarily disable ALL of those tools at once, use this wildcard pattern. The 'mcp_*' matches every tool that comes from MCP servers. Setting it to false hides all of them from the AI. This is useful for debugging (to test if an MCP tool is causing problems) or when an MCP server is misbehaving and you want to isolate it without disconnecting it.",
"keywords": ["mcp", "disable", "wildcard", "all", "tools"]
},
{
"id": 69,
"category": "commands",
"tip": "Add .md files to .opencode/command/ to define reusable custom prompts",
"shortcut": null,
"description": "Custom commands are pre-written prompts you can trigger with a short slash command. Create a Markdown file in .opencode/command/ \u2014 for example, .opencode/command/test.md containing 'Run all tests and fix any failures'. Now when you type '/test' in OpenCode, it sends that entire prompt to the AI as if you typed it yourself. This saves time on prompts you use frequently, like running tests, reviewing code, generating documentation, or any other task you do repeatedly.",
"keywords": ["command", "custom", "prompt", "template", "reusable"]
},
{
"id": 70,
"category": "commands",
"tip": "Use $ARGUMENTS, $1, $2 in custom commands for dynamic input",
"shortcut": null,
"description": "Custom commands become much more powerful when they accept input. Inside your command's Markdown file, use $ARGUMENTS to capture everything typed after the command name, or $1, $2, etc. for individual arguments. For example, if your review.md file contains 'Review the file $1 for security issues', then typing '/review src/auth.ts' replaces $1 with 'src/auth.ts'. The AI receives: 'Review the file src/auth.ts for security issues'. This makes your commands flexible and reusable across different files, functions, or scenarios.",
"keywords": ["arguments", "dynamic", "input", "variables", "parameters"]
},
{
"id": 71,
"category": "commands",
"tip": "Use backticks in commands to inject shell output (e.g., `git status`)",
"shortcut": null,
"description": "Inside a custom command file, you can wrap any shell command in backticks and its actual output gets inserted into the prompt. For example, if your command file says 'Review these changes: `git diff`', when you run that command, OpenCode first runs 'git diff' in your terminal, captures the output (the actual code diff), and includes it in the prompt. The AI receives 'Review these changes:' followed by your real git diff. This lets you create commands that automatically gather context from your system.",
"keywords": ["backtick", "shell", "inject", "output", "dynamic"]
},
{
"id": 72,
"category": "themes",
"tip": "Use \"theme\": \"system\" to match your terminal's colors",
"shortcut": null,
"description": "Instead of picking a specific OpenCode theme, set your theme to 'system' in your config. OpenCode then automatically adapts its colors to match whatever color scheme your terminal is using. If your terminal has a dark background, OpenCode uses dark colors. If you switch your terminal to a light theme, OpenCode follows. This ensures OpenCode always looks natural and readable in your terminal, no matter what terminal theme you're using.",
"keywords": ["system", "theme", "terminal", "match", "automatic"]
},
{
"id": 73,
"category": "themes",
"tip": "Create JSON theme files in .opencode/themes/ directory",
"shortcut": null,
"description": "If none of the built-in themes suit your taste, you can create your own. Make a JSON file inside .opencode/themes/ (in your project) or ~/.config/opencode/themes/ (global). The JSON file defines colors for every element \u2014 backgrounds, text, borders, highlights, code blocks, etc. Once saved, your custom theme appears in the theme picker and you can select it like any built-in theme.",
"keywords": ["custom", "theme", "json", "create", "colors"]
},
{
"id": 74,
"category": "themes",
"tip": "Themes support dark/light variants for both modes",
"shortcut": null,
"description": "A single theme file can define two color schemes: one for dark mode and one for light mode. OpenCode automatically picks the right variant based on your system or terminal's current mode. This means you can create one theme that looks great in both dark and light environments without having to switch themes manually when your system appearance changes.",
"keywords": ["dark", "light", "variant", "mode", "automatic"]
},
{
"id": 75,
"category": "themes",
"tip": "Reference ANSI colors 0-255 in custom themes",
"shortcut": null,
"description": "When defining colors in your custom theme, you can use ANSI color codes \u2014 a standard set of 256 colors that virtually every terminal supports. Colors 0-7 are the basic colors, 8-15 are bright versions, 16-231 are a color cube, and 232-255 are grayscale. Using ANSI colors (instead of hex codes) ensures your theme looks consistent across different terminals and systems, since these colors are universally supported.",
"keywords": ["ansi", "colors", "256", "terminal", "standard"]
},
{
"id": 76,
"category": "models",
"tip": "Run /models or Ctrl+X M to see and switch between available AI models",
"shortcut": "Ctrl+X M",
"description": "Opens a list of every AI model you have access to \u2014 from all your connected providers. You'll see models from Anthropic (Claude), OpenAI (GPT), Google (Gemini), local models (Ollama), and any others you've configured. Select a model from the list and OpenCode switches to it immediately. The rest of your conversation continues with the new model. Different models have different strengths, speeds, and costs \u2014 this lets you pick the best one for each task.",
"keywords": ["models", "switch", "list", "provider", "select"]
},
{
"id": 77,
"category": "models",
"tip": "Run /connect to add API keys for 75+ supported LLM providers",
"shortcut": null,
"description": "This is OpenCode's setup wizard for connecting to AI providers. Run /connect and it shows you a list of 75+ supported providers \u2014 Anthropic, OpenAI, Google, AWS Bedrock, Azure, Ollama, Together AI, Groq, GitHub Copilot, and many more. For each provider, it guides you through entering your API key or completing an OAuth login. Once connected, all that provider's models become available in your /models list. You can connect to as many providers as you want.",
"keywords": ["connect", "provider", "api key", "setup", "authenticate"]
},
{
"id": 78,
"category": "models",
"tip": "Use /connect with OpenCode Zen for curated, tested models",
"shortcut": null,
"description": "OpenCode Zen is a managed service that gives you access to a curated selection of AI models without needing to manage API keys yourself. When you run /connect and choose Zen, you get pre-configured, tested models that are known to work well with OpenCode. This is the easiest way to get started if you don't want to deal with signing up for multiple AI provider accounts and managing individual API keys.",
"keywords": ["zen", "managed", "curated", "easy", "hosted"]
},
{
"id": 79,
"category": "models",
"tip": "Run opencode auth list to see all configured providers",
"shortcut": null,
"description": "This command shows you a summary of all the AI providers you've connected to and their current status. You can see which ones are active, whether any API keys have expired, and which providers are available. It's a quick health check to make sure all your AI connections are working before you start a session.",
"keywords": ["auth", "list", "providers", "status", "keys"]
},
{
"id": 80,
"category": "cli",
"tip": "Use opencode run for non-interactive scripting",
"shortcut": null,
"description": "The normal way to use OpenCode is the interactive TUI (the visual terminal interface where you chat back and forth). But 'opencode run' skips the visual interface entirely. You give it a message on the command line \u2014 like 'opencode run \"fix the bug in auth.ts\"' \u2014 and it sends that one message to the AI, gets a response, and exits. The AI can still edit files and run commands during this process. This is perfect for automation, shell scripts, CI/CD pipelines, or any situation where you don't want an interactive session.",
"keywords": ["run", "non-interactive", "scripting", "automation", "headless"]
},
{
"id": 81,
"category": "cli",
"tip": "Use opencode run -f file.ts to attach files via CLI",
"shortcut": null,
"description": "When using 'opencode run' (the non-interactive mode), the -f flag lets you attach files as context \u2014 just like using @ in the interactive mode. For example: 'opencode run -f src/app.ts -f src/utils.ts \"explain how these files work together\"'. The AI receives both files' contents along with your message. You can attach as many files as you need with multiple -f flags.",
"keywords": ["file", "attach", "flag", "run", "context"]
},
{
"id": 82,
"category": "cli",
"tip": "Use --format json for machine-readable output in scripts",
"shortcut": null,
"description": "When you're using 'opencode run' in a script or pipeline, the default human-readable output can be hard to parse programmatically. Add '--format json' and the output comes as structured JSON instead. This makes it easy to extract specific parts of the response using tools like 'jq' or parse it in Python/Node.js. For example: 'opencode run --format json \"list all TODOs\" | jq .response' gives you just the AI's response text.",
"keywords": ["json", "format", "machine-readable", "parse", "script"]
},
{
"id": 83,
"category": "cli",
"tip": "Run opencode serve for headless API access to OpenCode",
"shortcut": null,
"description": "This starts OpenCode as a background HTTP server with no visual interface. It exposes an API that other programs can talk to \u2014 send messages, get responses, trigger actions, and more. This is useful for building integrations: a web app that talks to OpenCode, a VS Code extension, a custom dashboard, or any other tool that wants to use OpenCode's AI capabilities programmatically. The server runs until you stop it.",
"keywords": ["serve", "server", "api", "headless", "http"]
},
{
"id": 84,
"category": "cli",
"tip": "Use opencode run --attach to connect to a running server",
"shortcut": null,
"description": "If you've already started an OpenCode server with 'opencode serve', you can connect to it from another terminal using '--attach'. Instead of starting a new instance of OpenCode (with its own model connection and context), it connects to the existing running server. This means multiple terminals or tools can share the same OpenCode session, and you get faster responses since the server is already initialized.",
"keywords": ["attach", "connect", "server", "existing", "shared"]
},
{
"id": 85,
"category": "cli",
"tip": "Run opencode upgrade to update to the latest version",
"shortcut": null,
"description": "Downloads and installs the newest version of OpenCode, replacing your current version. OpenCode is actively developed with frequent releases (bug fixes, new features, new model support). Running this command ensures you have the latest and greatest. You can also upgrade to a specific version by adding it as an argument: 'opencode upgrade 1.2.10'.",
"keywords": ["upgrade", "update", "latest", "version", "install"]
},
{
"id": 86,
"category": "cli",
"tip": "Run docker run -it --rm ghcr.io/anomalyco/opencode for containerized use",
"shortcut": null,
"description": "This Docker command runs OpenCode inside an isolated container without installing anything on your computer. '-it' makes it interactive (so you can type), '--rm' automatically deletes the container when you exit (clean up after yourself), and the rest is the Docker image address. This is great for: trying OpenCode without installing it, running it in a clean environment, using it in CI/CD pipelines, or keeping it completely isolated from your system.",
"keywords": ["docker", "container", "isolated", "clean", "temporary"]
},
{
"id": 87,
"category": "formatting",
"tip": "OpenCode auto-formats files using prettier, gofmt, ruff, and more",
"shortcut": null,
"description": "When the AI edits a file, OpenCode automatically runs the appropriate code formatter before saving. For JavaScript and TypeScript, it runs Prettier. For Go, it runs gofmt. For Python, it runs ruff. And so on for many other languages. This means even if the AI writes messy code (wrong indentation, inconsistent formatting), it gets cleaned up automatically to match your project's style. Your code always stays properly formatted.",
"keywords": ["format", "prettier", "gofmt", "ruff", "automatic"]
},
{
"id": 88,
"category": "formatting",
"tip": "Set \"formatter\": false in config to disable all auto-formatting",
"shortcut": null,
"description": "If auto-formatting is causing problems \u2014 maybe it conflicts with your project's custom formatter settings, reformats things you don't want changed, or is just slow \u2014 you can turn it off completely. Add '\"formatter\": false' to your opencode.json and OpenCode saves files exactly as the AI writes them, with no automatic formatting applied. You can always run your own formatter manually afterward.",
"keywords": ["formatter", "disable", "off", "false", "no format"]
},
{
"id": 89,
"category": "formatting",
"tip": "Define custom formatter commands with file extensions in config",
"shortcut": null,
"description": "If your project uses a formatter that OpenCode doesn't know about (or you prefer a different formatter than the default), you can configure custom formatter commands. In your config, map file extensions to formatter commands. For example, you could set '.rs' files to use 'rustfmt', '.elm' files to use 'elm-format', or even override the default TypeScript formatter with your team's specific prettier config. OpenCode runs your specified command instead of its built-in default.",
"keywords": ["custom", "formatter", "extension", "command", "override"]
},
{
"id": 90,
"category": "formatting",
"tip": "OpenCode uses LSP servers for intelligent code analysis",
"shortcut": null,
"description": "LSP (Language Server Protocol) is the same technology that powers smart features in your code editor \u2014 like go-to-definition, find-all-references, auto-complete, and error detection. OpenCode connects to these same LSP servers to give the AI much deeper understanding of your code. Instead of just reading files as text, the AI can understand the structure: where functions are defined, what calls what, what types are used, where errors exist. This makes the AI significantly smarter about your codebase.",
"keywords": ["lsp", "language server", "analysis", "intelligent", "code"]
},
{
"id": 91,
"category": "github",
"tip": "Use /opencode in GitHub issues/PRs to trigger AI actions",
"shortcut": null,
"description": "OpenCode has a GitHub integration that lets you trigger AI actions directly from GitHub's web interface. When you comment '/opencode' (followed by instructions) on any GitHub issue or pull request, the OpenCode bot picks it up and starts working. It reads the issue or PR context, understands what needs to be done, and can create code changes, leave reviews, or provide analysis \u2014 all without you ever opening your terminal.",
"keywords": ["github", "issue", "pr", "bot", "trigger"]
},
{
"id": 92,
"category": "github",
"tip": "Run opencode github install to set up the GitHub workflow",
"shortcut": null,
"description": "Before you can use the /opencode bot on GitHub, you need to install a GitHub Actions workflow in your repository. This command does that for you \u2014 it creates the necessary workflow file (.github/workflows/) that enables the OpenCode bot to respond to comments on your issues and pull requests. Run this once per repository and the bot is ready to go.",
"keywords": ["github", "install", "workflow", "setup", "actions"]
},
{
"id": 93,
"category": "github",
"tip": "Comment /opencode fix this on issues to auto-create PRs",
"shortcut": null,
"description": "This is one of the most powerful GitHub features. When someone files a bug report or feature request as a GitHub issue, just comment '/opencode fix this' on that issue. The AI reads the issue description, understands the problem, writes the code to fix it, and automatically creates a pull request with the changes. You then review the PR like any other code contribution. It turns issue reports into code changes automatically.",
"keywords": ["fix", "auto", "pr", "issue", "automatic"]
},
{
"id": 94,
"category": "github",
"tip": "Comment /oc on PR code lines for targeted code reviews",
"shortcut": null,
"description": "When reviewing a pull request on GitHub, you can select a specific line or section of code and leave a comment with just '/oc' (short for /opencode). The AI looks at that specific code section in the context of the PR and provides a detailed code review \u2014 pointing out potential bugs, suggesting improvements, checking for edge cases, and more. It's like having an AI code reviewer that focuses on exactly the code you point it at.",
"keywords": ["review", "code", "pr", "line", "targeted"]
},
{
"id": 95,
"category": "github",
"tip": "Use /review to review uncommitted changes, branches, or PRs",
"shortcut": null,
"description": "Inside OpenCode's terminal interface (not on GitHub), the /review command analyzes code changes and gives you a review. It can review: your uncommitted local changes (what you've modified but haven't committed yet), a branch diff (all changes between your branch and the main branch), or a GitHub PR (by number). The AI examines the changes and provides feedback on code quality, potential bugs, style issues, and suggestions for improvement.",
"keywords": ["review", "diff", "changes", "branch", "feedback"]
},
{
"id": 96,
"category": "undoredo",
"tip": "Use /undo to revert the last message and file changes",
"shortcut": null,
"description": "If the AI made changes you don't like \u2014 edited a file the wrong way, went in the wrong direction, or broke something \u2014 type /undo. This does TWO things: it removes the last message exchange (your message and the AI's response) from the conversation, AND it reverts any file changes the AI made during that response back to their previous state. It's like hitting Ctrl+Z but for the entire AI interaction, including all the files it touched.",
"keywords": ["undo", "revert", "rollback", "undo changes", "mistake"]
},
{
"id": 97,
"category": "undoredo",
"tip": "Use /redo to restore previously undone messages and file changes",
"shortcut": null,
"description": "Changed your mind after using /undo? The /redo command brings everything back \u2014 the messages reappear in the conversation and the file changes are re-applied. It's the undo of the undo. Just like how Ctrl+Shift+Z (redo) works in a text editor, but for your entire OpenCode conversation and all associated file changes.",
"keywords": ["redo", "restore", "unundo", "bring back"]
},
{
"id": 98,
"category": "other",
"tip": "Run /init to auto-generate project rules based on your codebase",
"shortcut": null,
"description": "When you run /init inside a project, OpenCode scans your entire codebase \u2014 it looks at your programming languages, frameworks, project structure, configuration files, and existing conventions. Then it automatically generates an AGENTS.md file (a rules file that tells the AI how to work with your specific project). This file includes things like: what language to use, what frameworks are in play, coding conventions to follow, and project-specific instructions. It's a quick way to give the AI project knowledge without writing rules from scratch.",
"keywords": ["init", "generate", "rules", "agents.md", "scan"]
},
{
"id": 99,
"category": "other",
"tip": "Commit your project's AGENTS.md file to Git for team sharing",
"shortcut": null,
"description": "The AGENTS.md file (which contains rules and instructions for the AI) lives in your project directory. If you commit it to your Git repository (git add AGENTS.md && git commit), then everyone on your team who clones the repo automatically gets the same AI rules when they use OpenCode. This ensures the AI behaves consistently for all team members \u2014 same coding style, same conventions, same project-specific instructions. It's like a shared config for your team's AI assistant.",
"keywords": ["agents.md", "git", "commit", "team", "share"]
}
]
}