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

Commit e2fc113

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

File tree

8 files changed

+433
-60
lines changed

8 files changed

+433
-60
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: 63 additions & 36 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,13 +45,13 @@ 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>
@@ -63,10 +64,10 @@ Cortex also has a [Network Installer](#network-installer) which downloads the ne
6364

6465
```bash
6566
# Linux debian based distros
66-
curl -s https://raw.githubusercontent.com/janhq/cortex/dev/engine/templates/linux/install.sh | sudo bash -s -- --deb_local
67+
curl -s https://raw.githubusercontent.com/janhq/cortex/main/engine/templates/linux/install.sh | sudo bash -s -- --deb_local
6768

6869
# Other Linux distros
69-
curl -s https://raw.githubusercontent.com/janhq/cortex/dev/engine/templates/linux/install.sh | sudo bash -s
70+
curl -s https://raw.githubusercontent.com/janhq/cortex/main/engine/templates/linux/install.sh | sudo bash -s
7071
```
7172

7273
- The binary will be installed in the `/usr/bin/` directory.
@@ -78,12 +79,21 @@ Cortex also has a [Network Installer](#network-installer) which downloads the ne
7879
After installation, you can run Cortex.cpp from the command line by typing `cortex --help`.
7980

8081
```
82+
# Run a Model
8183
cortex pull llama3.2
8284
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
85+
cortex run llama3.2
86+
87+
# Resource Management
88+
cortex ps (view active models & RAM/VRAM used)
89+
cortex models stop llama3.2
90+
91+
# Available on cortex-nightly:
92+
cortex engines install llama-cpp -m (lists versions and variants)
93+
cortex hardware list (hardware detection)
94+
cortex hardware activate
95+
96+
cortex stop
8797
```
8898

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

97107
## Models
98108

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:
109+
Cortex.cpp allows users to pull models from multiple Model Hubs, offering flexibility and extensive model access:
102110
- [Hugging Face](https://huggingface.co): GGUF models eg `author/Model-GGUF`
103111
- Cortex Built-in Models
104112

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

179+
### Beta & Nightly Versions (Local Installer)
171180

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`
181+
Cortex releases Beta and Nightly versions for advanced users to try new features (we appreciate your feedback!)
182+
- Beta (early preview): CLI command: `cortex-beta`
183+
- Nightly (released every night): CLI Command: `cortex-nightly`
179184
- Nightly automatically pulls the latest changes from upstream [llama.cpp](https://github.com/ggerganov/llama.cpp/) repo, creates a PR and runs tests.
180185
- If all test pass, the PR is automatically merged into our repo, with the latest llama.cpp version.
181186

182-
#### Local Installer (Default)
183187
<table>
184188
<tr style="text-align:center">
185189
<td style="text-align:center"><b>Version</b></td>
@@ -192,19 +196,19 @@ Cortex releases 2 preview versions for advanced users to try new features early
192196
<td style="text-align:center">
193197
<a href='https://app.cortexcpp.com/download/beta/windows-amd64-local'>
194198
<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
199+
cortex.exe
196200
</a>
197201
</td>
198202
<td style="text-align:center">
199203
<a href='https://app.cortexcpp.com/download/beta/mac-universal-local'>
200204
<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
205+
cortex.pkg
202206
</a>
203207
</td>
204208
<td style="text-align:center">
205209
<a href='https://app.cortexcpp.com/download/beta/linux-amd64-local'>
206210
<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
211+
cortex.deb
208212
</a>
209213
</td>
210214
</tr>
@@ -213,25 +217,27 @@ Cortex releases 2 preview versions for advanced users to try new features early
213217
<td style="text-align:center">
214218
<a href='https://app.cortexcpp.com/download/nightly/windows-amd64-local'>
215219
<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
220+
cortex.exe
217221
</a>
218222
</td>
219223
<td style="text-align:center">
220224
<a href='https://app.cortexcpp.com/download/nightly/mac-universal-local'>
221225
<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
226+
cortex.pkg
223227
</a>
224228
</td>
225229
<td style="text-align:center">
226230
<a href='https://app.cortexcpp.com/download/nightly/linux-amd64-local'>
227231
<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
232+
cortex.deb
229233
</a>
230234
</td>
231235
</tr>
232236
</table>
233237

234-
#### Network Installer
238+
### Network Installer
239+
240+
Cortex.cpp is available with a Network Installer, which is a smaller installer but requires internet connection during installation to download the necessary dependencies.
235241

236242
<table>
237243
<tr style="text-align:center">
@@ -240,24 +246,45 @@ Cortex releases 2 preview versions for advanced users to try new features early
240246
<td style="text-align:center"><b>MacOS</b></td>
241247
<td style="text-align:center"><b>Linux debian based distros</b></td>
242248
</tr>
249+
<tr style="text-align:center">
250+
<td style="text-align:center"><b>Stable (Recommended)</b></td>
251+
<td style="text-align:center">
252+
<a href='https://app.cortexcpp.com/download/latest/windows-amd64-network'>
253+
<img src='https://github.com/janhq/docs/blob/main/static/img/windows.png' style="height:15px; width: 15px" />
254+
cortex.exe
255+
</a>
256+
</td>
257+
<td style="text-align:center">
258+
<a href='https://app.cortexcpp.com/download/latest/mac-universal-network'>
259+
<img src='https://github.com/janhq/docs/blob/main/static/img/mac.png' style="height:15px; width: 15px" />
260+
cortex.pkg
261+
</a>
262+
</td>
263+
<td style="text-align:center">
264+
<a href='https://app.cortexcpp.com/download/latest/linux-amd64-network'>
265+
<img src='https://github.com/janhq/docs/blob/main/static/img/linux.png' style="height:15px; width: 15px" />
266+
cortex.deb
267+
</a>
268+
</td>
269+
</tr>
243270
<tr style="text-align:center">
244271
<td style="text-align:center"><b>Beta (Preview)</b></td>
245272
<td style="text-align:center">
246273
<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
274+
<img src='https://github.com/janhq/docs/blob/main/static/img/windows.png' style="height:15px; width: 15px" />
275+
cortex.exe
249276
</a>
250277
</td>
251278
<td style="text-align:center">
252279
<a href='https://app.cortexcpp.com/download/beta/mac-universal-network'>
253280
<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
281+
cortex.pkg
255282
</a>
256283
</td>
257284
<td style="text-align:center">
258285
<a href='https://app.cortexcpp.com/download/beta/linux-amd64-network'>
259286
<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
287+
cortex.deb
261288
</a>
262289
</td>
263290
</tr>
@@ -266,19 +293,19 @@ Cortex releases 2 preview versions for advanced users to try new features early
266293
<td style="text-align:center">
267294
<a href='https://app.cortexcpp.com/download/nightly/windows-amd64-network'>
268295
<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
296+
cortex.exe
270297
</a>
271298
</td>
272299
<td style="text-align:center">
273300
<a href='https://app.cortexcpp.com/download/nightly/mac-universal-network'>
274301
<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
302+
cortex.pkg
276303
</a>
277304
</td>
278305
<td style="text-align:center">
279306
<a href='https://app.cortexcpp.com/download/nightly/linux-amd64-network'>
280307
<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
308+
cortex.deb
282309
</a>
283310
</td>
284311
</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)