# CLI Source: https://docs.runalph.ai/cli Run and connect a JupyterLab server to Alph from anywhere ## Installation ```bash theme={null} pip install alphai ``` ## Authentication ```bash theme={null} alphai login ``` This opens your browser for secure authentication. Alternatively, use a token from [runalph.ai/account/tokens](https://runalph.ai/account/tokens): ```bash theme={null} alphai login --token YOUR_TOKEN ``` ## Start JupyterLab ```bash theme={null} alphai jupyter lab ``` This starts JupyterLab locally and connects it to Alph. You'll be prompted to select an organization and project. ## Common Options ```bash theme={null} # Specify org and project alphai jupyter lab --org my-org --project my-project # Use a specific port for the notebook server alphai jupyter lab --port 8889 # Expose a web app through Alph's tunnel alphai jupyter lab --app-port 5000 ``` ## Quick Reference ```bash theme={null} alphai login # Authenticate alphai logout # Clear credentials alphai status # Check auth status alphai orgs # List organizations alphai projects # List projects alphai nb # Manage notebooks alphai jupyter lab # Start JupyterLab ``` # AI and Agents Source: https://docs.runalph.ai/concepts/ai Built-in AI agents across notebooks and projects ## AI in Alph AI is woven into the platform — not bolted on. Generate code, chat about your work, and run autonomous agents, all with context from your notebooks and project files. ## Models Three providers, choose per-conversation: * **Claude** (Anthropic) * **GPT** (OpenAI) * **Gemini** (Google) ## The AI Editor Every project includes an AI editor — an agent that operates as a pair programmer with full control over your environment. **Access:** `https://runalph.ai/{org}/{project}/ide` The agent can: * **Create and execute notebook cells** — write Python, run it, read the output, iterate * **Create and edit files** — scripts, configs, data files, anywhere in your project * **Debug errors** — read tracebacks, fix code, re-run automatically * **Install packages** — run shell commands to set up dependencies * **Read outputs** — interpret plots, dataframes, and errors to decide next steps Create multiple chats for different tasks. Chats persist across sessions. The agent has full access to your project's filesystem and kernels — it works like having a developer inside your environment. Agents run server-side, so you can dispatch a task and close your browser. Come back later to check progress, review what the agent did, and continue the conversation. ## In Notebooks ### Generate in a Cell Press `Ctrl/Cmd + K` while editing a cell. Describe what you want and the AI writes it, using your notebook's imports, variables, and prior cells as context. ### Generate New Cells | Shortcut | Action | | --------- | ------------------------------ | | `F` / `G` | AI code cell above / below | | `S` / `D` | AI markdown cell above / below | Or click the **+ AI** buttons between cells. ### Tips * Be specific: *"histogram of age column with 20 bins"* not *"make a chart"* * Use markdown cells to describe your goals — AI reads them for context * Iterate: refine your prompt if the first result isn't right ## Generators Beyond notebooks, AI can generate: * Python scripts * Terminal commands * CSV, JSON, HTML, SVG * Markdown documentation * Images These are available contextually throughout the platform. # GitHub Sync Source: https://docs.runalph.ai/concepts/github-sync Import, sync, and view notebooks from GitHub repositories ## Overview Alph integrates deeply with GitHub — import notebooks from repos, sync changes bidirectionally with cell-level diffs, and view any public notebook without cloning. **Important:** Imported and synced notebooks live in Alph. They're full Alph notebooks with AI assistance, execution, and publishing. The GitHub connection is for syncing content — the notebook itself is hosted on the platform. The `gitalph.com` viewer is separate — it renders notebooks directly from GitHub for quick viewing without importing. ## Connecting GitHub From your organization settings, click **Integrations** Click **Connect GitHub** and authorize the Alph GitHub App Choose which repos to give Alph access to ## Importing Notebooks 1. Go to **Notebooks** → **Import** → **From GitHub** 2. Browse your connected repositories 3. Select notebooks to import (single or bulk) 4. Set title, visibility, and tags 5. Click **Import** Once imported, the notebook is an Alph notebook. Edit it with AI, execute code, publish it — everything works. You can also drag-and-drop `.ipynb` files directly. ## Bidirectional Sync Once a notebook is connected to a GitHub repo, changes flow both ways. **Pull** — fetch the latest version from GitHub into Alph. **Push** — commit your changes back to the repo. You can push directly to a branch or open a pull request with a custom commit message. **Status indicators** show when your notebook is ahead (local changes), behind (remote changes), or both (needs merge). ### Cell-Level Diffs Before pulling or pushing, review exactly what changed — cell by cell. * Added, removed, and modified cells are color-coded * Source code shows line-by-line unified diffs * Output changes are displayed side-by-side * Markdown cells show rendered previews This isn't a raw JSON diff. It's a structured comparison that understands notebook semantics. ### Auto-Sync Sync stays active by default. You can pause it (unsync) and resume later (reconnect) without losing the GitHub connection. ## GitHub Notebook Viewer Any public GitHub notebook is available in Alph. Just swap `github.com` for `gitalph.com` in the URL: ``` github.com/owner/repo/blob/main/notebook.ipynb → gitalph.com/owner/repo/blob/main/notebook.ipynb ``` This isn't just a viewer — it's a full Alph notebook. Connect a project and execute cells, use AI assistance, chat about the code. Every `.ipynb` on GitHub is one URL swap away from being a live, runnable notebook. ## Managing Access * **Add repos:** Integrations → GitHub → Configure * **Disconnect:** GitHub Settings → Applications → Uninstall Alph # Notebooks Source: https://docs.runalph.ai/concepts/notebooks Standard Jupyter notebooks with AI, search, and publishing built in ## What are Notebooks? Notebooks are standard Jupyter `.ipynb` files — no lock-in. You can create, edit, and share them without any compute. To execute code, connect one to a [project](/concepts/projects). ## Creating a Notebook 1. Go to **Notebooks** in your organization 2. Click **New Notebook** 3. Set a title and visibility 4. Start writing You can also import from GitHub or drag-and-drop `.ipynb` files. ## The Editor Notebooks have two cell types: **code** and **markdown**. Switch modes with `Enter` (edit) and `Esc` (command). | Shortcut | Action | | ------------------ | -------------------------- | | `Shift + Enter` | Run cell, move to next | | `Ctrl/Cmd + Enter` | Run cell in place | | `A` / `B` | Insert cell above / below | | `X` | Delete cell | | `M` / `Y` | Convert to markdown / code | ## Execution To run code, connect your notebook to a project's kernel: 1. Open the notebook 2. Select an **Organization** and **Project** 3. Run cells with `Shift + Enter` The kernel provides a Python runtime. Install packages with `!pip install` and restart the kernel afterward. ## AI Assistance AI is built into the editor. No extensions needed. * **Prompt in cell:** `Ctrl/Cmd + K` to generate content for the current cell * **Generate cells:** Press `F`/`G` for code or `S`/`D` for markdown (above/below) * **Chat panel:** Ask questions about your code with context from your notebook Works with Claude, GPT, and Gemini. See [AI](/concepts/ai) for details. ## Publishing & Sharing Toggle a notebook to **Public** to make it searchable and shareable. * **Direct link:** `https://runalph.ai/{org}/~/notebooks/{slug}` * **Embed:** ` ``` Replace `{org}` with your organization slug and `{notebook-slug}` with the notebook slug. Both are visible in the notebook URL. Only **public** notebooks can be embedded. ## Embed Builder The fastest way to configure an embed is the visual builder at [runalph.ai/embed](https://runalph.ai/embed). Set the organization slug and notebook slug. The preview updates live. Choose which cells to show, pick a theme, and toggle source code or output visibility. Click **Copy** to grab the iframe snippet and paste it into your site. The builder also has a **Manage** tab where you can view, pause, or delete your managed embed configurations. ## URL Parameters Control what the embed shows by adding query parameters to the iframe `src`. | Parameter | Example | Description | | ------------- | ------------------ | -------------------------------------------------------------- | | `cell` | `cell=2` | Show a single cell by index (0-based) | | `cells` | `cells=0,2-5,8` | Show specific cells — indices, ranges, or both | | `cellId` | `cellId=abc123` | Show a cell by its metadata ID | | `theme` | `theme=dark` | Force `light` or `dark`. Omit to inherit from the parent page. | | `showSource` | `showSource=0` | Hide source code (show outputs only) | | `showOutput` | `showOutput=0` | Hide outputs (show source only) | | `embedConfig` | `embedConfig={id}` | Enable managed execution (see below) | ### Examples Show only cells 0 through 3 in dark mode, outputs only: ``` https://runalph.ai/embed/my-org/my-notebook?cells=0-3&theme=dark&showSource=0 ``` Show a single cell by metadata ID: ``` https://runalph.ai/embed/my-org/my-notebook?cellId=train-model ``` ## Execution Modes Embeds support two ways for viewers to run code. ### Standard Viewers see the notebook's saved source and outputs. Signed-in Alph users can connect their own project to execute cells directly. No extra configuration needed — this is the default. ### Managed Your project powers the embed. Execution is proxied through Alph so your Jupyter credentials are never exposed to viewers. Only the notebook's existing cell sources can be run. Go to [runalph.ai/embed](https://runalph.ai/embed) and switch the Execution section to **Managed**. Pick the organization and project that will back execution. The project must be active. Click **Create embed configuration**. The builder adds the `embedConfig` parameter to your snippet automatically. You can manage configurations from the **Manage** tab — pause, resume, or delete them at any time. ## Security * Only public notebooks can be embedded * Managed mode never exposes your Jupyter token to viewers * Only the notebook's existing cell code can be executed — arbitrary code is rejected * Execution is rate-limited per embed configuration * Concurrent sessions are capped per configuration ## Sizing Tips The embed renders at whatever size the iframe allows. A few recommendations: * **Full notebook:** `width="100%" height="600"` or larger * **Single cell:** `width="100%" height="300"` is usually enough * **Responsive:** use CSS to make the iframe fill its container ```html theme={null}
``` # Welcome to Alph Source: https://docs.runalph.ai/index Jupyter notebooks that think with you ## What is Alph? Alph is a cloud platform where a python notebook is a first-class citizen. Projects are Jupyter Lab servers. Notebooks are standard `.ipynb` files — no lock-in. AI assistance is built in. Create, edit, publish, and search Jupyter notebooks Cloud compute with terminals, kernels, and web app hosting Generate code, chat, and run agents with Claude, GPT, and Gemini Import, sync, and view notebooks from GitHub repos ## Who is Alph for? Train and deploy models on scalable cloud compute Explore data and build models with AI-assisted coding Collaborate on notebooks with role-based access control ## Get Started Every user needs an organization to create notebooks and projects Projects provide cloud compute for running notebook code Start from scratch, upload .ipynb files, or import from GitHub Link your notebook to a project to execute code ## Next Steps Get up and running in 5 minutes See what's possible with Alph # Quickstart Source: https://docs.runalph.ai/quickstart Get started with Alph in 5 minutes ## Interactive Demo Explore a live notebook to see what Alph can do: