Skip to content

codeteleport auth

Terminal window
codeteleport auth login [--github] [--email] [--register] [--api-url <url>]
codeteleport auth logout

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 --register to 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.

FlagDescription
--githubLog in with GitHub OAuth. Opens a browser window.
--emailLog in with email and password. Prompts for credentials.
--registerCreate 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.

No flags. Removes ~/.codeteleport/config.json and prints a confirmation.

$ codeteleport auth login
How do you want to log in?
1) GitHub
2) Email & Password
> 1
Opening browser for GitHub login...
If the browser doesn't open, visit: https://api.codeteleport.com/v1/auth/github?cli_port=54921
Logged in via GitHub
Device: work-laptop
API: https://api.codeteleport.com/v1
Config saved to ~/.codeteleport/config.json
$ codeteleport auth login --github
Opening browser for GitHub login...
If the browser doesn't open, visit: https://api.codeteleport.com/v1/auth/github?cli_port=54921
Logged in via GitHub
Device: work-laptop
API: https://api.codeteleport.com/v1
Config saved to ~/.codeteleport/config.json
$ codeteleport auth login --email
Email: alice@example.com
Password: ********
Logged in as alice@example.com
Device: work-laptop
API: https://api.codeteleport.com/v1
Config saved to ~/.codeteleport/config.json
$ codeteleport auth login --register
Email: alice@example.com
Password: ********
Account created for alice@example.com
Logged in as alice@example.com
Device: work-laptop
API: https://api.codeteleport.com/v1
Config saved to ~/.codeteleport/config.json
$ codeteleport auth login --github --api-url http://localhost:8787/v1
Opening browser for GitHub login...
If the browser doesn't open, visit: http://localhost:8787/v1/auth/github?cli_port=54921
Logged in via GitHub
Device: work-laptop
API: http://localhost:8787/v1
Config saved to ~/.codeteleport/config.json
$ codeteleport auth logout
Logged out. Config removed.