-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpenCode_setup.txt
More file actions
56 lines (40 loc) · 1.53 KB
/
Copy pathOpenCode_setup.txt
File metadata and controls
56 lines (40 loc) · 1.53 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
# 1. Install opencode:
curl -fsSL https://opencode.ai/install | bash
# 2. Refresh shel
source ~/.bashrc
# 3. Install Ollama and pull model (example: gemma4:31b)
curl -fsSL https://ollama.com/install.sh | sh
ollama pull gemma4:31b
# 4. cd to the project directory and launch opencode (use ollama to launch)
cd /path/to/project
ollama launch opencode
# 5. Select the downloaded model (gemma4:31b) then Enter to launch opencode TUI (terminal user interface)
# Or when launching opencode with ollama:
ollama launch opencode --model gemma4:31b
#-------------------------------------------------#
#----------------- Other guides ------------------#
#-------------------------------------------------#
#############################
## Enter to newline in TUI ##
#############################
Press Alt+Enter
################
## Copy-Paste ##
################
# 1. Install xclip (ubuntu)
sudo apt install xclip
# 2. Copy (in opencode TUI)
Select/Highlight the body of you want to copy, then release the mouse
-> It will automatically copy that selected text
# 3. Paste (in opencode TUI)
Ctrl+Shift+V
(only work after installing xclip)
########################################
## Recover prompt text using "revert" ##
########################################
# Click the message/promt -> choose "revert...." -> the prompt will be recovered in the input box
# Or can use /undo command
########################
## Select old session ##
########################
Insie opencode TUI, type "/sessions" and choose the session related to the old work you want to continue