Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading