https://github.com/dinoki-ai/osaurus-js
Osaurus SDK
https://github.com/dinoki-ai/osaurus-js
electron llm macos nodejs osaurus
Last synced: 9 months ago
JSON representation
Osaurus SDK
- Host: GitHub
- URL: https://github.com/dinoki-ai/osaurus-js
- Owner: dinoki-ai
- Created: 2025-10-01T00:03:00.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-02T23:10:02.000Z (9 months ago)
- Last Synced: 2025-10-02T23:20:31.809Z (9 months ago)
- Topics: electron, llm, macos, nodejs, osaurus
- Language: TypeScript
- Homepage: https://osaurus.ai
- Size: 30.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @osaurus/sdk
Osaurus SDK for Node.js and Electron.
## Installation
```bash
npm install @osaurus/sdk
# or
pnpm add @osaurus/sdk
# or
yarn add @osaurus/sdk
# or
bun add @osaurus/sdk
```
## Usage
```ts
import { discover } from "@osaurus/sdk";
const instance = await discover();
console.log("Osaurus running at:", instance.url);
```
## Examples
See [examples](examples/) folder for complete examples:
* [Basic](examples/basic.ts) - Basic usage of the SDK.
* [With OpenAI](examples/openai.ts) - Using the SDK with OpenAI.
* [Streaming](examples/streaming.ts) - Using the SDK with streaming.
* [Electron](examples/electron.ts) - Using the SDK with Electron.
### Run examples locally
```bash
cd examples
bun install
bun run basic
```
## API
* `discover(): Promise`
Discovers the latest running Osaurus instance.
Returns:
* `instanceId`: Unique instance identifier
* `url`: Base URL for API calls
* `port`: Port number
* `address`: IP address
* `exposeToNetwork`: Whether exposed to LAN
* `updatedAt`: Last update timestamp
Throws if no running instance found.
## License
MIT