onde-cli 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {onde_cli-0.2.0 → onde_cli-0.2.1}/.github/workflows/ci.yml +4 -2
- {onde_cli-0.2.0 → onde_cli-0.2.1}/.github/workflows/release-crates.yml +1 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/.github/workflows/release-github.yml +1 -0
- onde_cli-0.2.1/.github/workflows/release-npm.yml +221 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/.github/workflows/release-pypi.yml +2 -1
- onde_cli-0.2.1/.nvmrc +1 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/Cargo.lock +3 -1
- {onde_cli-0.2.0 → onde_cli-0.2.1}/Cargo.toml +3 -1
- {onde_cli-0.2.0 → onde_cli-0.2.1}/PKG-INFO +1 -1
- {onde_cli-0.2.0 → onde_cli-0.2.1}/build.rs +16 -5
- onde_cli-0.2.1/npm/README.md.tmpl +27 -0
- onde_cli-0.2.1/npm/onde-cli/.gitignore +2 -0
- onde_cli-0.2.1/npm/onde-cli/README.md +79 -0
- onde_cli-0.2.1/npm/onde-cli/package-lock.json +77 -0
- onde_cli-0.2.1/npm/onde-cli/package.json +45 -0
- onde_cli-0.2.1/npm/onde-cli/src/index.ts +41 -0
- onde_cli-0.2.1/npm/onde-cli/tsconfig.json +12 -0
- onde_cli-0.2.1/npm/package-main.json.tmpl +42 -0
- onde_cli-0.2.1/npm/package.json.tmpl +14 -0
- onde_cli-0.2.1/npm/scripts/render-main-package.cjs +34 -0
- onde_cli-0.2.1/npm/scripts/render-platform-package.cjs +56 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/src/app.rs +899 -22
- {onde_cli-0.2.0 → onde_cli-0.2.1}/src/finetune.rs +122 -17
- onde_cli-0.2.1/src/gguf.rs +774 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/src/hf.rs +1 -1
- onde_cli-0.2.1/src/hf_clone.rs +275 -0
- onde_cli-0.2.1/src/hf_upload.rs +659 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/src/main.rs +5 -0
- onde_cli-0.2.1/src/merge.rs +233 -0
- onde_cli-0.2.1/src/project.rs +359 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/src/ui.rs +862 -43
- {onde_cli-0.2.0 → onde_cli-0.2.1}/.github/workflows/release-homebrew.yml +0 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/.gitignore +0 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/LICENSE +0 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/README.md +0 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/assets/ondeinference-apps.png +0 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/pypi/README.md +0 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/pypi/pyproject.toml +0 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/pyproject.toml +0 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/rust-toolchain.toml +0 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/src/gresiq.rs +0 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/src/hf_search.rs +0 -0
- {onde_cli-0.2.0 → onde_cli-0.2.1}/src/token.rs +0 -0
|
@@ -2,8 +2,6 @@ name: CI
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
5
|
pull_request:
|
|
8
6
|
workflow_dispatch:
|
|
9
7
|
|
|
@@ -58,6 +56,7 @@ jobs:
|
|
|
58
56
|
ONDE_APP_SECRET: ${{ secrets.ONDE_APP_SECRET }}
|
|
59
57
|
GRESIQ_API_KEY: ${{ secrets.GRESIQ_API_KEY }}
|
|
60
58
|
GRESIQ_API_SECRET: ${{ secrets.GRESIQ_API_SECRET }}
|
|
59
|
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
|
61
60
|
|
|
62
61
|
test:
|
|
63
62
|
name: Test
|
|
@@ -82,6 +81,7 @@ jobs:
|
|
|
82
81
|
ONDE_APP_SECRET: ${{ secrets.ONDE_APP_SECRET }}
|
|
83
82
|
GRESIQ_API_KEY: ${{ secrets.GRESIQ_API_KEY }}
|
|
84
83
|
GRESIQ_API_SECRET: ${{ secrets.GRESIQ_API_SECRET }}
|
|
84
|
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
|
85
85
|
|
|
86
86
|
check:
|
|
87
87
|
name: Cargo check
|
|
@@ -106,6 +106,7 @@ jobs:
|
|
|
106
106
|
ONDE_APP_SECRET: ${{ secrets.ONDE_APP_SECRET }}
|
|
107
107
|
GRESIQ_API_KEY: ${{ secrets.GRESIQ_API_KEY }}
|
|
108
108
|
GRESIQ_API_SECRET: ${{ secrets.GRESIQ_API_SECRET }}
|
|
109
|
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
|
109
110
|
|
|
110
111
|
build:
|
|
111
112
|
name: Build (aarch64-apple-darwin)
|
|
@@ -129,6 +130,7 @@ jobs:
|
|
|
129
130
|
ONDE_APP_SECRET: ${{ secrets.ONDE_APP_SECRET }}
|
|
130
131
|
GRESIQ_API_KEY: ${{ secrets.GRESIQ_API_KEY }}
|
|
131
132
|
GRESIQ_API_SECRET: ${{ secrets.GRESIQ_API_SECRET }}
|
|
133
|
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
|
132
134
|
|
|
133
135
|
ci:
|
|
134
136
|
name: CI status
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
name: NPM Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
tag:
|
|
10
|
+
description: "Release tag (e.g. v0.2.0)"
|
|
11
|
+
required: true
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
id-token: write
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
env:
|
|
18
|
+
CARGO_TERM_COLOR: always
|
|
19
|
+
ONDE_APP_ID: ${{ secrets.ONDE_APP_ID }}
|
|
20
|
+
ONDE_APP_SECRET: ${{ secrets.ONDE_APP_SECRET }}
|
|
21
|
+
GRESIQ_API_KEY: ${{ secrets.GRESIQ_API_KEY }}
|
|
22
|
+
GRESIQ_API_SECRET: ${{ secrets.GRESIQ_API_SECRET }}
|
|
23
|
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
publish-npm-binaries:
|
|
27
|
+
name: Publish NPM platform packages
|
|
28
|
+
runs-on: ${{ matrix.build.OS }}
|
|
29
|
+
strategy:
|
|
30
|
+
fail-fast: false
|
|
31
|
+
matrix:
|
|
32
|
+
build:
|
|
33
|
+
- {
|
|
34
|
+
NAME: linux-x64-glibc,
|
|
35
|
+
OS: ubuntu-latest,
|
|
36
|
+
TARGET: x86_64-unknown-linux-gnu,
|
|
37
|
+
}
|
|
38
|
+
- {
|
|
39
|
+
NAME: linux-arm64-glibc,
|
|
40
|
+
OS: ubuntu-24.04-arm,
|
|
41
|
+
TARGET: aarch64-unknown-linux-gnu,
|
|
42
|
+
}
|
|
43
|
+
- {
|
|
44
|
+
NAME: win32-x64-msvc,
|
|
45
|
+
OS: windows-2022,
|
|
46
|
+
TARGET: x86_64-pc-windows-msvc,
|
|
47
|
+
}
|
|
48
|
+
- {
|
|
49
|
+
NAME: win32-arm64-msvc,
|
|
50
|
+
OS: windows-2022,
|
|
51
|
+
TARGET: aarch64-pc-windows-msvc,
|
|
52
|
+
}
|
|
53
|
+
- {
|
|
54
|
+
NAME: darwin-x64,
|
|
55
|
+
OS: macos-15-intel,
|
|
56
|
+
TARGET: x86_64-apple-darwin,
|
|
57
|
+
}
|
|
58
|
+
- {
|
|
59
|
+
NAME: darwin-arm64,
|
|
60
|
+
OS: macos-latest,
|
|
61
|
+
TARGET: aarch64-apple-darwin,
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
steps:
|
|
65
|
+
- name: Checkout
|
|
66
|
+
uses: actions/checkout@v6
|
|
67
|
+
with:
|
|
68
|
+
ref: ${{ github.event.inputs.tag || github.ref }}
|
|
69
|
+
|
|
70
|
+
- name: Set the release version
|
|
71
|
+
shell: bash
|
|
72
|
+
run: |
|
|
73
|
+
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
|
|
74
|
+
release_version="${GITHUB_REF_NAME#v}"
|
|
75
|
+
else
|
|
76
|
+
release_version="${{ github.event.inputs.tag }}"
|
|
77
|
+
release_version="${release_version#v}"
|
|
78
|
+
fi
|
|
79
|
+
echo "RELEASE_VERSION=${release_version}" >> "$GITHUB_ENV"
|
|
80
|
+
|
|
81
|
+
- name: Read Rust toolchain
|
|
82
|
+
shell: bash
|
|
83
|
+
run: |
|
|
84
|
+
rust_toolchain="$(sed -n 's/^channel = "\(.*\)"/\1/p' rust-toolchain.toml | head -n 1)"
|
|
85
|
+
if [ -z "$rust_toolchain" ]; then
|
|
86
|
+
echo "Failed to read Rust toolchain from rust-toolchain.toml" >&2
|
|
87
|
+
exit 1
|
|
88
|
+
fi
|
|
89
|
+
echo "RUST_TOOLCHAIN=${rust_toolchain}" >> "$GITHUB_ENV"
|
|
90
|
+
|
|
91
|
+
- name: Install Rust toolchain
|
|
92
|
+
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
|
|
93
|
+
with:
|
|
94
|
+
toolchain: ${{ env.RUST_TOOLCHAIN }}
|
|
95
|
+
|
|
96
|
+
- name: Install Rust target
|
|
97
|
+
shell: bash
|
|
98
|
+
run: |
|
|
99
|
+
rustup target add ${{ matrix.build.TARGET }} --toolchain ${{ env.RUST_TOOLCHAIN }}
|
|
100
|
+
rustup target list --installed
|
|
101
|
+
|
|
102
|
+
- name: Setup Rust cache
|
|
103
|
+
uses: Swatinem/rust-cache@v2
|
|
104
|
+
with:
|
|
105
|
+
key: npm-${{ matrix.build.TARGET }}
|
|
106
|
+
|
|
107
|
+
- name: Build binary
|
|
108
|
+
shell: bash
|
|
109
|
+
run: cargo build --locked --release --target ${{ matrix.build.TARGET }}
|
|
110
|
+
|
|
111
|
+
- name: Install Node
|
|
112
|
+
uses: actions/setup-node@v6
|
|
113
|
+
with:
|
|
114
|
+
node-version-file: .nvmrc
|
|
115
|
+
registry-url: "https://registry.npmjs.org"
|
|
116
|
+
|
|
117
|
+
- name: Publish platform package to NPM
|
|
118
|
+
shell: bash
|
|
119
|
+
run: |
|
|
120
|
+
cd npm
|
|
121
|
+
|
|
122
|
+
# Binary name from Cargo.toml
|
|
123
|
+
cargo_bin="onde"
|
|
124
|
+
|
|
125
|
+
# Prefix used for optional dependency package names
|
|
126
|
+
node_pkg_prefix="cli"
|
|
127
|
+
|
|
128
|
+
# Derive OS and architecture from the build matrix name
|
|
129
|
+
# Matrix name format: <os>-<arch>[-<extra>]
|
|
130
|
+
node_os=$(echo "${{ matrix.build.NAME }}" | cut -d '-' -f1)
|
|
131
|
+
export node_os
|
|
132
|
+
node_arch=$(echo "${{ matrix.build.NAME }}" | cut -d '-' -f2)
|
|
133
|
+
export node_arch
|
|
134
|
+
|
|
135
|
+
# Set the version
|
|
136
|
+
export node_version="${{ env.RELEASE_VERSION }}"
|
|
137
|
+
|
|
138
|
+
# Build the platform package name; normalise win32 → windows
|
|
139
|
+
if [ "${{ matrix.build.OS }}" = "windows-2022" ]; then
|
|
140
|
+
export node_pkg="${node_pkg_prefix}-windows-${node_arch}"
|
|
141
|
+
else
|
|
142
|
+
export node_pkg="${node_pkg_prefix}-${node_os}-${node_arch}"
|
|
143
|
+
fi
|
|
144
|
+
|
|
145
|
+
# Create the package directory
|
|
146
|
+
mkdir -p "${node_pkg}/bin"
|
|
147
|
+
|
|
148
|
+
# Generate package.json + README for this platform slice
|
|
149
|
+
node ./scripts/render-platform-package.cjs \
|
|
150
|
+
"${node_pkg}" \
|
|
151
|
+
"${node_version}" \
|
|
152
|
+
"${node_os}" \
|
|
153
|
+
"${node_arch}"
|
|
154
|
+
|
|
155
|
+
# Windows binaries carry a .exe extension
|
|
156
|
+
if [ "${{ matrix.build.OS }}" = "windows-2022" ]; then
|
|
157
|
+
cargo_bin="${cargo_bin}.exe"
|
|
158
|
+
fi
|
|
159
|
+
|
|
160
|
+
cp "../target/${{ matrix.build.TARGET }}/release/${cargo_bin}" "${node_pkg}/bin"
|
|
161
|
+
|
|
162
|
+
cd "${node_pkg}"
|
|
163
|
+
|
|
164
|
+
npm_package_name="@ondeinference/${node_pkg}"
|
|
165
|
+
if npm view "${npm_package_name}@${node_version}" version >/dev/null 2>&1; then
|
|
166
|
+
echo "${npm_package_name}@${node_version} already exists on npm, skipping publish"
|
|
167
|
+
exit 0
|
|
168
|
+
fi
|
|
169
|
+
|
|
170
|
+
npm publish --access public --provenance
|
|
171
|
+
|
|
172
|
+
publish-npm-base:
|
|
173
|
+
name: Publish base NPM package (@ondeinference/cli)
|
|
174
|
+
needs: publish-npm-binaries
|
|
175
|
+
runs-on: ubuntu-latest
|
|
176
|
+
|
|
177
|
+
steps:
|
|
178
|
+
- name: Checkout
|
|
179
|
+
uses: actions/checkout@v6
|
|
180
|
+
with:
|
|
181
|
+
ref: ${{ github.event.inputs.tag || github.ref }}
|
|
182
|
+
|
|
183
|
+
- name: Set the release version
|
|
184
|
+
shell: bash
|
|
185
|
+
run: |
|
|
186
|
+
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
|
|
187
|
+
release_version="${GITHUB_REF_NAME#v}"
|
|
188
|
+
else
|
|
189
|
+
release_version="${{ github.event.inputs.tag }}"
|
|
190
|
+
release_version="${release_version#v}"
|
|
191
|
+
fi
|
|
192
|
+
echo "RELEASE_VERSION=${release_version}" >> "$GITHUB_ENV"
|
|
193
|
+
|
|
194
|
+
- name: Install Node
|
|
195
|
+
uses: actions/setup-node@v6
|
|
196
|
+
with:
|
|
197
|
+
node-version-file: .nvmrc
|
|
198
|
+
registry-url: "https://registry.npmjs.org"
|
|
199
|
+
|
|
200
|
+
- name: Publish base package to NPM
|
|
201
|
+
shell: bash
|
|
202
|
+
run: |
|
|
203
|
+
cd npm/onde-cli
|
|
204
|
+
|
|
205
|
+
# Rewrite package.json with the correct release version and
|
|
206
|
+
# matching optionalDependency versions
|
|
207
|
+
node ../scripts/render-main-package.cjs \
|
|
208
|
+
"./package.json" \
|
|
209
|
+
"${{ env.RELEASE_VERSION }}"
|
|
210
|
+
|
|
211
|
+
npm_package_name="@ondeinference/cli"
|
|
212
|
+
npm_package_version="${{ env.RELEASE_VERSION }}"
|
|
213
|
+
|
|
214
|
+
if npm view "${npm_package_name}@${npm_package_version}" version >/dev/null 2>&1; then
|
|
215
|
+
echo "${npm_package_name}@${npm_package_version} already exists on npm, skipping publish"
|
|
216
|
+
exit 0
|
|
217
|
+
fi
|
|
218
|
+
|
|
219
|
+
npm install
|
|
220
|
+
npm run build
|
|
221
|
+
npm publish --access public --provenance
|
|
@@ -20,6 +20,7 @@ env:
|
|
|
20
20
|
ONDE_APP_SECRET: ${{ secrets.ONDE_APP_SECRET }}
|
|
21
21
|
GRESIQ_API_KEY: ${{ secrets.GRESIQ_API_KEY }}
|
|
22
22
|
GRESIQ_API_SECRET: ${{ secrets.GRESIQ_API_SECRET }}
|
|
23
|
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
|
23
24
|
|
|
24
25
|
jobs:
|
|
25
26
|
build-wheels:
|
|
@@ -103,7 +104,7 @@ jobs:
|
|
|
103
104
|
working-directory: pypi
|
|
104
105
|
args: --release --locked --compatibility pypi --out dist
|
|
105
106
|
before-script-linux: yum install -y perl-core
|
|
106
|
-
docker-options: -e ONDE_APP_ID -e ONDE_APP_SECRET -e GRESIQ_API_KEY -e GRESIQ_API_SECRET
|
|
107
|
+
docker-options: -e ONDE_APP_ID -e ONDE_APP_SECRET -e GRESIQ_API_KEY -e GRESIQ_API_SECRET -e HF_TOKEN
|
|
107
108
|
|
|
108
109
|
- name: Upload wheel artifact
|
|
109
110
|
uses: actions/upload-artifact@v4
|
onde_cli-0.2.1/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
20
|
|
@@ -2067,7 +2067,7 @@ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
|
|
|
2067
2067
|
|
|
2068
2068
|
[[package]]
|
|
2069
2069
|
name = "onde-cli"
|
|
2070
|
-
version = "0.2.
|
|
2070
|
+
version = "0.2.1"
|
|
2071
2071
|
dependencies = [
|
|
2072
2072
|
"anyhow",
|
|
2073
2073
|
"candle-core",
|
|
@@ -2076,12 +2076,14 @@ dependencies = [
|
|
|
2076
2076
|
"dirs",
|
|
2077
2077
|
"dotenvy",
|
|
2078
2078
|
"futures",
|
|
2079
|
+
"half",
|
|
2079
2080
|
"libc",
|
|
2080
2081
|
"log",
|
|
2081
2082
|
"ratatui",
|
|
2082
2083
|
"reqwest",
|
|
2083
2084
|
"serde",
|
|
2084
2085
|
"serde_json",
|
|
2086
|
+
"sha2",
|
|
2085
2087
|
"smbcloud-auth-sdk",
|
|
2086
2088
|
"smbcloud-gresiq-sdk",
|
|
2087
2089
|
"smbcloud-model",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "onde-cli"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
description = "Terminal UI for signing up, signing in, and managing your Onde Inference account."
|
|
6
6
|
license = "MIT OR Apache-2.0"
|
|
@@ -38,6 +38,8 @@ candle-nn = "0.10.2"
|
|
|
38
38
|
tokenizers = { version = "0.20", default-features = false, features = ["onig"] }
|
|
39
39
|
serde = { version = "1", features = ["derive"] }
|
|
40
40
|
serde_json = "1"
|
|
41
|
+
half = "2"
|
|
42
|
+
sha2 = "0.10"
|
|
41
43
|
|
|
42
44
|
# Metal and Accelerate are macOS-only frameworks; Cargo merges features so on
|
|
43
45
|
# macOS these are added on top of the base candle-core dep above.
|
|
@@ -3,24 +3,20 @@ fn main() {
|
|
|
3
3
|
// as environment variables, so this is a no-op there.
|
|
4
4
|
let _ = dotenvy::dotenv();
|
|
5
5
|
|
|
6
|
+
// Required variables — build fails if missing.
|
|
6
7
|
for var in [
|
|
7
8
|
"ONDE_APP_ID",
|
|
8
9
|
"ONDE_APP_SECRET",
|
|
9
10
|
"GRESIQ_API_KEY",
|
|
10
11
|
"GRESIQ_API_SECRET",
|
|
11
12
|
] {
|
|
12
|
-
// Re-run the build script if any of these change.
|
|
13
13
|
println!("cargo:rerun-if-env-changed={var}");
|
|
14
14
|
|
|
15
15
|
match std::env::var(var) {
|
|
16
16
|
Ok(val) => {
|
|
17
|
-
// Forward the value to the compilation unit so env!() resolves.
|
|
18
17
|
println!("cargo:rustc-env={var}={val}");
|
|
19
18
|
}
|
|
20
19
|
Err(_) => {
|
|
21
|
-
// Fail the build loudly rather than silently baking in an
|
|
22
|
-
// empty string. Add the missing variable to .env (local) or
|
|
23
|
-
// to the CI environment (GitHub Actions secrets).
|
|
24
20
|
eprintln!("error: required build variable `{var}` is not set.");
|
|
25
21
|
eprintln!(" → Add it to .env for local builds.");
|
|
26
22
|
eprintln!(" → Add it as a GitHub Actions secret for CI builds.");
|
|
@@ -29,6 +25,21 @@ fn main() {
|
|
|
29
25
|
}
|
|
30
26
|
}
|
|
31
27
|
|
|
28
|
+
// Optional variables — baked in when present, empty string when absent.
|
|
29
|
+
{
|
|
30
|
+
let var = "HF_TOKEN";
|
|
31
|
+
println!("cargo:rerun-if-env-changed={var}");
|
|
32
|
+
match std::env::var(var) {
|
|
33
|
+
Ok(val) => {
|
|
34
|
+
println!("cargo:rustc-env={var}={val}");
|
|
35
|
+
}
|
|
36
|
+
Err(_) => {
|
|
37
|
+
// Forward an empty value so env!() still compiles.
|
|
38
|
+
println!("cargo:rustc-env={var}=");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
32
43
|
// Rebuild whenever .env itself changes.
|
|
33
44
|
println!("cargo:rerun-if-changed=.env");
|
|
34
45
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://avatars.githubusercontent.com/u/218425892?s=200&v=4" alt="Onde Inference" width="96">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">Onde CLI</h1>
|
|
6
|
+
|
|
7
|
+
## `${node_pkg}`
|
|
8
|
+
|
|
9
|
+
This is a platform-specific binary for [`@ondeinference/cli`](https://www.npmjs.com/package/@ondeinference/cli). You don't need to install it directly.
|
|
10
|
+
|
|
11
|
+
Install the main package instead:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install -g @ondeinference/cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
npm pulls in the right binary for your OS and architecture.
|
|
18
|
+
|
|
19
|
+
## Links
|
|
20
|
+
|
|
21
|
+
- [Source code](https://github.com/ondeinference/onde-cli)
|
|
22
|
+
- [Issues](https://github.com/ondeinference/onde-cli/issues)
|
|
23
|
+
- [Website](https://ondeinference.com)
|
|
24
|
+
|
|
25
|
+
## License
|
|
26
|
+
|
|
27
|
+
[MIT OR Apache-2.0](https://github.com/ondeinference/onde-cli/blob/main/LICENSE)
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/ondeinference/onde/main/assets/onde-inference-logo.svg" alt="Onde Inference" width="80">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">@ondeinference/cli</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
Manage your Onde Inference account from the terminal.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/@ondeinference/cli"><img src="https://img.shields.io/npm/v/@ondeinference/cli?style=flat-square&labelColor=17211D&color=235843" alt="npm"></a>
|
|
13
|
+
<a href="https://crates.io/crates/onde-cli"><img src="https://img.shields.io/crates/v/onde-cli?style=flat-square&labelColor=17211D&color=235843" alt="crates.io"></a>
|
|
14
|
+
<a href="https://pypi.org/project/onde-cli/"><img src="https://img.shields.io/pypi/v/onde-cli?style=flat-square&labelColor=17211D&color=235843" alt="PyPI"></a>
|
|
15
|
+
<a href="https://ondeinference.com"><img src="https://img.shields.io/badge/ondeinference.com-235843?style=flat-square&labelColor=17211D" alt="Website"></a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm install -g @ondeinference/cli
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The right binary for your platform gets pulled in automatically. Works on macOS (Apple Silicon and Intel), Linux (x64 and arm64), and Windows (x64 and arm64).
|
|
27
|
+
|
|
28
|
+
### Other ways to install
|
|
29
|
+
|
|
30
|
+
| Method | Command |
|
|
31
|
+
|---|---|
|
|
32
|
+
| **Homebrew** | `brew install ondeinference/homebrew-tap/onde` |
|
|
33
|
+
| **pip** | `pip install onde-cli` |
|
|
34
|
+
| **uv** | `uv tool install onde-cli` |
|
|
35
|
+
| **Cargo** | `cargo install onde-cli` |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
onde
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Opens a TUI. Sign up or sign in from there, no browser needed.
|
|
46
|
+
|
|
47
|
+
| Key | What it does |
|
|
48
|
+
|---|---|
|
|
49
|
+
| `Tab` | Move between fields |
|
|
50
|
+
| `Enter` | Submit / sign out |
|
|
51
|
+
| `Ctrl+L` | Sign in screen |
|
|
52
|
+
| `Ctrl+N` | New account screen |
|
|
53
|
+
| `Ctrl+C` | Quit |
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## What's Onde?
|
|
58
|
+
|
|
59
|
+
[Onde Inference](https://ondeinference.com) runs LLMs on the user's device. No server round-trips, no data leaving the hardware. It ships as a native SDK for each platform:
|
|
60
|
+
|
|
61
|
+
<p align="center">
|
|
62
|
+
<a href="https://github.com/ondeinference/onde-swift">Swift</a> · <a href="https://pub.dev/packages/onde_inference">Flutter</a> · <a href="https://www.npmjs.com/package/@ondeinference/react-native">React Native</a> · <a href="https://crates.io/crates/onde">Rust</a>
|
|
63
|
+
</p>
|
|
64
|
+
|
|
65
|
+
This CLI handles the account side of things. The SDKs handle inference.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Debug
|
|
70
|
+
|
|
71
|
+
Logs go to `~/.cache/onde/debug.log`.
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
Dual-licensed under [MIT](https://github.com/ondeinference/onde-cli/blob/main/LICENSE-MIT) and [Apache 2.0](https://github.com/ondeinference/onde-cli/blob/main/LICENSE-APACHE).
|
|
76
|
+
|
|
77
|
+
<p align="center">
|
|
78
|
+
<sub>© 2026 <a href="https://ondeinference.com">Onde Inference</a> · <a href="https://apps.apple.com/se/developer/splitfire-ab/id1831430993">Splitfire AB</a></sub>
|
|
79
|
+
</p>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ondeinference/cli",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"lockfileVersion": 3,
|
|
5
|
+
"requires": true,
|
|
6
|
+
"packages": {
|
|
7
|
+
"": {
|
|
8
|
+
"name": "@ondeinference/cli",
|
|
9
|
+
"version": "0.2.0",
|
|
10
|
+
"license": "MIT OR Apache-2.0",
|
|
11
|
+
"bin": {
|
|
12
|
+
"onde": "lib/index.js"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@types/node": "^18.15.11",
|
|
16
|
+
"typescript": "^5.0.0"
|
|
17
|
+
},
|
|
18
|
+
"optionalDependencies": {
|
|
19
|
+
"@ondeinference/cli-darwin-arm64": "0.2.0",
|
|
20
|
+
"@ondeinference/cli-darwin-x64": "0.2.0",
|
|
21
|
+
"@ondeinference/cli-linux-arm64": "0.2.0",
|
|
22
|
+
"@ondeinference/cli-linux-x64": "0.2.0",
|
|
23
|
+
"@ondeinference/cli-windows-arm64": "0.2.0",
|
|
24
|
+
"@ondeinference/cli-windows-x64": "0.2.0"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"node_modules/@ondeinference/cli-darwin-arm64": {
|
|
28
|
+
"optional": true
|
|
29
|
+
},
|
|
30
|
+
"node_modules/@ondeinference/cli-darwin-x64": {
|
|
31
|
+
"optional": true
|
|
32
|
+
},
|
|
33
|
+
"node_modules/@ondeinference/cli-linux-arm64": {
|
|
34
|
+
"optional": true
|
|
35
|
+
},
|
|
36
|
+
"node_modules/@ondeinference/cli-linux-x64": {
|
|
37
|
+
"optional": true
|
|
38
|
+
},
|
|
39
|
+
"node_modules/@ondeinference/cli-windows-arm64": {
|
|
40
|
+
"optional": true
|
|
41
|
+
},
|
|
42
|
+
"node_modules/@ondeinference/cli-windows-x64": {
|
|
43
|
+
"optional": true
|
|
44
|
+
},
|
|
45
|
+
"node_modules/@types/node": {
|
|
46
|
+
"version": "18.19.130",
|
|
47
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz",
|
|
48
|
+
"integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==",
|
|
49
|
+
"dev": true,
|
|
50
|
+
"license": "MIT",
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"undici-types": "~5.26.4"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"node_modules/typescript": {
|
|
56
|
+
"version": "5.9.3",
|
|
57
|
+
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
|
58
|
+
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
|
59
|
+
"dev": true,
|
|
60
|
+
"license": "Apache-2.0",
|
|
61
|
+
"bin": {
|
|
62
|
+
"tsc": "bin/tsc",
|
|
63
|
+
"tsserver": "bin/tsserver"
|
|
64
|
+
},
|
|
65
|
+
"engines": {
|
|
66
|
+
"node": ">=14.17"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"node_modules/undici-types": {
|
|
70
|
+
"version": "5.26.5",
|
|
71
|
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
|
72
|
+
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
|
73
|
+
"dev": true,
|
|
74
|
+
"license": "MIT"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ondeinference/cli",
|
|
3
|
+
"version": "0.0.0-dev",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"onde",
|
|
6
|
+
"cli",
|
|
7
|
+
"onde-cli",
|
|
8
|
+
"inference",
|
|
9
|
+
"llm",
|
|
10
|
+
"ai",
|
|
11
|
+
"on-device",
|
|
12
|
+
"developer",
|
|
13
|
+
"tools"
|
|
14
|
+
],
|
|
15
|
+
"bin": {
|
|
16
|
+
"onde": "lib/index.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"lib",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"description": "A CLI for managing your Onde Inference account and models.",
|
|
23
|
+
"license": "MIT OR Apache-2.0",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/ondeinference/onde-cli.git"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"typecheck": "tsc --noEmit",
|
|
30
|
+
"build": "tsc",
|
|
31
|
+
"dev": "npm run build && node lib/index.js"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^18.15.11",
|
|
35
|
+
"typescript": "^5.0.0"
|
|
36
|
+
},
|
|
37
|
+
"optionalDependencies": {
|
|
38
|
+
"@ondeinference/cli-darwin-arm64": "0.0.0-dev",
|
|
39
|
+
"@ondeinference/cli-darwin-x64": "0.0.0-dev",
|
|
40
|
+
"@ondeinference/cli-linux-arm64": "0.0.0-dev",
|
|
41
|
+
"@ondeinference/cli-linux-x64": "0.0.0-dev",
|
|
42
|
+
"@ondeinference/cli-windows-arm64": "0.0.0-dev",
|
|
43
|
+
"@ondeinference/cli-windows-x64": "0.0.0-dev"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawnSync } from "child_process";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns the executable path which is located inside node_modules
|
|
7
|
+
* The naming convention is cli-OS-ARCH
|
|
8
|
+
* If the platform is win32 or cygwin, executable will include a .exe extension.
|
|
9
|
+
* @see https://nodejs.org/api/os.html#osarch
|
|
10
|
+
* @see https://nodejs.org/api/os.html#osplatform
|
|
11
|
+
* @example "x/xx/node_modules/cli-darwin-arm64"
|
|
12
|
+
*/
|
|
13
|
+
function getExePath() {
|
|
14
|
+
const arch = process.arch;
|
|
15
|
+
let os = process.platform as string;
|
|
16
|
+
let extension = "";
|
|
17
|
+
if (["win32", "cygwin"].includes(process.platform)) {
|
|
18
|
+
os = "windows";
|
|
19
|
+
extension = ".exe";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
// Since the binary will be located inside node_modules, we can simply call require.resolve
|
|
24
|
+
return require.resolve(`@ondeinference/cli-${os}-${arch}/bin/onde${extension}`);
|
|
25
|
+
} catch (e) {
|
|
26
|
+
throw new Error(
|
|
27
|
+
`Couldn't find application binary inside node_modules for ${os}-${arch}`
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Runs the application with args using nodejs spawn
|
|
34
|
+
*/
|
|
35
|
+
function run() {
|
|
36
|
+
const args = process.argv.slice(2);
|
|
37
|
+
const processResult = spawnSync(getExePath(), args, { stdio: "inherit" });
|
|
38
|
+
process.exit(processResult.status ?? 0);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
run();
|