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

# Mechanex CLI commands for auth, credits, and serving

> Reference for every mechanex CLI command including signup, login, API key management, credit balance, top-up, and local server startup.

Installing the SDK also installs the `mechanex` CLI. Commands prompt interactively when the CLI needs missing credentials or a runtime selection.

```bash theme={null}
pip install mechanex
mechanex --help
```

<AccordionGroup>
  <Accordion title="Authentication">
    **`mechanex signup`**

    Create a new Axionic account interactively. Prompts for email and password. On successful signup, a default API key is created and saved to `~/.mechanex/config.json` automatically. The command may also prompt you to connect Hugging Face.

    ***

    **`mechanex login`**

    Authenticate with an existing account. Prompts for email and password. On success, stores the access and refresh tokens in `~/.mechanex/config.json`. Subsequent API calls and CLI commands use these tokens automatically. The command can select from existing API keys and may prompt you to connect Hugging Face.

    ***

    **`mechanex logout`**

    Deletes `~/.mechanex/config.json`, clearing stored tokens and the active API key.
  </Accordion>

  <Accordion title="Account">
    **`mechanex whoami`**

    Prints the email address and user ID of the currently authenticated account.

    ***

    **`mechanex manage-account delete`**

    Permanently deletes your account and all associated data. Prompts for confirmation before proceeding. This action is irreversible.

    ***

    **`mechanex manage-account change-password`**

    Requests a password reset email for the current account.

    ***

    **`mechanex manage-account change-email`**

    Prints the Spectra account settings URL. Email changes are managed from Spectra settings.

    ***
  </Accordion>

  <Accordion title="API Keys">
    **`mechanex list-api-keys`**

    Lists all API keys on your account. Output includes each key's name, ID, key value, creation date, and last-used date.

    ***

    **`mechanex create-api-key [--name NAME]`**

    Creates a new API key. The full key value is printed once — copy it immediately. Use `--name` to label the key; when omitted, the name defaults to `Default Key`.
  </Accordion>

  <Accordion title="Billing">
    **`mechanex balance`**

    Prints your current credit balance in USD (e.g., `Balance: $45.20`).

    ***

    **`mechanex topup`**

    Opens a Stripe checkout page in your default browser to add credits to your account. The browser must be accessible from your environment for this command to be useful.
  </Accordion>

  <Accordion title="Local Server">
    **`mechanex serve [--port PORT] [--host HOST] [--use-vllm]`**

    Starts a local OpenAI-compatible API server. Serves the currently configured model (remote or local) at `http://HOST:PORT/v1/`. See [Serving](/products/mechanex/serving) for details on the endpoints.

    Default: `--host 0.0.0.0 --port 8000`.
  </Accordion>
</AccordionGroup>
