You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,46 +75,46 @@ Remember to use an add-on like [cargo-update](https://crates.io/crates/cargo-upd
75
75
When you first start up Ferium, you will have to either
76
76
77
77
- Create a new profile by running `ferium profile create` and entering the details for your profile
78
-
- Add a modpack by running `ferium modpack add-curseforge <project-id>` or `ferium modpack add-modrinth <project-id>`
78
+
- Add a modpack by running `ferium modpack add <project_id>`
79
79
80
80
### Adding Mods
81
81
82
82
- Modrinth Mods
83
-
-`ferium add-modrinth project_id`
83
+
-`ferium add project_id`
84
84
- Where `project_id` is the slug or project id of the mod
85
85
- For example, [Sodium](https://modrinth.com/mod/sodium) has the slug `sodium` and a project id `AANobbMI`
86
86
- You can find the slug in the website url (`modrinth.com/mod/<slug>`), and the project id at the bottom of the left sidebar under 'Technical information'
87
-
- So to add [Sodium](https://modrinth.com/mod/sodium), you should run `ferium add-modrinth sodium` or `ferium add-modrinth AANobbMI`
87
+
- So to add [Sodium](https://modrinth.com/mod/sodium), you should run `ferium add sodium` or `ferium add AANobbMI`
88
88
- CurseForge Mods
89
-
-`ferium add-curseforge project_id`
89
+
-`ferium add project_id`
90
90
- Where `project_id` is the project id of the mod
91
91
- For example, [Terralith](https://www.curseforge.com/minecraft/mc-mods/terralith) has a project id `513688`
92
92
- You can find the project id at the top of the right sidebar under 'About Project'
93
-
- So to add [Terralith](https://www.curseforge.com/minecraft/mc-mods/terralith), you should run `ferium add-curseforge 513688`
93
+
- So to add [Terralith](https://www.curseforge.com/minecraft/mc-mods/terralith), you should run `ferium add 513688`
94
94
- GitHub 'Mods'
95
-
-`ferium add-github owner/name`
95
+
-`ferium add owner/name`
96
96
- Where `owner` is the username of the owner of the repository and `name` is the name of the repository (both case-insensitive)
97
97
- For example [Sodium's repository](https://github.com/CaffeineMC/sodium-fabric) has the id `CaffeineMC/sodium-fabric`
98
98
- You can find these at the top left part of the repository's page as a big 'owner / name'
99
-
- So to add [Sodium](https://github.com/CaffeineMC/sodium-fabric), you should run `ferium add-github CaffeineMC/sodium-fabric` (again, case-insensitive)
99
+
- So to add [Sodium](https://github.com/CaffeineMC/sodium-fabric), you should run `ferium add CaffeineMC/sodium-fabric` (again, case-insensitive)
100
100
- Note: The GitHub repository has to release JAR files in their Releases for Ferium to download, or else it will refuse to be added
101
101
- External mods
102
102
- If you want to use files that are not downloadable by Ferium, place them in the `user` folder in the output directory. Files here will be copied to the output directory when upgrading
103
103
104
104
### Adding Modpacks
105
105
106
106
- Modrinth Modpacks
107
-
-`ferium modpack add-modrinth project_id`
107
+
-`ferium modpack add project_id`
108
108
- Where `project_id` is the slug or project id of the modpack
109
109
- For example, [Better Minecraft](https://modrinth.com/modpack/better-minecraft) has the slug `better-minecraft` and a project id `shFhR8Vx`
110
110
- You can find the slug in the website url (`modrinth.com/modpack/<slug>`), and the project id at the bottom of the left sidebar under 'Technical information'
111
-
- So to add [Better Minecraft](https://modrinth.com/modpack/better-minecraft), you should run `ferium modpack add-modrinth better-minecraft` or `ferium add-modrinth shFhR8Vx`
111
+
- So to add [Better Minecraft](https://modrinth.com/modpack/better-minecraft), you should run `ferium modpack add better-minecraft` or `ferium modpack add shFhR8Vx`
112
112
- CurseForge Mods
113
-
-`ferium modpack add-curseforge project_id`
113
+
-`ferium modpack add project_id`
114
114
- Where `project_id` is the project id of the modpack
115
115
- For example, [RLCraft](https://www.curseforge.com/minecraft/modpacks/rlcraft) has a project id `285109`
116
116
- You can find the project id at the top of the right sidebar under 'About Project'
117
-
- So to add [RLCraft](https://www.curseforge.com/minecraft/modpacks/rlcraft), you should run `ferium modpack add-curseforge 285109`
117
+
- So to add [RLCraft](https://www.curseforge.com/minecraft/modpacks/rlcraft), you should run `ferium modpack add 285109`
118
118
119
119
### Upgrading Mods
120
120
@@ -151,7 +151,7 @@ You can also provide the names of the mods to remove as arguments. Mod names wit
151
151
152
152
If some mod is compatible with your profile but Ferium does not download it, [create an issue]((https://github.com/theRookieCoder/ferium/issues/new)) if you think it's a bug. You can disable the game version or mod loader checks by using the `--dont-check-game-version` and/or `--dont-check-mod-loader` flags when adding the mod, or manually setting `check_game_version` or `check_mod_loader` to false for the specific mod in the config.
153
153
154
-
For example, [Just Enough Items](https://www.curseforge.com/minecraft/mc-mods/jei) does not specify the mod loader for older minecraft versions such as `1.12.2`. In this case, you would add JEI by running `ferium add-curseforge 238222 --dont-check-mod-loader` so that the mod loader check is disabled.
154
+
For example, [Just Enough Items](https://www.curseforge.com/minecraft/mc-mods/jei) does not specify the mod loader for older minecraft versions such as `1.12.2`. In this case, you would add JEI by running `ferium add 238222 --dont-check-mod-loader` so that the mod loader check is disabled.
155
155
You can also manually disable the mod loader (and/or game version) check(s) in the config like so
Copy file name to clipboardExpand all lines: src/cli.rs
+65-61Lines changed: 65 additions & 61 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
use clap::{Parser,Subcommand,ValueHint};
2
+
use clap_complete::Shell;
2
3
use std::path::PathBuf;
3
4
4
5
#[derive(Parser)]
@@ -12,7 +13,7 @@ pub struct Ferium {
12
13
#[clap(help("The limit for additional threads spawned by the Tokio runtime"))]
13
14
pubthreads:Option<usize>,
14
15
#[clap(long)]
15
-
#[clap(help("A GitHub personal access token for increasing the rate limit"))]
16
+
#[clap(help("A GitHub personal access token for increasing the GitHub API rate limit"))]
16
17
pubgithub_token:Option<String>,
17
18
#[clap(long)]
18
19
#[clap(help(
@@ -24,44 +25,27 @@ pub struct Ferium {
24
25
25
26
#[derive(Subcommand)]
26
27
pubenumSubCommands{
27
-
#[clap(about("Add a Modrinth mod to the profile"))]
28
-
AddModrinth{
29
-
#[clap(help("The project ID is specified at the bottom of the left sidebar under 'Technical information'\nYou can also use the project slug for this"))]
30
-
project_id:String,
31
-
#[clap(long)]
32
-
#[clap(help("Whether the game version should be checked for this mod"))]
28
+
#[clap(about("Add a mod to the profile"))]
29
+
Add{
30
+
#[clap(help("The identifier of the mod/project/repository
31
+
The Modrinth project ID is specified at the bottom of the left sidebar under 'Technical information'. You can also use the project slug in the URL
32
+
The CurseForge mod ID is specified at the top of the right sidebar under 'About Project'
33
+
The GitHub identifier is the repository's full name, e.g. `gorilla-devs/ferium`"))]
34
+
identifier:String,
35
+
#[clap(long)]
36
+
#[clap(help("The game version will not be checked for this mod"))]
33
37
dont_check_game_version:bool,
34
38
#[clap(long)]
35
-
#[clap(help("Whether the mod loader should be checked for this mod"))]
39
+
#[clap(help("The mod loader will not be checked for this mod"))]
36
40
dont_check_mod_loader:bool,
37
41
#[clap(long)]
38
-
#[clap(help("Do not add any of the mod's dependencies"))]
42
+
#[clap(help("The mod's dependencies will not be added"))]
39
43
dont_add_dependencies:bool,
40
44
},
41
-
#[clap(about("Add a GitHub repository to the profile"))]
42
-
AddGithub{
43
-
#[clap(help("The full name of the repository, e.g. `theRookieCoder/ferium`"))]
44
-
name:String,
45
-
#[clap(long)]
46
-
#[clap(help("Whether the game version should be checked for this mod"))]
47
-
dont_check_game_version:bool,
48
-
#[clap(long)]
49
-
#[clap(help("Whether the mod loader should be checked for this mod"))]
50
-
dont_check_mod_loader:bool,
51
-
},
52
-
#[clap(about("Add a CurseForge mod to the profile"))]
53
-
AddCurseforge{
54
-
#[clap(help("The project ID is specified at the right sidebar under 'About Project'"))]
55
-
project_id:i32,
56
-
#[clap(long)]
57
-
#[clap(help("Whether the game version should be checked for this mod"))]
58
-
dont_check_game_version:bool,
59
-
#[clap(long)]
60
-
#[clap(help("Whether the mod loader should be checked for this mod"))]
61
-
dont_check_mod_loader:bool,
62
-
#[clap(long)]
63
-
#[clap(help("Do not add any of the mod's dependencies"))]
64
-
dont_add_dependencies:bool,
45
+
#[clap(about("Generate shell auto completions to stdout for the specified shell"))]
46
+
Complete{
47
+
#[clap(help("The shell to generate auto completions for"))]
48
+
shell:Shell,
65
49
},
66
50
#[clap(about("List all the mods in the profile, and with some their metadata if verbose"))]
67
51
List{
@@ -81,10 +65,13 @@ pub enum SubCommands {
81
65
#[clap(subcommand)]
82
66
subcommand:ProfileSubCommands,
83
67
},
84
-
#[clap(about("Remove a mod or repository from the profile\nOptionally, provide a list of names of the mods to remove"))]
68
+
#[clap(about(
69
+
"Remove a mod or repository from the profile
70
+
Optionally, provide a list of names of the mods to remove"
71
+
))]
85
72
Remove{
86
73
#[clap(name("mod-name"))]
87
-
#[clap(help("A case-insensitive list of names of a mods to remove\nIf one or more of the mod names provided does not exist, the program will error out without changing anything in the config"))]
74
+
#[clap(help("A case-insensitive list of names of a mods to remove"))]
88
75
mod_names:Vec<String>,
89
76
},
90
77
#[clap(about("Sort all your mods in alphabetical order"))]
@@ -96,7 +83,8 @@ pub enum SubCommands {
96
83
#[derive(Subcommand)]
97
84
pubenumProfileSubCommands{
98
85
#[clap(about(
99
-
"Configure the current profile's Minecraft version, mod loader, and output directory\nOptionally, provide setting(s) to change as option(s)"
86
+
"Configure the current profile's Minecraft version, mod loader, and output directory
87
+
Optionally, provide setting(s) to change as option(s)"
#[clap(about("Add a Modrinth modpack to the config"))]
157
-
AddModrinth{
158
-
#[clap(help("The project ID is specified at the bottom of the left sidebar under 'Technical information'\nYou can also use the project slug for this"))]
159
-
project_id:String,
157
+
#[clap(about("Add a modpack to the config"))]
158
+
Add{
159
+
#[clap(help("The identifier of the modpack/project
160
+
The Modrinth project ID is specified at the bottom of the left sidebar under 'Technical information'. You can also use the project slug for this
161
+
The CurseForge mod ID is specified at the top of the right sidebar under 'About Project'"))]
162
+
identifier:String,
160
163
#[clap(long)]
161
164
#[clap(value_hint(ValueHint::DirPath))]
162
165
#[clap(help("The Minecraft instance directory to install the modpack to"))]
163
166
output_dir:Option<PathBuf>,
164
167
#[clap(long)]
165
-
#[clap(help("Whether to install the modpack's overrides to the output directory.\nThis will override existing files"))]
166
-
install_overrides:Option<bool>,
167
-
},
168
-
#[clap(about("Add a CurseForge modpack to the config"))]
169
-
AddCurseforge{
170
-
#[clap(help("The project ID is specified at the right sidebar under 'About Project'"))]
171
-
project_id:i32,
172
-
#[clap(long)]
173
-
#[clap(value_hint(ValueHint::DirPath))]
174
-
#[clap(help("The Minecraft instance directory to install the modpack to"))]
175
-
output_dir:Option<PathBuf>,
176
-
#[clap(long)]
177
-
#[clap(help("Whether to install the modpack's overrides to the output directory.\nThis may overwrite existing files"))]
168
+
#[clap(help(
169
+
"Whether to install the modpack's overrides to the output directory
170
+
This will override existing files"
171
+
))]
178
172
install_overrides:Option<bool>,
179
173
},
180
174
#[clap(about(
181
-
"Configure the current modpack's output directory\nOptionally, provide the output directory as an option"
175
+
"Configure the current modpack's output directory
176
+
Optionally, provide the output directory as an option"
182
177
))]
183
178
Configure{
184
179
#[clap(long)]
185
180
#[clap(value_hint(ValueHint::DirPath))]
186
181
#[clap(help("The Minecraft instance directory to install the modpack to"))]
187
182
output_dir:Option<PathBuf>,
188
183
#[clap(long)]
189
-
#[clap(help("Whether to install the modpack's overrides to the output directory.\nThis may overwrite existing files"))]
184
+
#[clap(help(
185
+
"Whether to install the modpack's overrides to the output directory
186
+
This may overwrite existing files"
187
+
))]
190
188
install_overrides:Option<bool>,
191
189
},
192
-
#[clap(about("Delete a modpack\nOptionally, provide the name of the modpack to delete"))]
190
+
#[clap(about(
191
+
"Delete a modpack
192
+
Optionally, provide the name of the modpack to delete"
193
+
))]
193
194
Delete{
194
195
#[clap(long)]
195
196
#[clap(help("The name of the modpack to delete"))]
196
197
modpack_name:Option<String>,
197
198
},
198
199
#[clap(about("List all the modpacks"))]
199
200
List,
200
-
#[clap(about("Switch between different modpacks\nOptionally, provide the name of the modpack to switch to"))]
201
+
#[clap(about(
202
+
"Switch between different modpacks
203
+
Optionally, provide the name of the modpack to switch to"
204
+
))]
201
205
Switch{
202
206
#[clap(long)]
203
207
#[clap(help("The name of the modpack to switch to"))]
0 commit comments