Skip to content

Commit 3cca5ce

Browse files
committed
Add commands
1 parent ecabbee commit 3cca5ce

19 files changed

Lines changed: 868 additions & 0 deletions

assets/commands/msedit.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# TAGLINE
2+
3+
Microsoft terminal-based text editor
4+
5+
# TLDR
6+
7+
**Launch** the editor with an empty buffer
8+
9+
```msedit```
10+
11+
**Open** a file
12+
13+
```msedit [path/to/file]```
14+
15+
**Open** a file at a specific **line number**
16+
17+
```msedit [path/to/file]:[line]```
18+
19+
**Open** a file at a specific **line and column**
20+
21+
```msedit [path/to/file]:[line]:[column]```
22+
23+
**Open multiple files** in tabs
24+
25+
```msedit [file1] [file2] [file3]```
26+
27+
# SYNOPSIS
28+
29+
**msedit** [_OPTIONS_] [_FILE_[:_LINE_[:_COLUMN_]]]...
30+
31+
# PARAMETERS
32+
33+
**-h**, **--help**
34+
> Print help information
35+
36+
**-v**, **--version**
37+
> Print version information
38+
39+
# DESCRIPTION
40+
41+
**msedit** is a lightweight, modeless, terminal-based text editor developed by **Microsoft** and written in **Rust**. It draws inspiration from the classic MS-DOS Editor but provides a modern interface with input controls similar to VS Code. Unlike modal editors like Vim, editing is immediate with no mode switching required. It features a menu bar, status bar, mouse support, UTF-8 handling, LF/CRLF conversion, and a localized UI supporting multiple languages. The binary is less than 250 KB.
42+
43+
On Linux the executable is named **msedit** to avoid conflicts with existing **edit** commands. On Windows it is simply **edit**.
44+
45+
# KEYBOARD SHORTCUTS
46+
47+
```
48+
Ctrl+S Save file
49+
Ctrl+Shift+S Save As
50+
Ctrl+O Open file
51+
Ctrl+F Find
52+
Ctrl+R Find & Replace
53+
F3 Next search result
54+
Ctrl+P Switch between tabs
55+
Ctrl+G Go to line/column
56+
Ctrl+Z Undo
57+
Ctrl+Y Redo
58+
Ctrl+C Copy
59+
Ctrl+V Paste
60+
Ctrl+Q Quit
61+
Ctrl+W Close tab
62+
Alt+Z Toggle word wrap
63+
Alt+F / F10 Focus menu bar
64+
```
65+
66+
# CAVEATS
67+
68+
On Linux, the executable name varies between **edit** (from GitHub binary) and **msedit** (from distro packages) depending on installation method. Has an optional dependency on **ICU** for Search and Replace functionality. Requires a **Rust nightly toolchain** to build from source. As a relatively new tool (2025), it lacks the plugin ecosystem of established editors.
69+
70+
# HISTORY
71+
72+
Microsoft Edit was announced at **Build 2025** in May 2025 and simultaneously open-sourced under the **MIT license**. It was created because 64-bit versions of Windows lacked a default CLI text editor. The project has gained significant community interest with over 13,000 GitHub stars. It will ship pre-installed with future Windows 11 builds.
73+
74+
# SEE ALSO
75+
76+
[nano](/man/nano)(1), [vim](/man/vim)(1), [emacs](/man/emacs)(1), [micro](/man/micro)(1)

assets/commands/opencode-agent.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# TAGLINE
2+
3+
Manage OpenCode agents
4+
5+
# TLDR
6+
7+
**List** all available agents
8+
9+
```opencode agent list```
10+
11+
**Create** a new agent with a custom system prompt
12+
13+
```opencode agent create [name]```
14+
15+
# SYNOPSIS
16+
17+
**opencode agent** _subcommand_ [_options_]
18+
19+
# DESCRIPTION
20+
21+
**opencode agent** manages agents in OpenCode, a terminal-based AI coding assistant. Agents are configurations with custom system prompts and tool settings that tailor the AI's behavior for specific tasks. You can create new agents, list available ones, and configure their tool access.
22+
23+
# CAVEATS
24+
25+
Agents are project-specific and stored in the local OpenCode configuration. Custom agents inherit the base model configuration but override the system prompt and available tools.
26+
27+
# SEE ALSO
28+
29+
[opencode](/man/opencode)(1), [opencode-session](/man/opencode-session)(1), [opencode-models](/man/opencode-models)(1)

assets/commands/opencode-auth.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# TAGLINE
2+
3+
Manage OpenCode credentials
4+
5+
# TLDR
6+
7+
**Log in** to an AI provider
8+
9+
```opencode auth login```
10+
11+
**Show** current authentication status
12+
13+
```opencode auth status```
14+
15+
# SYNOPSIS
16+
17+
**opencode auth** _subcommand_ [_options_]
18+
19+
# DESCRIPTION
20+
21+
**opencode auth** manages credentials and login sessions for AI providers used by OpenCode. Credentials are stored in **~/.local/share/opencode/auth.json**. Supports authentication with providers including OpenAI, Anthropic, Google, AWS Bedrock, and GitHub Copilot.
22+
23+
# SEE ALSO
24+
25+
[opencode](/man/opencode)(1), [opencode-models](/man/opencode-models)(1)

