From 87a955ac67ed25ce8297c5ae92f8d24ed7eb90a8 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Thu, 1 Oct 2026 12:51:26 -0500 Subject: [PATCH] docs: update README.md with install and config details --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/README.md b/README.md index d7589ca..ac155b3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,55 @@ # Onx An agent-friendly CLI (built in Rust btw) for the Onspring API. + +## Installation + +### Linux & macOS + +Install via shell script: + +```bash +curl -fsSL https://raw.githubusercontent.com/StevanFreeborn/onx/main/scripts/install.sh | bash +``` + +To install a specific version or customize the install directory: + +```bash +curl -fsSL https://raw.githubusercontent.com/StevanFreeborn/onx/main/scripts/install.sh | bash -s -- --version v0.1.0 --to ~/.local/bin +``` + +### Windows + +Install via PowerShell: + +```powershell +irm https://raw.githubusercontent.com/StevanFreeborn/onx/main/scripts/install.ps1 | iex +``` + +To install a specific version or customize the install directory: + +```powershell +& ([scriptblock]::Create((irm https://raw.githubusercontent.com/StevanFreeborn/onx/main/scripts/install.ps1))) -Version v0.1.0 -InstallDir "$HOME\.onx\bin" +``` + +## Configuration + +`onx` can be configured using command-line arguments, a JSON configuration file, or environment variables. + +### Precedence + +1. **Command-line flags** (`--api-key`, `--base-url`, `--pretty`) +2. **Configuration file** (`~/.config/onx/config.json` or `--config `) +3. **Environment variables** (`ONSPRING_API_KEY`, `ONSPRING_BASE_URL`) + +### Configuration File Format + +Create `~/.config/onx/config.json`: + +```json +{ + "apiKey": "your-api-key", + "baseUrl": "https://api.onspring.com", + "pretty": true +} +```