> ## Documentation Index
> Fetch the complete documentation index at: https://www.landbase.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Install Landbase CLI

> Install the Landbase CLI on macOS, Linux, or Windows, authenticate with Landbase, and confirm everything works.

<div id="breadcrumb-wrapper" />

<div
  style={{display: 'none'}}
  data-related-resources={JSON.stringify([
{ title: 'Quick Start', href: '/quickstart' },
{ title: 'What can you do with the CLI?', href: '/what-can-you-do-with-the-cli' },
{ title: 'Use Landbase CLI in Claude Code and Codex', href: '/landbase-cli' }
])}
  id="page-related-resources"
/>

# Install Landbase CLI

<div className="blog-post-content">
  <Tabs>
    <Tab title="Via Claude Code or Codex">
      If you use Claude Code or Codex, you can ask the agent to install the Landbase CLI for you. The agent will read the Landbase docs, choose the right install command for your computer, help you sign in, and run a quick read-only check.

      ## Copy this prompt

      Paste this into Claude Code or Codex:

      ```text theme={null}
      Install Landbase CLI using https://cli.landbase.com/latest/agent-install.txt
      ```

      Use the workspace, terminal, or project where you want `landbase-cli` to be available.

      ## What the agent will do

      The agent should:

      * Open the Landbase install docs.
      * Install `landbase-cli` for macOS, Linux, or Windows.
      * Confirm the CLI is on PATH.
      * Help you authenticate with Landbase.
      * Run a read-only command to make sure the install works.

      ## During authentication

      The agent will run:

      ```bash theme={null}
      landbase-cli auth
      ```

      This opens a Landbase consent page in your browser. If you are not already signed in, sign in or create an account at [https://gtm.landbase.com](https://gtm.landbase.com), then approve the CLI access request.

      When authorization is complete, return to Claude Code or Codex. The agent should continue and verify the install.

      If the agent is running in a remote or headless environment, it may print a URL instead of opening your browser. Open that URL manually to finish signing in.

      ## Confirm it worked

      The setup is complete when the agent confirms:

      * `landbase-cli --version` prints a version.
      * `landbase-cli auth` succeeds or finds an existing sign-in.
      * `landbase-cli datasets list --limit=1 --no-update-check` exits successfully.

      ## Stop Claude Code from asking for permissions

      Claude Code may ask before it runs CLI commands. If you want Claude Code to stop asking for every Landbase CLI command, you can tell it:

      ```text theme={null}
      Can you auto approve landbase-cli* in my user settings?
      ```

      Only do this if you are comfortable allowing Claude Code to run `landbase-cli` commands without asking each time.
    </Tab>

    <Tab title="Manual">
      ## Video walkthrough

      <iframe src="https://www.loom.com/embed/a92e49680f7d4a848ba97561548d058b" frameBorder="0" allowFullScreen title="Installing the Landbase CLI" style={{ width: '100%', aspectRatio: '16 / 9', borderRadius: '8px' }} />

      ## Install the CLI

      On macOS or Linux, run:

      ```bash theme={null}
      curl -fsSL https://cli.landbase.com/install.sh | bash
      ```

      On Windows, run this in PowerShell:

      ```powershell theme={null}
      $ProgressPreference = 'SilentlyContinue'; irm https://cli.landbase.com/install.ps1 | iex
      ```

      ## Verify the install

      Confirm the CLI is available:

      ```bash theme={null}
      command -v landbase-cli
      landbase-cli --version
      ```

      ## Sign in

      ```bash theme={null}
      landbase-cli auth
      ```

      The CLI opens a consent page in your browser. If you are not already signed in, you will be prompted to sign in or create an account at [https://gtm.landbase.com](https://gtm.landbase.com) before the consent page loads.

      When authorization is complete, return to your terminal. The CLI will confirm sign-in and print the path where it stored the local config.

      ## Confirm everything works

      Run this read-only command:

      ```bash theme={null}
      landbase-cli datasets list --limit=1 --no-update-check
      ```

      The install is complete when `landbase-cli --version` prints a version, `landbase-cli auth` succeeds or reports an existing signed-in config, and the dataset list command exits successfully.

      ## If the command is not found

      The installer prints the install location and any PATH instructions. If `landbase-cli` is not available immediately after install:

      ```bash theme={null}
      export PATH="$HOME/.local/bin:$PATH"
      command -v landbase-cli
      landbase-cli --version
      ```

      If that works, add the PATH update to your shell profile or open a new terminal session.

      ## Keep the CLI current

      Check for and install the latest CLI update:

      ```bash theme={null}
      landbase-cli update
      landbase-cli --version
      ```
    </Tab>
  </Tabs>

  ## Next Steps

  You're installed and authenticated. Head to [Quick Start](/docs/quickstart) to run your first search and get results in under five minutes.
</div>
