Altertable CLI
Install the CLI, log in, and run a first query. You need an Altertable account with access to an organization and environment.
Set up with your agent
1. Install the CLI
Run the installer in your terminal:
curl -fsSL https://install.altertable.ai | sh
Other installation methods
Install from npm:
npm install -g @altertable/cli
You can also download a binary for your operating system from GitHub Releases.
2. Log in
altertable login
Complete browser login and choose your organization and environment. The CLI creates or reuses a local profile with those settings. The first lakehouse command automatically provisions temporary credentials for that profile. You do not need to copy credentials for this login-based workflow.
For environment-variable configuration, supply ALTERTABLE_BASIC_AUTH_TOKEN or ALTERTABLE_LAKEHOUSE_USERNAME and ALTERTABLE_LAKEHOUSE_PASSWORD explicitly. Automatic provisioning applies to stored profiles with management access. See profile configuration for manually configured profiles.
3. Verify your first query
Check that the active profile points to the intended environment, then run a query that needs no existing table:
altertable profile showaltertable query "SELECT 1 AS connected"
The query should return a connected column with the value 1.
Next, ingest your first data and read it back.
More CLI workflows
- Query options, SQL files, and output formats
- Append records, upload files, and upsert rows
- Manage profiles and log in as a service account
- Call the management API
- Develop data apps
- Use the CLI with agents
For all commands and global flags, see the CLI reference.
Troubleshooting
- Credentials expired: run
altertable loginagain. - Wrong environment: switch to the correct profile.
- Login works but queries fail: check the profile's lakehouse credentials.