CLI Commands
The following is an updated list of CLI commands for Xircuits that you can use after you've installed it. You also can type xircuits --help in your terminal to display a list of all available commands:
$ xircuits --help
usage: xircuits {start,install,fetch-only,examples,compile,list} ...
Xircuits Command Line Interface
positional arguments:
  {start,install,fetch-only,examples,compile,list}
    start               Start Xircuits.
    install             Fetch and installs a library for Xircuits.
    fetch-only          Fetch a library for Xircuits. Does not install.
    uninstall           Uninstall a component library for Xircuits.
    examples            Download examples for Xircuits.
    compile             Compile a Xircuits workflow file.
    list                List available component libraries for Xircuits.
Start Xircuits
xircuits
or
xircuits start
- Starts Xircuits, typically launching JupyterLab and initializing the 
.xircuitsconfig file in the current directory. It also loads thexai_componentsinto the current working directory. - You can append any JupyterLab-specific launch commands, for example:
xircuits start --no-browser 
Install Xircuits Component Library
xircuits install <component library name>
- Fetches and uses 
pipto install a component library for Xircuits based on itsrequirements.txt. - The component library will be saved at 
./xai_components/. - You can provide a component library name from the supported component library list or a GitHub repository URL.
 
Fetch Xircuits Component Library
xircuits fetch-only <component library name>
- Fetches but does not install a component library for Xircuits.
 - The component library will be saved at 
./xai_components/. - You can provide a component library name from the supported component library list or a GitHub repository URL.
 - If the directory already exists, it will return an error.
 
Uninstall Xircuits Component Library
xircuits uninstall <component library name>
- Uninstalls a previously installed component library from the 
./xai_components/directory. - Shows a success message when the library is removed.
 - If the library does not exist, a warning will be shown.
 - Core libraries such as 
xai_utilsandxai_eventsare protected and cannot be uninstalled by default. 
Download Xircuits Examples
xircuits examples
- Loads the 
examplesdirectory from the Xircuits wheel to your current directory. 
Compile Xircuits File
xircuits compile <source_file> <out_file> [python_paths_file]
- Compiles a Xircuits workflow from 
source_file.xircuitsintoout_file.py. This is useful for compiling a workflow without opening JupyterLab. - Optionally provide 
python_paths_file, a JSON file with a mapping of component names to required Python paths, e.g.,{'MyComponent': '/some/path'}. 
List Component Installation
xircuits list
- Lists installed, available, and remote component libraries for Xircuits.
 
Each command also supports the -h option for help, which provides additional information and usage examples for the command.