From 65985347bf8b64158bee46b7253d6f8aa625c364 Mon Sep 17 00:00:00 2001 From: Lorris Saint-Genez Date: Mon, 13 Jul 2026 12:04:03 -0700 Subject: [PATCH] docs: add Get Started section and local build usage hint --- CONTRIBUTING.md | 2 ++ README.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6031ba41..29b6361c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -75,6 +75,8 @@ task build `task build` runs `go generate ./...` first, then produces the `algolia` binary at the root of the repository. +You can then use it by doing `./algolia your_command ...` + Build-time defaults (dashboard URL, OAuth client ID, and so on) are injected from environment variables. If you need non-default values, copy [`.env.example`](.env.example) to `.env` and fill it in. ## Tests diff --git a/README.md b/README.md index 0bd413ff..5ecdc733 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,35 @@ To build the Algolia CLI from source, you'll need: 1. Clone the repo: `git clone https://github.com/algolia/cli.git algolia-cli && cd algolia-cli` 1. Run: `task build` +## Get started + +### Sign in + +Sign in through the browser (this also lets you sign up if you don't have an account yet): + +```sh +algolia auth login +``` + +If your account has no application, the CLI prompts you to create one. +On a machine without a browser (SSH, container), use `algolia auth login --no-browser`. +Check your status anytime with `algolia auth status`. + +### Choose an application + +```sh +algolia application list # list your applications +algolia application select # set the current one +algolia application create --name "My App" --region EU # regions: EU, UK, USC, USE, USW +``` + +### Index and search your first records + +```sh +algolia objects import MOVIES -F movies.ndjson # import records into the MOVIES index +algolia search MOVIES --query "toy story" # search them +``` + ## Support If you found an issue with the Algolia CLI,