MCPcopy Index your code
hub / github.com/pchalasani/claude-code-tools / execute

Method execute

claude_code_tools/tmux_cli_controller.py:825–850  ·  view source on GitHub ↗

Execute command and return structured output with exit code. Args: command: Shell command to execute pane: Target pane identifier (session:window.pane, %id, or index) timeout: Maximum seconds to wait (default: 30)

(self, command: str, pane: Optional[str] = None, timeout: int = 30)

Source from the content-addressed store, hash-verified

823 return content
824
825 def execute(self, command: str, pane: Optional[str] = None, timeout: int = 30):
826 """Execute command and return structured output with exit code.
827
828 Args:
829 command: Shell command to execute
830 pane: Target pane identifier (session:window.pane, %id, or index)
831 timeout: Maximum seconds to wait (default: 30)
832 """
833 if self.mode == 'local':
834 # Local mode - resolve pane identifier
835 if pane:
836 resolved_pane = self.controller.resolve_pane_identifier(pane)
837 if not resolved_pane:
838 print(f"Could not resolve pane identifier: {pane}")
839 return
840 else:
841 resolved_pane = None
842
843 result = self.controller.execute(command, pane_id=resolved_pane, timeout=timeout)
844 else:
845 # Remote mode - pass pane directly
846 result = self.controller.execute(command, pane_id=pane, timeout=timeout)
847
848 # Print JSON for easy parsing
849 print(json.dumps(result, indent=2))
850 return result
851
852 def interrupt(self, pane: Optional[str] = None):
853 """Send Ctrl+C to a pane."""

Callers 15

find_folder_idFunction · 0.45
check_file_existsFunction · 0.45
list_existing_versionsFunction · 0.45
delete_fileFunction · 0.45
upload_image_to_driveFunction · 0.45
post_insert_imagesFunction · 0.45
apply_formattingFunction · 0.45
cleanup_temp_imagesFunction · 0.45
upload_markdownFunction · 0.45
check_sheet_existsFunction · 0.45
list_existing_versionsFunction · 0.45
delete_sheetFunction · 0.45

Calls 1

Tested by

no test coverage detected