Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit f251553

Browse files
committed
Merge branch 'dev' into feat/linux-bash-install-script
2 parents 63ebf76 + 6892823 commit f251553

File tree

7 files changed

+433
-55
lines changed

7 files changed

+433
-55
lines changed

.github/ISSUE_TEMPLATE/epic-request.md

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,56 @@ labels: 'type: epic'
66
assignees: ''
77

88
---
9+
## Goal
910

10-
**Problem**
1111

12+
## Success Criteria
1213

13-
**Success Criteria**
14-
-
1514

16-
**Tasklist**
15+
## Tasklist
1716
- [ ]
17+
18+
## API / CLI Documentation
19+
### API
20+
#### 1. Feature
21+
```
22+
GET /v1/endpoint
23+
```
24+
25+
Body:
26+
```json
27+
{
28+
"key": "value"
29+
}
30+
```
31+
**Response**
32+
```json
33+
200
34+
{
35+
}
36+
Error
37+
{
38+
}
39+
```
40+
41+
### CLI
42+
#### 1. Feature
43+
```
44+
GET /v1/endpoint
45+
```
46+
Response:
47+
```
48+
```
49+
#### Help Command
50+
```
51+
❯ cortex ...
52+
Usage:
53+
cortex [options] [subcommand]
54+
Options:
55+
-h,--help Print this help message and exit
56+
... ...
57+
58+
Subcommands:
59+
start Start a model by ID
60+
... ...
61+
```

README.md

Lines changed: 66 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@
2626
Cortex is a Local AI API Platform that is used to run and customize LLMs.
2727

