Factory Bridge provides several powerful CLI tools that allow you to interact with your local environment directly from Factory. This reference guide covers each tool in detail, including usage examples and parameters.

Available CLI Tools

When you connect Factory to your local machine via Factory Bridge, you’ll have access to the following shell tools in Droid Mode:

Execute Process

Run commands and scripts on your local machine

Kill Process

Terminate running processes

Pipe Process Input

Send input to running processes

Overview

Factory Bridge connects securely to your local machine, giving you access to powerful command-line capabilities directly within Factory. These tools allow you to execute commands, manage processes, and interact with running applications—all while maintaining your familiar workflow.

Available CLI Tools

When connected via Factory Bridge, you’ll have access to these essential command-line tools:

Execute Commands

Run commands and scripts directly from Factory

Manage Processes

Control running processes with ease

Interactive Input

Send input to running applications

Running Commands

Execute any command you would normally run in your terminal directly from Factory.

How It Works

  1. Connect Factory Bridge to your local machine
  2. Ask Factory to run a command
  3. View the results directly in your conversation

Examples

Request:
Run 'ls -la' in my home directory
Factory will execute this command and show you the output:
total 112
drwxr-xr-x   18 user  staff    576 Mar 12 15:46 .
drwxr-xr-x    5 root  admin    160 Feb  1 09:34 ..
drwxr-xr-x   14 user  staff    448 Mar 12 14:22 .git
-rw-r--r--    1 user  staff    310 Mar  9 10:13 .gitignore
-rw-r--r--    1 user  staff   1064 Mar  9 10:13 README.md
drwxr-xr-x    8 user  staff    256 Mar 12 14:22 src
Request:
Build my React app using 'npm run build' in my project directory
Factory will execute the build command and display the progress in real-time.
Request:
Start a development server with 'npm start' in my project
Factory will start the server and stream the output, allowing you to monitor the process.

Managing Processes

Easily control processes that you’ve started through Factory.

How It Works

  1. Start a process using Factory
  2. If needed, ask Factory to terminate the process
  3. Factory will safely shut down the process for you

Interactive Applications

Interact with command-line applications that require user input.

How It Works

  1. Start an interactive process through Factory
  2. Send input as needed, including confirmation responses, text entries, and commands
  3. Factory will relay your input to the application and display the results

Examples

1

Connect to Database

Ask Factory to start your database client
2

Enter Credentials

Securely provide login information
3

Execute Queries

Run SQL commands as needed
4

Complete Session

Exit cleanly when finished
1

Check Status

View current repository status
2

Create Branches

Create and switch branches as needed
3

Stage Changes

Add modified files to staging
4

Commit Work

Commit with descriptive messages
5

Push Updates

Push changes to remote repositories

Best Practices

  • Specify complete file paths when possible
  • Use quotes for commands containing spaces or special characters
  • Consider security implications before running sensitive commands
  • Always verify process information before termination

Troubleshooting

  • Verify the command is installed on your system
  • Check if the command is in your system PATH
  • Try using the full path to the executable
  • Ensure you’re using the correct environment for specialized commands
  • Check file and directory permissions
  • Ensure you have appropriate access rights
  • For scripts, verify they have execution permissions
  • Use elevated privileges only when necessary and with caution
  • Verify processes are still running before attempting interaction
  • Check output logs for error messages
  • Restart processes if connection is lost

Security Considerations

When using CLI tools through Factory Bridge, keep these security considerations in mind:
  • All commands execute with your user permissions on your local machine
  • Avoid running commands that could expose sensitive information
  • Be cautious with commands that make system changes
  • Consider using dedicated environments for sensitive operations

Learn More About Factory Bridge

Return to the main Factory Bridge documentation for installation and general usage information