assets/commands/opencode-debug.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# TAGLINE
2+
3+
Debug OpenCode connections and logging
4+
5+
# TLDR
6+
7+
**Enable** debug logging
8+
9+
```opencode debug```
10+
11+
**Debug** OAuth connection for MCP servers
12+
13+
```opencode debug mcp```
14+
15+
# SYNOPSIS
16+
17+
**opencode debug** [_options_]
18+
19+
# DESCRIPTION
20+
21+
**opencode debug** enables debug logging and provides diagnostics for OpenCode. It can diagnose OAuth connection issues with MCP (Model Context Protocol) servers and output verbose logs for troubleshooting configuration or connectivity problems.
22+
23+
# SEE ALSO
24+
25+
[opencode](/man/opencode)(1), [opencode-mcp](/man/opencode-mcp)(1)

assets/commands/opencode-export.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# TAGLINE
2+
3+
Export OpenCode session data
4+
5+
# TLDR
6+
7+
**Export** the current session as JSON
8+
9+
```opencode export```
10+
11+
**Export** a specific session by ID
12+
13+
```opencode export [session_id]```
14+
15+
# SYNOPSIS
16+
17+
**opencode export** [_session_id_]
18+
19+
# DESCRIPTION
20+
21+
**opencode export** exports session data from OpenCode as JSON. Sessions contain the full conversation history, tool calls, and context from an AI coding session. If no session ID is specified, the current or most recent session is exported. The output can be redirected to a file for archival or sharing.
22+
23+
# SEE ALSO
24+
25+
[opencode](/man/opencode)(1), [opencode-import](/man/opencode-import)(1), [opencode-session](/man/opencode-session)(1)

assets/commands/opencode-import.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# TAGLINE
2+
3+
Import OpenCode session data
4+
5+
# TLDR
6+
7+
**Import** a session from a JSON file
8+
9+
```opencode import [path/to/session.json]```
10+
11+
# SYNOPSIS
12+
13+
**opencode import** _file_
14+
15+
# DESCRIPTION
16+
17+
**opencode import** imports session data into OpenCode from a JSON file previously created with **opencode export**. This allows restoring or sharing conversation sessions between different OpenCode installations or users.
18+
19+
# SEE ALSO
20+
21+
[opencode](/man/opencode)(1), [opencode-export](/man/opencode-export)(1), [opencode-session](/man/opencode-session)(1)

assets/commands/opencode-mcp.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# TAGLINE
2+
3+
Manage OpenCode MCP servers
4+
5+
# TLDR
6+
7+
**Add** an MCP server
8+
9+
```opencode mcp add [name] [command]```
10+
11+
**List** configured MCP servers
12+
13+
```opencode mcp list```
14+
15+
**Remove** an MCP server
16+
17+
```opencode mcp remove [name]```
18+
19+
**Debug** an MCP server connection
20+
21+
```opencode mcp debug [name]```
22+
23+
# SYNOPSIS
24+
25+
**opencode mcp** _subcommand_ [_options_]
26+
27+
# DESCRIPTION
28+
29+
**opencode mcp** manages Model Context Protocol (MCP) servers for OpenCode. MCP servers extend OpenCode's capabilities by providing additional tools, resources, and context to the AI agent. You can add, list, authenticate, remove, and debug MCP server connections.
30+
31+
# SEE ALSO
32+
33+
[opencode](/man/opencode)(1), [opencode-debug](/man/opencode-debug)(1)

assets/commands/opencode-models.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# TAGLINE
2+
3+
List available OpenCode AI models
4+
5+
# TLDR
6+
7+
**List** all available models from configured providers
8+
9+
```opencode models```
10+
11+
# SYNOPSIS
12+
13+
**opencode models**
14+
15+
# DESCRIPTION
16+
17+
**opencode models** lists all available AI models from the configured providers. OpenCode supports 75+ providers including OpenAI, Anthropic Claude, Google Gemini, AWS Bedrock, Groq, Azure OpenAI, OpenRouter, and local models via Ollama. The output shows model names, providers, and availability based on current authentication.
18+
19+
# SEE ALSO
20+
21+
[opencode](/man/opencode)(1), [opencode-auth](/man/opencode-auth)(1)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# TAGLINE
2+
3+
Manage OpenCode sessions
4+
5+
# TLDR
6+
7+
**List** all sessions
8+
9+
```opencode session list```
10+
11+
**Resume** a previous session
12+
13+
```opencode session resume [session_id]```
14+
15+
**Continue** the most recent session
16+
17+
```opencode session continue```
18+
19+
# SYNOPSIS
20+
21+
**opencode session** _subcommand_ [_options_]
22+
23+
# DESCRIPTION
24+
25+
**opencode session** manages OpenCode coding sessions. Sessions persist conversation history, tool calls, and context in a local **SQLite** database. You can list past sessions, resume a specific session by ID, or continue the most recent one. This allows picking up where you left off across terminal restarts.
26+
27+
# SEE ALSO
28+
29+
[opencode](/man/opencode)(1), [opencode-export](/man/opencode-export)(1), [opencode-import](/man/opencode-import)(1)

assets/commands/opencode-stats.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# TAGLINE
2+
3+
Show OpenCode usage statistics
4+
5+
# TLDR
6+
7+
**Show** token usage and cost statistics
8+
9+
```opencode stats```
10+
11+
# SYNOPSIS
12+
13+
**opencode stats**
14+
15+
# DESCRIPTION
16+
17+
**opencode stats** displays token usage and cost statistics for OpenCode sessions. It shows cumulative data about tokens consumed, API calls made, and estimated costs across different AI providers. Useful for monitoring usage and budgeting API expenses.
18+
19+
# SEE ALSO
20+
21+
[opencode](/man/opencode)(1), [opencode-session](/man/opencode-session)(1), [opencode-models](/man/opencode-models)(1)

0 commit comments

Comments
 (0)