Slash commands
Gunakan slash commands untuk mengakses fungsionalitas bawaan Bob Shell dengan cepat.
To get started, type / in Bob Shell to see all available commands, or create your own by adding a markdown file to .bob/commands/ or ~/.bob/commands/.
Perintah bawaan
Bob Shell menyertakan slash command bawaan berikut:
| Perintah | Alias | Deskripsi |
|---|---|---|
/help | Tampilkan semua slash command yang tersedia | |
/clear | /new, /task | Mulai tugas baru |
/compact | /condense, /compress, /summarize | Padatkan context window secara cerdas untuk membebaskan ruang |
/copy | Salin item dari riwayat percakapan ke clipboard | |
/export | Ekspor tugas saat ini ke file. Penggunaan: /export <json|markdown> [file-name] | |
/editor | Buka prompt saat ini di editor terminal pilihanmu. Editor diselesaikan dari $VISUAL, $EDITOR, atau vi. Saat kamu menyimpan dan menutup editor, teks dimuat kembali ke prompt. | |
/hooks | Buka dialog manajemen hook. Dialog ini menampilkan semua hook global dan workspace yang dikonfigurasi beserta jenis event, matcher, cakupan, status, dan commandnya. Aktifkan atau nonaktifkan hook secara individual. | |
/mode | Beralih mode aktif (membuka picker) | |
/permissions | /trust | Lihat dan ubah tingkat kepercayaan folder ini |
/resume | /history | Jelajahi dan lanjutkan percakapan sebelumnya |
/settings | Lihat dan edit pengaturan Bob Shell | |
/mcp | Kelola server MCP yang dikonfigurasi | |
/manage-secrets | Kelola secret yang digunakan dalam konfigurasi server MCP | |
/processes | Lihat semua proses shell yang berjalan di seluruh tugas | |
/skills | Sisipkan referensi skill ke dalam prompt | |
/init | Inisialisasi Bob di workspace saat ini | |
/status | /info | Lihat status sesi, penggunaan, dan informasi versi |
/team | Pilih tim. Hanya ditampilkan jika kamu memiliki lebih dari satu profil tim. | |
/vim | Aktifkan atau nonaktifkan mode key-binding vim | |
/terminal-setup | Konfigurasikan terminalmu untuk input multibaris (Option+Enter). Hanya untuk macOS. | |
/logs | Buka file log terbaru dengan viewer sistem | |
/docs | Buka dokumentasi Bob Shell di browser | |
/bug | Kirim laporan bug | |
/exit | /quit, /close | Keluar dari CLI |
Why use slash commands?
Slash commands provide several key benefits:
- Workflow automation: Turn complex multi-step processes into single commands
- Team standardization: Share commands across your team for consistent practices
- Context preservation: Include project-specific context in every command
- Quick access: Fuzzy search and autocomplete for instant command discovery
How slash commands work
When you type / in Bob Shell, a menu appears showing all available commands. These commands come from the following sources:
| Command Type | Source | Purpose |
|---|---|---|
| Built-in commands | Bob Shell | Core Bob Shell functionality, such as /mode, /compact, and /settings |
| Custom workflow commands | .bob/commands/ or ~/.bob/commands/ | User-created automation for specific tasks |
| MCP prompts | Configured MCP servers | Prompts exposed by MCP servers |
Creating custom commands
Custom commands extend Bob's functionality by adding markdown files to specific directories:
| Location | Scope | Path |
|---|---|---|
| Project-specific | Available in current project only | .bob/commands/ in your workspace root |
| Global | Available in all projects | ~/.bob/commands/ in your home directory |
The filename becomes the command name. For example:
.bob/commands/
├── review.md → /review
├── test-api.md → /test-api
└── deploy-check.md → /deploy-checkCommand name processing
When creating commands through the UI, command names are automatically processed:
- Converted to lowercase
- Spaces replaced with dashes
- Special characters removed
- Leading/trailing dashes removed
Example: "My Cool Command!" becomes my-cool-command
Basic command format
Create a simple command by adding a markdown file:
Help me review this code for security issues and suggest improvements.Advanced command with frontmatter
Add metadata using frontmatter for enhanced functionality:
---
description: Create a new API endpoint
argument-hint: <endpoint-name> <http-method>
---
Create a new API endpoint called $1 that handles $2 requests.
Include proper error handling and documentation.Frontmatter fields
| Field | Purpose | Example |
|---|---|---|
description | Appears in the command menu | "Create a new API endpoint" |
argument-hint | Shows expected arguments | "<endpoint-name> <http-method>" |
Command management in Bob Shell
Bob Shell supports the same slash commands as Bob IDE. While Bob Shell does not provide a dedicated UI for managing commands, you can:
- Create command files manually in the
.bob/commands/directory in your project or~/.bob/commands/in your home directory - Edit existing command files with any text editor
Using slash commands
Type / in Bob Shell to see a unified menu containing the following types of commands:
- Unified menu: Built-in commands, MCP prompts, and workflow commands such as
/create-pull-requestappear together - Autocomplete: Start typing to filter commands (e.g.,
/samshowssample-command-name) - Fuzzy search: Find commands even with partial matches
- Description preview: See command descriptions in the menu
/mode Switch the active mode
/compact Compact the context window
/create-pull-request Create a pull requestArgument hints
Argument hints provide instant help for slash commands, showing you what kind of information to provide when a command expects additional input.
When you type / to bring up the command menu, commands that expect arguments will display a light gray hint next to them. This hint tells you what kind of argument the command is expecting.
For example:
/api-endpoint <endpoint-name> <http-method>- Shows you need both an endpoint name and HTTP method
After you select the command, it is inserted into the chat input followed by a space. The hint is not inserted; it is only a visual guide to help you know what to type next. Type the argument after the command.
Adding argument hints to custom commands
You can add argument hints to your custom commands using the argument-hint field in the frontmatter:
---
description: Create a new API endpoint
argument-hint: <endpoint-name> <http-method>
---
Create a new API endpoint called $1 that handles $2 requests.
Include proper error handling and documentation.This will display as /api-endpoint <endpoint-name> <http-method> in the command menu.
Best practices for argument hints
- Be specific: Use descriptive placeholders like
<file-path>instead of generic ones like<arg> - Show multiple arguments: If your command needs multiple inputs, show all of them:
<source> <destination> - Use consistent format: Always wrap placeholders in angle brackets:
<placeholder> - Keep it concise: Hints should be brief and clear
Common questions about arguments
| Question | Answer |
|---|---|
| What if I don't provide the argument? | The command might not work as expected, or it might prompt you for more information. The hint is there to help you get it right the first time. |
| Do all commands have hints? | No, only commands that are designed to take arguments will have hints. Commands that work without additional input won't show hints. |
| Can I use a command without replacing the hint? | The hint text (like <endpoint-name>) needs to be replaced with actual values. Leaving the hint text will likely cause the command to fail or behave unexpectedly. |
Best practices
Command naming
- Use descriptive, action-oriented names
- Keep names concise but clear
- Use hyphens for multi-word commands
- Avoid generic names like
helportest - Note: Names are automatically slugified (lowercase, special characters removed)
- The
.mdextension is automatically added/removed as needed
Command content
- Start with a clear directive
- Use structured formats (lists, sections)
- Include specific requirements
- Reference project conventions
- Keep commands focused on a single task
Organization
- Group related commands in subdirectories
- Use consistent naming patterns
- Document complex commands
- Version control your commands
- Share team commands in the project repository
Troubleshooting
Commands not appearing
If your commands aren't showing up in the menu:
- Check file location: Ensure custom command files are in
.bob/commands/or~/.bob/commands/ - Verify file extension: Custom commands must be
.mdfiles
Command not found
When a slash command isn't found, the LLM will see:
The slash command '/unknown-command' was not found. Please check the command name and try again.Command conflicts
- Custom project commands override global custom commands with the same name
- Use unique names to avoid conflicts
- When creating duplicate names through the UI, numbers are appended (e.g.,
new-command-1,new-command-2)
About modes
Use /mode to open the mode picker and switch between the built-in Agent, Plan, and Ask modes, or your custom modes. /mode does not take an argument, and modes do not appear as separate slash commands. Custom workflow commands cannot change the active mode.
Cross-platform compatibility
Slash commands work identically across both Bob Shell and Bob IDE. This means:
- Commands created in one environment can be used in the other
- The same command syntax and behavior applies in both environments
- Team-shared commands work consistently regardless of which interface team members use
Autentikasi OAuth MCP
Hubungkan Bob Shell ke server MCP yang memerlukan akses yang didelegasikan oleh pengguna dengan OAuth 2.1. Bob Shell mengelola proses autentikasi dan token refresh sehingga kamu tidak perlu mengelola token secara manual.
Mode
Mode adalah persona khusus yang menyesuaikan perilaku Bob untuk tugas spesifikmu. Setiap mode menawarkan kemampuan dan tingkat akses yang berbeda untuk membantumu mencapai tujuan tertentu dengan lebih efisien.