Skip to main content

Authentication

Before using xCommand, you need to authenticate. You can trigger the login process by pressing L when the CLI is running in interactive mode.
To run xCommand in server mode, you will need xCommand API Token as XCOMMAND_API_KEY environment variable. You can get it from your xCommand.ai/platform once logged in.

Root Commands

Root commands are executed directly from your terminal and govern the CLI’s behaviour and environment.

Help and Version

  • Help: Show available commands and options.
    xcommand help
    
  • Version: Show the current CLI version.
    xcommand version
    

Session Management

  • List Sessions: View all local sessions, sorted by most recent first.
    xcommand sessions
    
  • Resume Session: Rejoin a specific session by its ID.
    xcommand [session-id]
    

Environment and Lifecycle

  • Update: Check for and install the latest CLI version.
    xcommand update
    
  • Server Mode: Start xCommand as a background proxy (defaults to port 8080).
    xcommand server
    
    Use the --port flag for a custom port:
    xcommand server --port 9000
    

CLI Interface

Once logged in, you can interact with the xCommand directly from your terminal.

Slash Commands

While in the interactive chat, you can use slash commands to perform specific actions:
  • /insights: View session and token usage insights.
  • /docs: View documentation.
  • /platform: View platform to manage xCommand account.
  • /logout: Sign out of your account.
  • /bug <description>: Report a bug to the xCommand team.
  • /clear: Clear the chat history.
  • /license: View the xCommand limited licence agreement.
  • /status: Open the xCommand system status page in your default browser.
  • /tasks: Manage automated tasks to avoid repetitive toil.
    • /tasks [description]: Create a new automated task based on your natural language description.
    • /tasks list: View all your saved automated tasks and their IDs.
    • /tasks xc-<id> [args]: Execute a saved task, optionally passing arguments to replace placeholders (e.g., /tasks xc-1 user-123).
    • /tasks delete <id>: Remove a saved task.
  • /help: Show the help screen.

Shell Mode

You can run local shell commands directly from the xCommand interface by prefixing them with a backslash (\):
\ls -la
\cd

Session Management

When you exit a session, xCommand saves it. You can rejoin a saved session by running:
xcommand [session-id]

Update xCommand

To update xCommand to the latest version, run:
xcommand update