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
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release

on:
push:
branches:
- main
- beta
- next

permissions:
contents: read

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: Install dependencies
run: npm clean-install

- name: Build
run: npm run build

- name: Verify npm signatures
run: npm audit signatures

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
8 changes: 8 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"debug": true,
"branches": [
"main",
{ "name": "beta", "prerelease": true },
{ "name": "next", "prerelease": true }
]
}
22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

React Native bindings for Apple's on-device [FoundationModels](https://developer.apple.com/documentation/FoundationModels) framework.

> **⚠️ Work in Progress**
> **⚠️ Experimental**
> This library is under active development. The API may change.

## Requirements
Expand All @@ -13,18 +13,8 @@ React Native bindings for Apple's on-device [FoundationModels](https://developer

## Installation

> **Note:** This package is not yet published to npm. You must build and link it locally.

```bash
# Clone and build the module
git clone https://github.com/drewalth/react-native-foundation-models.git
cd react-native-foundation-models
npm install
npm run build
npm link

# In your project
npm link react-native-foundation-models
npx expo install @drewalth/react-native-foundation-models
```

## Usage
Expand All @@ -35,7 +25,7 @@ npm link react-native-foundation-models
import {
FoundationModelSession,
isAvailable,
} from "react-native-foundation-models";
} from "@drewalth/react-native-foundation-models";

if (isAvailable()) {
// Create a session
Expand Down Expand Up @@ -100,7 +90,7 @@ export default {
expo: {
plugins: [
[
"react-native-foundation-models",
"@drewalth/react-native-foundation-models",
{
tools: [
{
Expand Down Expand Up @@ -163,7 +153,7 @@ export default {
Pass tool handlers directly to the session constructor:

```typescript
import { FoundationModelSession } from "react-native-foundation-models";
import { FoundationModelSession } from "@drewalth/react-native-foundation-models";

const session = new FoundationModelSession({
instructions:
Expand Down Expand Up @@ -227,7 +217,7 @@ import {
FoundationModelSession,
isAvailable,
type Message,
} from "react-native-foundation-models";
} from "@drewalth/react-native-foundation-models";

function ChatScreen() {
const [messages, setMessages] = useState<Message[]>([]);
Expand Down
2 changes: 1 addition & 1 deletion example/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
},
],
[
"react-native-foundation-models",
"@drewalth/react-native-foundation-models",
{
tools: [
{
Expand Down
22 changes: 16 additions & 6 deletions example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"expo-build-properties": "~1.0.10",
"react": "19.1.0",
"react-native": "0.81.5",
"react-native-foundation-models": "file:.."
"@drewalth/react-native-foundation-models": "file:.."
},
"devDependencies": {
"@types/react": "~19.1.0",
Expand Down
Loading