Axiom CLI
Learn how to use the Axiom CLI to ingest data, manage authentication state, and configure multiple deployments.
Axiom’s command line interface (CLI) is an Axiom tool that lets you test, manage, and build your Axiom projects by typing commands on the command-line.
You can use the command line to Ingest data, manage authentication state, and configure multiple organizations.
Installation
Install using go install
To install Axiom CLI, make sure you have Go installed, then run this command from any directory in your terminal.
Install using Homebrew
You can also install the CLI using Homebrew
This installs Axiom command globally so you can run axiom
commands from any directory.
To update:
Install from source
Run the Docker image
Docker images are available on DockerHub.
You can check the version and find out basic commands about Axiom CLI by running the following command:
Authentication
The easiest way to start using Axiom CLI is by logging in through the command line. Simply run axiom auth login
or simply axiom
if no prior configuration exists. This will guide you through a straightforward login process.
Managing multiple organizations
While most users will only need to manage a single Axiom deployment, Axiom CLI provides the capability to switch between multiple organizations for those who require it. You can easily switch between organizations using straightforward CLI commands. For example, axiom auth switch-org
lets you change your active organization, or you can set the AXIOM_ORG_ID
environment variable for the same purpose.
Every setting in Axiom CLI can be overwritten via environment variables configured in the ~/.axiom.toml
file. Specifically, AXIOM_URL
, AXIOM_TOKEN
, and AXIOM_ORG_ID
are important for configuring your environment. The AXIOM_URL
should be set to https://api.axiom.co
. You can switch between environments using the axiom auth select
command.
To view available environment variables, run axiom help environment
for an up to date list of env vars:
One-Click Login
The One-Click Login is an easier way to authenticate Axiom-CLI and log in to your Axiom deployments and account resources directly on your terminal using the Axiom CLI.
Field list
Tokens
You can generate an ingest and personal token manually in your Axiom user settings.
See Tokens to know more about managing access and authorization.
Configuration and Deployment
Axiom CLI lets you ingest, authenticate, and stream data.
For more information about Configuration, managing authentication status, ingesting, streaming, and more, visit the Axiom CLI repository on GitHub.
Axiom CLI supports the ingestion of different formats of data ( JSON, NDJSON, and CSV)
Querying
Get deeper insights into your data using Axiom Processing Language
Ingestion
Import, transfer, load and process data for later use or storage using the Axiom CLI. With Axiom CLI you can Ingest the contents of a JSON, NDJSON, CSV logfile into a dataset.
To view a list of all the available commands run axiom
on your terminal:
Command Reference
Below are the commonly used commands on Axiom CLI
Core Commands
Commands | Description |
---|---|
axiom ingest | Ingest data |
axiom query | Query data using APL |
axiom stream | Live stream data |
Management Commands
Commands | Description |
---|---|
axiom auth login | Login to Axiom |
axiom auth logout | Logout of Axiom |
axiom auth select | Select an Axiom environment configuration |
axiom auth status | View authentication status |
axiom auth switch-org | Switch the organization |
axiom auth update-token | Update the token used to authenticate |
axiom config edit | Edit the configuration file |
axiom config get | Get a configuration value |
axiom config set | Set a configuration value |
axiom config export | Export the configuration values |
axiom dataset create | Create a dataset |
axiom dataset delete | Delete a dataset |
axiom dataset list | List all datasets |
axiom dataset trim | Trim a dataset to a given size |
axiom dataset update | Update a dataset |
Additional Commands
Commands | Description |
---|---|
axiom completion bash | Generate shell completion script for bash |
axiom completion fish | Generate shell completion script for fish |
axiom completion powershell | Generate shell completion script for powershell |
axiom completion zsh | Generate shell completion script for zsh |
axiom help | Help about any command |
axiom version | Print version |
axiom web | Open Axiom in the browser |
Get help
To get usage tips and learn more about available commands from within Axiom CLI, run the following:
For more information about a specific command, run help
with the name of the command.
This also works for sub-commands.
if you have questions, or any opinions you can start an issue on Axiom CLI’s open source repository.
You can also visit our Discord community to start or join a discussion. We’d love to hear from you!