2828
Key Features:
29-
- Straightforward CLI (inspired by Ollama)
30-
- Full C++ implementation, packageable into Desktop and Mobile apps
3129
- Pull from Huggingface, or Cortex Built-in Models
3230
- Models stored in universal file formats (vs blobs)
3331
- Swappable Engines (default: [`llamacpp`](https://github.com/janhq/cortex.llamacpp), future: [`ONNXRuntime`](https://github.com/janhq/cortex.onnx), [`TensorRT-LLM`](https://github.com/janhq/cortex.tensorrt-llm))
3432
- Cortex can be deployed as a standalone API server, or integrated into apps like [Jan.ai](https://jan.ai/)
3533

36-
Cortex's roadmap is to implement the full OpenAI API including Tools, Runs, Multi-modal and Realtime APIs.
34+
Coming soon; now available on [cortex-nightly](#beta--nightly-versions):
35+
- Engines Management (install specific llama-cpp version and variants)
36+
- Nvidia Hardware detection & activation (current: Nvidia, future: AMD, Intel, Qualcomm)
37+
- Cortex's roadmap is to implement the full OpenAI API including Tools, Runs, Multi-modal and Realtime APIs.
3738

3839
## Local Installation
3940

@@ -44,19 +45,24 @@ Cortex also has a [Network Installer](#network-installer) which downloads the ne
4445
<h4>
4546
<img src='https://github.com/janhq/docs/blob/main/static/img/windows.png' style="height:15px; width: 15px" />
4647
Windows:
47-
<a href='https://app.cortexcpp.com/download/latest/windows-amd64-local'><b>cortex-windows-local-installer.exe</b></a>
48+
<a href='https://app.cortexcpp.com/download/latest/windows-amd64-local'><b>cortex.exe</b></a>
4849
</h4>
4950

5051
<h4>
5152
<img src='https://github.com/janhq/docs/blob/main/static/img/mac.png' style="height:15px; width: 15px" />
5253
MacOS (Silicon/Intel):
53-
<a href='https://app.cortexcpp.com/download/latest/mac-universal-local'><b>cortex-mac-local-installer.pkg</b></a>
54+
<a href='https://app.cortexcpp.com/download/latest/mac-universal-local'><b>cortex.pkg</b></a>
5455
</h4>
5556

5657
<h4>
5758
<img src='https://github.com/janhq/docs/blob/main/static/img/linux.png' style="height:15px; width: 15px" />
59+
<<<<<<< HEAD
5860
Linux debian based distros:
5961
<a href='https://app.cortexcpp.com/download/latest/linux-amd64-local'><b>cortex-linux-local-installer.deb</b></a>
62+
=======
63+
Linux:
64+
<a href='https://app.cortexcpp.com/download/latest/linux-amd64-local'><b>cortex.deb</b></a> (Coming soon: Linux installation script)
65+
>>>>>>> dev
6066
</h4>
6167
6268
- For Linux: Download the installer and run the following command in terminal:
@@ -78,12 +84,21 @@ Cortex also has a [Network Installer](#network-installer) which downloads the ne
7884
After installation, you can run Cortex.cpp from the command line by typing `cortex --help`.
7985

8086
```
87+
# Run a Model
8188
cortex pull llama3.2
8289
cortex pull bartowski/Meta-Llama-3.1-8B-Instruct-GGUF
83-
cortex run llama3.2
84-
cortex models ps
85-
cortex models stop llama3.2
86-
cortex stop
90+
cortex run llama3.2
91+
92+
# Resource Management
93+
cortex ps (view active models & RAM/VRAM used)
94+
cortex models stop llama3.2
95+
96+
# Available on cortex-nightly:
97+
cortex engines install llama-cpp -m (lists versions and variants)
98+
cortex hardware list (hardware detection)
99+
cortex hardware activate
100+
101+
cortex stop
87102
```
88103

89104
Refer to our [Quickstart](https://cortex.so/docs/quickstart/) and
@@ -96,9 +111,7 @@ Refer to our [API documentation](https://cortex.so/api-reference) for more detai
96111

97112
## Models
98113

99-
Cortex.cpp allows users to pull models from multiple Model Hubs, offering flexibility and extensive model access.
100-
101-
Currently Cortex supports pulling from:
114+
Cortex.cpp allows users to pull models from multiple Model Hubs, offering flexibility and extensive model access:
102115
- [Hugging Face](https://huggingface.co): GGUF models eg `author/Model-GGUF`
103116
- Cortex Built-in Models
104117

@@ -168,18 +181,14 @@ Cortex.cpp is available with a Network Installer, which is a smaller installer b
168181
<a href='https://app.cortexcpp.com/download/latest/linux-amd64-network'><b>cortex-linux-network-installer.deb</b></a>
169182
</h4>
170183

184+
### Beta & Nightly Versions (Local Installer)
171185

172-
### Beta & Nightly Versions
173-
174-
Cortex releases 2 preview versions for advanced users to try new features early (we appreciate your feedback!)
175-
- Beta (early preview)
176-
- CLI command: `cortex-beta`
177-
- Nightly (released every night)
178-
- CLI Command: `cortex-nightly`
186+
Cortex releases Beta and Nightly versions for advanced users to try new features (we appreciate your feedback!)
187+
- Beta (early preview): CLI command: `cortex-beta`
188+
- Nightly (released every night): CLI Command: `cortex-nightly`
179189
- Nightly automatically pulls the latest changes from upstream [llama.cpp](https://github.com/ggerganov/llama.cpp/) repo, creates a PR and runs tests.
180190
- If all test pass, the PR is automatically merged into our repo, with the latest llama.cpp version.
181191

182-
#### Local Installer (Default)
183192
<table>
184193
<tr style="text-align:center">
185194
<td style="text-align:center"><b>Version</b></td>
@@ -192,19 +201,19 @@ Cortex releases 2 preview versions for advanced users to try new features early
192201
<td style="text-align:center">
193202
<a href='https://app.cortexcpp.com/download/beta/windows-amd64-local'>
194203
<img src='https://github.com/janhq/docs/blob/main/static/img/windows.png' style="height:14px; width: 14px" />
195-
cortex-beta-windows-local-installer.exe
204+
cortex.exe
196205
</a>
197206
</td>
198207
<td style="text-align:center">
199208
<a href='https://app.cortexcpp.com/download/beta/mac-universal-local'>
200209
<img src='https://github.com/janhq/docs/blob/main/static/img/mac.png' style="height:15px; width: 15px" />
201-
cortex-beta-mac-local-installer.pkg
210+
cortex.pkg
202211
</a>
203212
</td>
204213
<td style="text-align:center">
205214
<a href='https://app.cortexcpp.com/download/beta/linux-amd64-local'>
206215
<img src='https://github.com/janhq/docs/blob/main/static/img/linux.png' style="height:14px; width: 14px" />
207-
cortex-beta-linux-local-installer.deb
216+
cortex.deb
208217
</a>
209218
</td>
210219
</tr>
@@ -213,25 +222,27 @@ Cortex releases 2 preview versions for advanced users to try new features early
213222
<td style="text-align:center">
214223
<a href='https://app.cortexcpp.com/download/nightly/windows-amd64-local'>
215224
<img src='https://github.com/janhq/docs/blob/main/static/img/windows.png' style="height:14px; width: 14px" />
216-
cortex-nightly-windows-local-installer.exe
225+
cortex.exe
217226
</a>
218227
</td>
219228
<td style="text-align:center">
220229
<a href='https://app.cortexcpp.com/download/nightly/mac-universal-local'>
221230
<img src='https://github.com/janhq/docs/blob/main/static/img/mac.png' style="height:15px; width: 15px" />
222-
cortex-nightly-mac-local-installer.pkg
231+
cortex.pkg
223232
</a>
224233
</td>
225234
<td style="text-align:center">
226235
<a href='https://app.cortexcpp.com/download/nightly/linux-amd64-local'>
227236
<img src='https://github.com/janhq/docs/blob/main/static/img/linux.png' style="height:14px; width: 14px" />
228-
cortex-nightly-linux-local-installer.deb
237+
cortex.deb
229238
</a>
230239
</td>
231240
</tr>
232241
</table>
233242

234-
#### Network Installer
243+
### Network Installer
244+
245+
Cortex.cpp is available with a Network Installer, which is a smaller installer but requires internet connection during installation to download the necessary dependencies.
235246

236247
<table>
237248
<tr style="text-align:center">
@@ -240,24 +251,45 @@ Cortex releases 2 preview versions for advanced users to try new features early
240251
<td style="text-align:center"><b>MacOS</b></td>
241252
<td style="text-align:center"><b>Linux debian based distros</b></td>
242253
</tr>
254+
<tr style="text-align:center">
255+
<td style="text-align:center"><b>Stable (Recommended)</b></td>
256+
<td style="text-align:center">
257+
<a href='https://app.cortexcpp.com/download/latest/windows-amd64-network'>
258+
<img src='https://github.com/janhq/docs/blob/main/static/img/windows.png' style="height:15px; width: 15px" />
259+
cortex.exe
260+
</a>
261+
</td>
262+
<td style="text-align:center">
263+
<a href='https://app.cortexcpp.com/download/latest/mac-universal-network'>
264+
<img src='https://github.com/janhq/docs/blob/main/static/img/mac.png' style="height:15px; width: 15px" />
265+
cortex.pkg
266+
</a>
267+
</td>
268+
<td style="text-align:center">
269+
<a href='https://app.cortexcpp.com/download/latest/linux-amd64-network'>
270+
<img src='https://github.com/janhq/docs/blob/main/static/img/linux.png' style="height:15px; width: 15px" />
271+
cortex.deb
272+
</a>
273+
</td>
274+
</tr>
243275
<tr style="text-align:center">
244276
<td style="text-align:center"><b>Beta (Preview)</b></td>
245277
<td style="text-align:center">
246278
<a href='https://app.cortexcpp.com/download/beta/windows-amd64-network'>
247-
<img src='https://github.com/janhq/docs/blob/main/static/img/windows.png' style="height:14px; width: 14px" />
248-
cortex-beta-windows-network-installer.exe
279+
<img src='https://github.com/janhq/docs/blob/main/static/img/windows.png' style="height:15px; width: 15px" />
280+
cortex.exe
249281
</a>
250282
</td>
251283
<td style="text-align:center">
252284
<a href='https://app.cortexcpp.com/download/beta/mac-universal-network'>
253285
<img src='https://github.com/janhq/docs/blob/main/static/img/mac.png' style="height:15px; width: 15px" />
254-
cortex-beta-mac-network-installer.pkg
286+
cortex.pkg
255287
</a>
256288
</td>
257289
<td style="text-align:center">
258290
<a href='https://app.cortexcpp.com/download/beta/linux-amd64-network'>
259291
<img src='https://github.com/janhq/docs/blob/main/static/img/linux.png' style="height:15px; width: 15px" />
260-
cortex-beta-linux-network-installer.deb
292+
cortex.deb
261293
</a>
262294
</td>
263295
</tr>
@@ -266,19 +298,19 @@ Cortex releases 2 preview versions for advanced users to try new features early
266298
<td style="text-align:center">
267299
<a href='https://app.cortexcpp.com/download/nightly/windows-amd64-network'>
268300
<img src='https://github.com/janhq/docs/blob/main/static/img/windows.png' style="height:15px; width: 15px" />
269-
cortex-nightly-windows-network-installer.exe
301+
cortex.exe
270302
</a>
271303
</td>
272304
<td style="text-align:center">
273305
<a href='https://app.cortexcpp.com/download/nightly/mac-universal-network'>
274306
<img src='https://github.com/janhq/docs/blob/main/static/img/mac.png' style="height:15px; width: 15px" />
275-
cortex-nightly-mac-network-installer.pkg
307+
cortex.pkg
276308
</a>
277309
</td>
278310
<td style="text-align:center">
279311
<a href='https://app.cortexcpp.com/download/nightly/linux-amd64-network'>
280312
<img src='https://github.com/janhq/docs/blob/main/static/img/linux.png' style="height:15px; width: 15px" />
281-
cortex-nightly-linux-network-installer.deb
313+
cortex.deb
282314
</a>
283315
</td>
284316
</tr>

docs/docs/cli/config.mdx

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: Cortex Config
3+
description: Cortex config command
4+
slug: "config"
5+
---
6+
7+
import Tabs from "@theme/Tabs";
8+
import TabItem from "@theme/TabItem";
9+
10+
# `cortex config`
11+
12+
This command allows you to update server configurations such as CORS and Allowed Headers.
13+
14+
## Usage
15+
:::info
16+
You can use the `--verbose` flag to display more detailed output of the internal processes. To apply this flag, use the following format: `cortex --verbose [subcommand]`.
17+
:::
18+
19+
<Tabs>
20+
<TabItem value="MacOs/Linux" label="MacOs/Linux">
21+
```sh
22+
cortex config [options] [subcommand]
23+
```
24+
</TabItem>
25+
<TabItem value="Windows" label="Windows">
26+
```sh
27+
cortex.exe config [options] [subcommand]
28+
```
29+
</TabItem>
30+
</Tabs>
31+
32+
**Options**:
33+
34+
| Option | Description | Required | Default value | Example |
35+
|------------------|-------------------------------------------|----------|----------------------|---------|
36+
| `--cors` | Toggle CORS | No | true | `on`, `off` |
37+
| `--allowed_origins`| Allowed origins for CORS | No | `http://localhost:39281`, `http://127.0.0.1:39281` | `http://localhost:3000` |
38+
| `-h`, `--help` | Display help information for the command. | No | - | `-h` |
39+
40+
---
41+
# Subcommands:
42+
43+
## `cortex config status`
44+
:::info
45+
This CLI command calls the following API endpoint:
46+
- [Get Configurations](/api-reference#tag/configurations/get/v1/configs)
47+
:::
48+
This command returns all server configurations.
49+
50+
**Usage**:
51+
<Tabs>
52+
<TabItem value="MacOs/Linux" label="MacOs/Linux">
53+
```sh
54+
cortex config status
55+
```
56+
</TabItem>
57+
<TabItem value="Windows" label="Windows">
58+
```sh
59+
cortex.exe config status
60+
61+
```
62+
</TabItem>
63+
</Tabs>
64+
65+
For example, it returns the following:
66+
67+
```
68+
+-------------------------------------------------------------------------------------+
69+
| Config name | Value |
70+
+-------------------------------------------------------------------------------------+
71+
| allowed_origins | http://localhost:39281 |
72+
+-------------------------------------------------------------------------------------+
73+
| allowed_origins | http://127.0.0.1:39281/ |
74+
+-------------------------------------------------------------------------------------+
75+
| cors | true |
76+
+-------------------------------------------------------------------------------------+
77+
78+
```

docs/docs/cli/start.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ You can use the `--verbose` flag to display more detailed output of the internal
3535
| ---------------------------- | ----------------------------------------- | -------- | ------------- | ----------------------------- |
3636
| `-h`, `--help` | Display help information for the command. | No | - | `-h` |
3737
| `-p`, `--port <port>` | Port to serve the application. | No | - | `-p 39281` |
38-
| `--loglevel <loglevel>` | Setup loglevel for cortex server, supported levels are TRACE, DEBUG, INFO, WARN, ERROR | No | - | `--loglevel DEBUG` |
38+
| `--loglevel <loglevel>` | Setup loglevel for cortex server, in the priority of `ERROR`, `WARN`, `INFO`, `DEBUG`, `TRACE` | No | - | `--loglevel INFO` will display ERROR, WARN and INFO logs|
3939

4040
<!-- | `-a`, `--address <address>` | Address to use. | No | - | `-a 192.168.1.1` | -->
4141
<!--| `--dataFolder <dataFolder>` | Set the data folder directory | No | - | `--dataFolder /path/to/data` | -->

0 commit comments

Comments
 (0)