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

Commit dd2fcfb

Browse files
author
Nicole Zhu
committed
chore: copy edits
1 parent a2a6550 commit dd2fcfb

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

docs/docs/cli/cortex.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ For example:
6262
- [cortex embeddings](/docs/cli/embeddings): Create an embedding vector representing the input text.
6363
- [cortex engines](/docs/cli/engines): Manage Cortex.cpp engines.
6464
- [cortex pull|download](/docs/cli/pull): Download a model.
65-
- [cortex run](/docs/cli/run): Shortcut to start a model and chat.
65+
- [cortex run](/docs/cli/run): Shortcut to pull, start and chat with a model.
6666
- [cortex update](/docs/cli/update): Update the Cortex.cpp version.
6767
- [cortex start](/docs/cli/start): Start the Cortex.cpp API server.
6868
- [cortex stop](/docs/cli/stop): Stop the Cortex.cpp API server.

engine/cli/command_line_parser.cc

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ constexpr const auto kCommonCommandsGroup = "Common Commands";
2828
constexpr const auto kInferenceGroup = "Inference";
2929
constexpr const auto kModelsGroup = "Models";
3030
constexpr const auto kEngineGroup = "Engines";
31-
constexpr const auto kSystemGroup = "System";
31+
constexpr const auto kSystemGroup = "Server";
3232
constexpr const auto kSubcommands = "Subcommands";
3333
} // namespace
3434

