codeteleport auth
Synopsis
Section titled “Synopsis”codeteleport auth login [--github] [--email] [--register] [--api-url <url>]codeteleport auth logoutDescription
Section titled “Description”The auth command manages your CodeTeleport credentials. Before you can push or pull sessions, you need to authenticate with a CodeTeleport account.
codeteleport auth login supports two authentication methods:
- GitHub OAuth — opens your default browser, completes the OAuth flow, and catches the callback on a local HTTP server.
- Email & password — prompts for credentials directly in the terminal. Use
--registerto create a new account.
When no flags are provided, an interactive prompt lets you choose:
How do you want to log in? 1) GitHub 2) Email & Password>On successful login, CodeTeleport creates an API token scoped to the current device (using your hostname) and saves the config to ~/.codeteleport/config.json.
codeteleport auth logout removes the local config file, effectively signing you out on this device. The API token remains valid on the server until it expires or is revoked from the dashboard.
auth login
Section titled “auth login”| Flag | Description |
|---|---|
--github | Log in with GitHub OAuth. Opens a browser window. |
--email | Log in with email and password. Prompts for credentials. |
--register | Create a new account with email and password (implies --email). |
--api-url <url> | Connect to a custom API server instead of the default https://api.codeteleport.com. Useful for local development or self-hosted instances. |
auth logout
Section titled “auth logout”No flags. Removes ~/.codeteleport/config.json and prints a confirmation.
Examples
Section titled “Examples”Interactive login (no flags)
Section titled “Interactive login (no flags)”$ codeteleport auth loginHow do you want to log in? 1) GitHub 2) Email & Password> 1Opening browser for GitHub login...If the browser doesn't open, visit: https://api.codeteleport.com/v1/auth/github?cli_port=54921
Logged in via GitHubDevice: work-laptopAPI: https://api.codeteleport.com/v1Config saved to ~/.codeteleport/config.jsonGitHub login
Section titled “GitHub login”$ codeteleport auth login --githubOpening browser for GitHub login...If the browser doesn't open, visit: https://api.codeteleport.com/v1/auth/github?cli_port=54921
Logged in via GitHubDevice: work-laptopAPI: https://api.codeteleport.com/v1Config saved to ~/.codeteleport/config.jsonEmail login
Section titled “Email login”$ codeteleport auth login --emailEmail: alice@example.comPassword: ********
Logged in as alice@example.comDevice: work-laptopAPI: https://api.codeteleport.com/v1Config saved to ~/.codeteleport/config.jsonRegister a new account
Section titled “Register a new account”$ codeteleport auth login --registerEmail: alice@example.comPassword: ********Account created for alice@example.com
Logged in as alice@example.comDevice: work-laptopAPI: https://api.codeteleport.com/v1Config saved to ~/.codeteleport/config.jsonConnect to a local dev server
Section titled “Connect to a local dev server”$ codeteleport auth login --github --api-url http://localhost:8787/v1Opening browser for GitHub login...If the browser doesn't open, visit: http://localhost:8787/v1/auth/github?cli_port=54921
Logged in via GitHubDevice: work-laptopAPI: http://localhost:8787/v1Config saved to ~/.codeteleport/config.jsonLog out
Section titled “Log out”$ codeteleport auth logoutLogged out. Config removed.Related commands
Section titled “Related commands”codeteleport status— verify your login and see account detailscodeteleport push— push a session (requires authentication)codeteleport pull— pull a session (requires authentication)