3535
CommandLineParser::CommandLineParser()
36-
: app_("Cortex.cpp CLI"),
36+
: app_("\nCortex.cpp CLI\n"),
3737
download_service_{std::make_shared<DownloadService>()},
3838
model_service_{ModelService(download_service_)},
3939
engine_service_{EngineService(download_service_)} {}
@@ -55,12 +55,12 @@ bool CommandLineParser::SetupCommand(int argc, char** argv) {
5555

5656
SetupSystemCommands();
5757

58-
app_.add_flag("--verbose", log_verbose, "Verbose logging");
58+
app_.add_flag("--verbose", log_verbose, "Get verbose logs");
5959

6060
// Logic is handled in main.cc, just for cli helper command
6161
std::string path;
62-
app_.add_option("--config_file_path", path, "Configuration file path");
63-
app_.add_option("--data_folder_path", path, "Data folder path");
62+
app_.add_option("--config_file_path", path, "Configure .rc file path");
63+
app_.add_option("--data_folder_path", path, "Configure data folder path");
6464

6565
// cortex version
6666
auto cb = [&](int c) {
@@ -70,7 +70,7 @@ bool CommandLineParser::SetupCommand(int argc, char** argv) {
7070
CLI_LOG("default");
7171
#endif
7272
};
73-
app_.add_flag_function("-v,--version", cb, "Cortex version");
73+
app_.add_flag_function("-v,--version", cb, "Get Cortex version");
7474

7575
CLI11_PARSE(app_, argc, argv);
7676
if (argc == 1) {
@@ -91,9 +91,9 @@ bool CommandLineParser::SetupCommand(int argc, char** argv) {
9191
commands::CheckNewUpdate(commands::kTimeoutCheckUpdate);
9292
latest_version.has_value() &&
9393
*latest_version != CORTEX_CPP_VERSION) {
94-
CLI_LOG("\nA new release of cortex is available: "
94+
CLI_LOG("\nNew Cortex release available: "
9595
<< CORTEX_CPP_VERSION << " -> " << *latest_version);
96-
CLI_LOG("To upgrade, run: " << commands::GetRole()
96+
CLI_LOG("To update, run: " << commands::GetRole()
9797
<< commands::GetCortexBinary()
9898
<< " update");
9999
}
@@ -115,7 +115,7 @@ bool CommandLineParser::SetupCommand(int argc, char** argv) {
115115
void CommandLineParser::SetupCommonCommands() {
116116
auto model_pull_cmd = app_.add_subcommand(
117117
"pull",
118-
"Download a model by URL (or HuggingFace ID) "
118+
"Download models by HuggingFace Repo/ModelID"
119119
"See built-in models: https://huggingface.co/cortexso");
120120
model_pull_cmd->group(kCommonCommandsGroup);
121121
model_pull_cmd->usage("Usage:\n" + commands::GetCortexBinary() +
@@ -136,7 +136,7 @@ void CommandLineParser::SetupCommonCommands() {
136136
}
137137
});
138138

139-
auto run_cmd = app_.add_subcommand("run", "Shortcut to start a model");
139+
auto run_cmd = app_.add_subcommand("run", "Shortcut: pull, start & chat with a model");
140140
run_cmd->group(kCommonCommandsGroup);
141141
run_cmd->usage("Usage:\n" + commands::GetCortexBinary() +
142142
" run [options] [model_id]");
@@ -213,7 +213,7 @@ void CommandLineParser::SetupModelCommands() {
213213
});
214214

215215
auto list_models_cmd =
216-
models_cmd->add_subcommand("list", "List all models locally");
216+
models_cmd->add_subcommand("list", "List all local models");
217217
list_models_cmd->add_option("filter", cml_data_.filter, "Filter model id");
218218
list_models_cmd->add_flag("-e,--engine", cml_data_.display_engine,
219219
"Display engine");
@@ -230,7 +230,7 @@ void CommandLineParser::SetupModelCommands() {
230230
});
231231

232232
auto get_models_cmd =
233-
models_cmd->add_subcommand("get", "Get info of {model_id} locally");
233+
models_cmd->add_subcommand("get", "Get a local model info by ID");
234234
get_models_cmd->usage("Usage:\n" + commands::GetCortexBinary() +
235235
" models get [model_id]");
236236
get_models_cmd->group(kSubcommands);
@@ -249,7 +249,7 @@ void CommandLineParser::SetupModelCommands() {
249249
});
250250

251251
auto model_del_cmd =
252-
models_cmd->add_subcommand("delete", "Delete a model by ID locally");
252+
models_cmd->add_subcommand("delete", "Delete a local model by ID");
253253
model_del_cmd->usage("Usage:\n" + commands::GetCortexBinary() +
254254
" models delete [model_id]");
255255
model_del_cmd->group(kSubcommands);
@@ -270,13 +270,13 @@ void CommandLineParser::SetupModelCommands() {
270270

271271
std::string model_alias;
272272
auto model_alias_cmd =
273-
models_cmd->add_subcommand("alias", "Add alias name for a modelID");
273+
models_cmd->add_subcommand("alias", "Add a model alias instead of ID");
274274
model_alias_cmd->usage("Usage:\n" + commands::GetCortexBinary() +
275275
" models alias --model_id [model_id] --alias [alias]");
276276
model_alias_cmd->group(kSubcommands);
277277
model_alias_cmd->add_option(
278278
"--model_id", cml_data_.model_id,
279-
"Can be modelID or model alias to identify model");
279+
"Can be a model ID or model alias");
280280
model_alias_cmd->add_option("--alias", cml_data_.model_alias,
281281
"new alias to be set");
282282
model_alias_cmd->callback([this, model_alias_cmd]() {
@@ -297,7 +297,7 @@ void CommandLineParser::SetupModelCommands() {
297297

298298
std::string model_path;
299299
auto model_import_cmd = models_cmd->add_subcommand(
300-
"import", "Import a gguf model from local file");
300+
"import", "Import a model from a local filepath");
301301
model_import_cmd->usage(
302302
"Usage:\n" + commands::GetCortexBinary() +
303303
" models import --model_id [model_id] --model_path [model_path]");
@@ -416,7 +416,7 @@ void CommandLineParser::SetupSystemCommands() {
416416
});
417417

418418
auto ps_cmd =
419-
app_.add_subcommand("ps", "Show running models and their status");
419+
app_.add_subcommand("ps", "Show active model statuses");
420420
ps_cmd->group(kSystemGroup);
421421
ps_cmd->usage("Usage:\n" + commands::GetCortexBinary() + "ps");
422422
ps_cmd->callback([&]() {
@@ -491,7 +491,7 @@ void CommandLineParser::EngineUninstall(CLI::App* parent,
491491
}
492492

493493
void CommandLineParser::EngineGet(CLI::App* parent) {
494-
auto get_cmd = parent->add_subcommand("get", "Get an engine info");
494+
auto get_cmd = parent->add_subcommand("get", "Get engine info");
495495
get_cmd->usage("Usage:\n" + commands::GetCortexBinary() +
496496
" engines get [engine_name] [options]");
497497
get_cmd->group(kSubcommands);
@@ -524,7 +524,7 @@ void CommandLineParser::EngineGet(CLI::App* parent) {
524524

525525
void CommandLineParser::ModelUpdate(CLI::App* parent) {
526526
auto model_update_cmd =
527-
parent->add_subcommand("update", "Update configuration of a model");
527+
parent->add_subcommand("update", "Update model configurations");
528528
model_update_cmd->group(kSubcommands);
529529
model_update_cmd->add_option("--model_id", cml_data_.model_id, "Model ID")
530530
->required();

engine/cli/commands/cortex_upd_cmd.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ void CortexUpdCmd::Exec(const std::string& v, bool force) {
304304
if (!GetNightly(v))
305305
return;
306306
}
307-
CLI_LOG("Update cortex sucessfully");
307+
CLI_LOG("Updated cortex successfully");
308308
}
309309

310310
bool CortexUpdCmd::GetStable(const std::string& v) {

engine/cli/commands/ps_cmd.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void PsCmd::Exec(const std::string& host, int port) {
1616

1717
auto res = cli.Get("/inferences/server/models");
1818
if (!res || res->status != httplib::StatusCode::OK_200) {
19-
CLI_LOG("No model loaded!");
19+
CLI_LOG("No models loaded!");
2020
return;
2121
}
2222

@@ -44,7 +44,7 @@ void PsCmd::Exec(const std::string& host, int port) {
4444
void PsCmd::PrintModelStatusList(
4545
const std::vector<ModelLoadedStatus>& model_status_list) const {
4646
if (model_status_list.empty()) {
47-
CLI_LOG("No model loaded!");
47+
CLI_LOG("No models loaded!");
4848
return;
4949
}
5050

engine/controllers/swagger.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ constexpr auto ScalarUi = R"(
55
<!doctype html>
66
<html>
77
<head>
8-
<title>Scalar API Reference</title>
8+
<title>Cortex API Reference</title>
99
<meta charset="utf-8" />
1010
<meta
1111
name="viewport"

0 commit comments

Comments
 (0)