@bobschlowinskii/clicraft 0.4.0
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.
- package/CHANGELOG.md +191 -0
- package/CONTRIBUTING.md +261 -0
- package/LICENSE.md +7 -0
- package/README.md +55 -0
- package/commands/auth.js +427 -0
- package/commands/config.js +356 -0
- package/commands/create.js +534 -0
- package/commands/info.js +113 -0
- package/commands/install.js +130 -0
- package/commands/launch.js +296 -0
- package/commands/search.js +50 -0
- package/commands/uninstall.js +94 -0
- package/commands/upgrade.js +343 -0
- package/commands/version.js +21 -0
- package/docs/README.md +119 -0
- package/docs/_config.yml +63 -0
- package/docs/commands/auth.md +376 -0
- package/docs/commands/config.md +294 -0
- package/docs/commands/create.md +276 -0
- package/docs/commands/info.md +460 -0
- package/docs/commands/install.md +320 -0
- package/docs/commands/launch.md +427 -0
- package/docs/commands/search.md +276 -0
- package/docs/commands/uninstall.md +128 -0
- package/docs/commands/upgrade.md +515 -0
- package/docs/commands.md +266 -0
- package/docs/configuration.md +410 -0
- package/docs/contributing.md +114 -0
- package/docs/index.md +82 -0
- package/docs/installation.md +162 -0
- package/helpers/auth/index.js +20 -0
- package/helpers/auth/microsoft.js +329 -0
- package/helpers/auth/storage.js +260 -0
- package/helpers/config.js +258 -0
- package/helpers/constants.js +38 -0
- package/helpers/getv.js +5 -0
- package/helpers/minecraft.js +308 -0
- package/helpers/modrinth.js +141 -0
- package/helpers/utils.js +334 -0
- package/helpers/versions.js +21 -0
- package/index.js +89 -0
- package/package.json +30 -0
package/docs/commands.md
ADDED
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
title: Commands
|
|
4
|
+
nav_order: 3
|
|
5
|
+
has_children: true
|
|
6
|
+
description: "Complete command reference"
|
|
7
|
+
permalink: /commands
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Commands Overview
|
|
11
|
+
|
|
12
|
+
CLIcraft provides a comprehensive set of commands to manage your Minecraft instances and mods. This page provides a quick reference to all available commands.
|
|
13
|
+
|
|
14
|
+
## 📚 Command Categories
|
|
15
|
+
|
|
16
|
+
### Instance Management
|
|
17
|
+
Commands for creating and managing Minecraft instances.
|
|
18
|
+
|
|
19
|
+
| Command | Description |
|
|
20
|
+
|---------|-------------|
|
|
21
|
+
| [`create`](commands/create.md) | Create a new Minecraft instance with Fabric or Forge |
|
|
22
|
+
| [`info`](commands/info.md) | View detailed information about an instance |
|
|
23
|
+
| [`launch`](commands/launch.md) | Launch a Minecraft instance |
|
|
24
|
+
|
|
25
|
+
### Mod Management
|
|
26
|
+
Commands for finding, installing, and managing mods.
|
|
27
|
+
|
|
28
|
+
| Command | Description |
|
|
29
|
+
|---------|-------------|
|
|
30
|
+
| [`search`](commands/search.md) | Search for mods on Modrinth |
|
|
31
|
+
| [`install`](commands/install.md) | Install a mod to your instance |
|
|
32
|
+
| [`uninstall`](commands/uninstall.md) | Remove a mod from your instance |
|
|
33
|
+
| [`upgrade`](commands/upgrade.md) | Upgrade mods, Minecraft version, or mod loader |
|
|
34
|
+
|
|
35
|
+
### Authentication
|
|
36
|
+
Commands for managing your Microsoft account authentication.
|
|
37
|
+
|
|
38
|
+
| Command | Description |
|
|
39
|
+
|---------|-------------|
|
|
40
|
+
| [`auth`](commands/auth.md) | Manage Minecraft accounts (login, logout, switch, status) |
|
|
41
|
+
|
|
42
|
+
**Actions:**
|
|
43
|
+
- `clicraft auth login` - Add a new account
|
|
44
|
+
- `clicraft auth logout [account]` - Remove an account
|
|
45
|
+
- `clicraft auth switch [account]` - Switch between accounts
|
|
46
|
+
- `clicraft auth status` - View all account statuses
|
|
47
|
+
- `clicraft auth list` - List saved accounts
|
|
48
|
+
|
|
49
|
+
### Configuration
|
|
50
|
+
Commands for managing CLI and game settings.
|
|
51
|
+
|
|
52
|
+
| Command | Description |
|
|
53
|
+
|---------|-------------|
|
|
54
|
+
| [`config`](commands/config.md) | Manage CLI settings and game settings |
|
|
55
|
+
|
|
56
|
+
## 🔍 Quick Command Reference
|
|
57
|
+
|
|
58
|
+
### Create a new instance
|
|
59
|
+
```bash
|
|
60
|
+
clicraft create
|
|
61
|
+
```
|
|
62
|
+
Interactive prompts will guide you through instance configuration.
|
|
63
|
+
|
|
64
|
+
### Search for mods
|
|
65
|
+
```bash
|
|
66
|
+
clicraft search <query> [options]
|
|
67
|
+
```
|
|
68
|
+
**Options:**
|
|
69
|
+
- `-l, --limit <number>` - Number of results (default: 10)
|
|
70
|
+
- `-v, --version <version>` - Filter by Minecraft version
|
|
71
|
+
- `--loader <loader>` - Filter by mod loader (fabric, forge, quilt, neoforge)
|
|
72
|
+
- `--verbose` - Enable verbose output
|
|
73
|
+
|
|
74
|
+
### Install a mod
|
|
75
|
+
```bash
|
|
76
|
+
clicraft install <mod> [options]
|
|
77
|
+
```
|
|
78
|
+
**Options:**
|
|
79
|
+
- `-i, --instance <path>` - Path to instance directory
|
|
80
|
+
- `-f, --force` - Force reinstall if already installed
|
|
81
|
+
- `--verbose` - Enable verbose output
|
|
82
|
+
|
|
83
|
+
### Uninstall a mod
|
|
84
|
+
```bash
|
|
85
|
+
clicraft uninstall [mod] [options]
|
|
86
|
+
```
|
|
87
|
+
**Options:**
|
|
88
|
+
- `-i, --instance <path>` - Path to instance directory
|
|
89
|
+
- `-f, --force` - Skip confirmation prompt
|
|
90
|
+
- `--verbose` - Enable verbose output
|
|
91
|
+
|
|
92
|
+
If no mod is specified, shows interactive multi-select.
|
|
93
|
+
|
|
94
|
+
### Authentication
|
|
95
|
+
```bash
|
|
96
|
+
clicraft auth [action] [args...]
|
|
97
|
+
```
|
|
98
|
+
**Actions:**
|
|
99
|
+
- `login` - Add a new Microsoft account
|
|
100
|
+
- `logout [account]` - Remove an account (interactive if no account specified)
|
|
101
|
+
- `switch [account]` - Switch to a different account
|
|
102
|
+
- `status [account]` - Show account status(es)
|
|
103
|
+
- `list` - List all saved accounts
|
|
104
|
+
|
|
105
|
+
**Options:**
|
|
106
|
+
- `-f, --force` - Skip confirmation prompts
|
|
107
|
+
- `--verbose` - Enable verbose output
|
|
108
|
+
|
|
109
|
+
### Launch the game
|
|
110
|
+
```bash
|
|
111
|
+
clicraft launch [options]
|
|
112
|
+
```
|
|
113
|
+
**Options:**
|
|
114
|
+
- `-i, --instance <path>` - Path to instance directory
|
|
115
|
+
- `--offline` - Launch in offline mode
|
|
116
|
+
- `--verbose` - Enable verbose output
|
|
117
|
+
|
|
118
|
+
### View instance info
|
|
119
|
+
```bash
|
|
120
|
+
clicraft info [options]
|
|
121
|
+
```
|
|
122
|
+
**Options:**
|
|
123
|
+
- `-i, --instance <path>` - Path to instance directory
|
|
124
|
+
- `--verbose` - Show detailed information
|
|
125
|
+
|
|
126
|
+
### Upgrade mods or loader
|
|
127
|
+
```bash
|
|
128
|
+
clicraft upgrade [mod] [options]
|
|
129
|
+
```
|
|
130
|
+
**Options:**
|
|
131
|
+
- `-i, --instance <path>` - Path to instance directory
|
|
132
|
+
- `-f, --force` - Force upgrade
|
|
133
|
+
- `--verbose` - Enable verbose output
|
|
134
|
+
|
|
135
|
+
### Manage settings
|
|
136
|
+
```bash
|
|
137
|
+
clicraft config [action] [args...] [options]
|
|
138
|
+
```
|
|
139
|
+
**Actions:**
|
|
140
|
+
- `show` - Show CLI settings (default)
|
|
141
|
+
- `set <key> <value>` - Set a CLI setting
|
|
142
|
+
- `ignore` - Show game settings ignore list
|
|
143
|
+
- `ignore-add <pattern>` - Add pattern to ignore list
|
|
144
|
+
- `ignore-remove <pattern>` - Remove pattern from ignore list
|
|
145
|
+
- `defaults` - Show default game settings for new instances
|
|
146
|
+
- `defaults-set <key> <value>` - Set a default game setting
|
|
147
|
+
- `defaults-remove <key>` - Remove a default game setting
|
|
148
|
+
- `defaults-clear` - Clear all default game settings
|
|
149
|
+
- `capture` - Capture game settings from options.txt
|
|
150
|
+
- `game-settings` - Show saved game settings
|
|
151
|
+
- `clear-game-settings` - Clear saved game settings
|
|
152
|
+
|
|
153
|
+
**Options:**
|
|
154
|
+
- `-i, --instance <path>` - Path to instance directory
|
|
155
|
+
- `--verbose` - Enable verbose output
|
|
156
|
+
|
|
157
|
+
## 💡 Common Workflows
|
|
158
|
+
|
|
159
|
+
### Setting up a new modded Minecraft instance
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# 1. Create a new instance
|
|
163
|
+
clicraft create
|
|
164
|
+
|
|
165
|
+
# 2. Navigate to instance directory
|
|
166
|
+
cd my-instance
|
|
167
|
+
|
|
168
|
+
# 3. Login to Microsoft (for online play)
|
|
169
|
+
clicraft login
|
|
170
|
+
|
|
171
|
+
# 4. Search for mods
|
|
172
|
+
clicraft search sodium
|
|
173
|
+
|
|
174
|
+
# 5. Install mods
|
|
175
|
+
clicraft install sodium
|
|
176
|
+
clicraft install lithium
|
|
177
|
+
clicraft install iris
|
|
178
|
+
|
|
179
|
+
# 6. Launch the game
|
|
180
|
+
clicraft launch
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Managing an existing instance
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# Check instance information
|
|
187
|
+
cd my-instance
|
|
188
|
+
clicraft info --verbose
|
|
189
|
+
|
|
190
|
+
# Update mods
|
|
191
|
+
clicraft upgrade
|
|
192
|
+
|
|
193
|
+
# Launch the game
|
|
194
|
+
clicraft launch
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Working with multiple instances
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
# Install mod to specific instance
|
|
201
|
+
clicraft install sodium --instance ./instance1
|
|
202
|
+
|
|
203
|
+
# Launch specific instance
|
|
204
|
+
clicraft launch --instance ./instance2
|
|
205
|
+
|
|
206
|
+
# View info for specific instance
|
|
207
|
+
clicraft info --instance ./instance3
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Sharing a modpack configuration
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# Set up your instance with mods and settings
|
|
214
|
+
cd my-instance
|
|
215
|
+
clicraft install sodium
|
|
216
|
+
clicraft install lithium
|
|
217
|
+
# ... configure game settings in Minecraft ...
|
|
218
|
+
|
|
219
|
+
# Capture game settings
|
|
220
|
+
clicraft config capture
|
|
221
|
+
|
|
222
|
+
# Share your mcconfig.json
|
|
223
|
+
# Others can create the same setup:
|
|
224
|
+
mkdir new-instance && cd new-instance
|
|
225
|
+
cp /path/to/shared/mcconfig.json .
|
|
226
|
+
clicraft create
|
|
227
|
+
# CLIcraft will install everything from the config!
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## 🎓 Learning More
|
|
231
|
+
|
|
232
|
+
Each command has detailed documentation with examples and options:
|
|
233
|
+
|
|
234
|
+
- [**create**](commands/create.md) - Create instances
|
|
235
|
+
- [**search**](commands/search.md) - Find mods
|
|
236
|
+
- [**install**](commands/install.md) - Add mods to instances
|
|
237
|
+
- [**uninstall**](commands/uninstall.md) - Remove mods from instances
|
|
238
|
+
- [**login**](commands/login.md) - Authentication
|
|
239
|
+
- [**launch**](commands/launch.md) - Start the game
|
|
240
|
+
- [**info**](commands/info.md) - Instance details
|
|
241
|
+
- [**upgrade**](commands/upgrade.md) - Update mods and loaders
|
|
242
|
+
- [**config**](commands/config.md) - Manage settings
|
|
243
|
+
|
|
244
|
+
## 🔧 Global Options
|
|
245
|
+
|
|
246
|
+
Most commands support these common options:
|
|
247
|
+
|
|
248
|
+
- `--verbose` - Enable detailed output for debugging
|
|
249
|
+
- `--help` - Show help for a specific command
|
|
250
|
+
|
|
251
|
+
Example:
|
|
252
|
+
```bash
|
|
253
|
+
clicraft install --help
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## 🆘 Getting Help
|
|
257
|
+
|
|
258
|
+
For additional help:
|
|
259
|
+
|
|
260
|
+
- Use `clicraft <command> --help` for command-specific help
|
|
261
|
+
- Visit the [GitHub repository](https://github.com/theinfamousben/clicraft) for issues and discussions
|
|
262
|
+
- Check the [configuration guide](configuration.md) for advanced settings
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
[← Back to Home](index.md) | [Installation →](installation.md)
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
title: Configuration
|
|
4
|
+
nav_order: 4
|
|
5
|
+
description: "Configure CLIcraft and customize your instances"
|
|
6
|
+
permalink: /configuration
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Configuration Guide
|
|
10
|
+
|
|
11
|
+
Learn how to configure CLIcraft and customize your Minecraft instances.
|
|
12
|
+
|
|
13
|
+
## 📋 Overview
|
|
14
|
+
|
|
15
|
+
CLIcraft uses configuration files to manage:
|
|
16
|
+
- CLI settings (`~/.clicraft/settings.json`)
|
|
17
|
+
- Default game settings (`~/.clicraft/default-game-settings.json`)
|
|
18
|
+
- Game settings ignore list (`~/.clicraft/game-settings-ignore.json`)
|
|
19
|
+
- Authentication data (`~/.clicraft/auth.json`)
|
|
20
|
+
- Instance settings (`mcconfig.json`)
|
|
21
|
+
|
|
22
|
+
## 🏠 Configuration Locations
|
|
23
|
+
|
|
24
|
+
### Global CLI Configuration
|
|
25
|
+
CLI-wide settings are stored in your home directory:
|
|
26
|
+
```
|
|
27
|
+
~/.clicraft/
|
|
28
|
+
├── settings.json # CLI settings
|
|
29
|
+
├── default-game-settings.json # Default Minecraft settings for new instances
|
|
30
|
+
├── game-settings-ignore.json # Game settings to exclude when capturing
|
|
31
|
+
└── auth.json # Authentication tokens
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Instance Configuration
|
|
35
|
+
Each instance has its own configuration file:
|
|
36
|
+
```
|
|
37
|
+
instance-directory/
|
|
38
|
+
└── mcconfig.json
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## ⚙️ CLI Settings (~/.clicraft/settings.json)
|
|
42
|
+
|
|
43
|
+
Global settings for CLIcraft. Manage with `clicraft config`.
|
|
44
|
+
|
|
45
|
+
### Structure
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"javaPath": null,
|
|
50
|
+
"minMemory": "1G",
|
|
51
|
+
"maxMemory": "2G",
|
|
52
|
+
"modSource": "modrinth",
|
|
53
|
+
"checkUpdates": true
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Settings Reference
|
|
58
|
+
|
|
59
|
+
| Field | Type | Default | Description |
|
|
60
|
+
|-------|------|---------|-------------|
|
|
61
|
+
| `javaPath` | string/null | `null` | Path to Java executable (`null` = auto-detect) |
|
|
62
|
+
| `minMemory` | string | `"1G"` | Minimum JVM memory allocation |
|
|
63
|
+
| `maxMemory` | string | `"2G"` | Maximum JVM memory allocation |
|
|
64
|
+
| `modSource` | string | `"modrinth"` | Default mod source for searches |
|
|
65
|
+
| `checkUpdates` | boolean | `true` | Check for CLI updates on launch |
|
|
66
|
+
|
|
67
|
+
### Managing Settings
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# View all settings
|
|
71
|
+
clicraft config show
|
|
72
|
+
|
|
73
|
+
# Change a setting
|
|
74
|
+
clicraft config set maxMemory 4G
|
|
75
|
+
clicraft config set javaPath /usr/lib/jvm/java-21/bin/java
|
|
76
|
+
|
|
77
|
+
# Reset to auto-detect
|
|
78
|
+
clicraft config set javaPath auto
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 🚫 Game Settings Ignore List
|
|
82
|
+
|
|
83
|
+
Controls which Minecraft settings are excluded when capturing game settings. Stored in `~/.clicraft/game-settings-ignore.json`.
|
|
84
|
+
|
|
85
|
+
### Default Ignore List
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
[
|
|
89
|
+
"fullscreen",
|
|
90
|
+
"overrideWidth",
|
|
91
|
+
"overrideHeight",
|
|
92
|
+
"fullscreenResolution",
|
|
93
|
+
"lastServer",
|
|
94
|
+
"resourcePacks",
|
|
95
|
+
"incompatibleResourcePacks",
|
|
96
|
+
"key_*",
|
|
97
|
+
"narrator",
|
|
98
|
+
"highContrast",
|
|
99
|
+
"telemetryOptInExtra",
|
|
100
|
+
"onboardAccessibility"
|
|
101
|
+
]
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Wildcard Support
|
|
105
|
+
|
|
106
|
+
Use `*` as a wildcard suffix to match multiple settings:
|
|
107
|
+
- `key_*` - Matches all keybinds (`key_attack`, `key_use`, etc.)
|
|
108
|
+
- `soundCategory_*` - Matches all sound categories
|
|
109
|
+
|
|
110
|
+
### Managing Ignore List
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# View current ignore list
|
|
114
|
+
clicraft config ignore
|
|
115
|
+
|
|
116
|
+
# Add a pattern
|
|
117
|
+
clicraft config ignore-add mouseSensitivity
|
|
118
|
+
clicraft config ignore-add soundCategory_*
|
|
119
|
+
|
|
120
|
+
# Remove a pattern
|
|
121
|
+
clicraft config ignore-remove key_*
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## 🎮 Default Game Settings
|
|
125
|
+
|
|
126
|
+
Default Minecraft settings applied to all new instances. Stored in `~/.clicraft/default-game-settings.json`.
|
|
127
|
+
|
|
128
|
+
When you create a new instance with `clicraft create`, these settings are automatically written to the instance's `options.txt`.
|
|
129
|
+
|
|
130
|
+
### Example Configuration
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"renderDistance": 16,
|
|
135
|
+
"fov": 80,
|
|
136
|
+
"guiScale": 2,
|
|
137
|
+
"gamma": 0.5,
|
|
138
|
+
"maxFps": 144,
|
|
139
|
+
"lang": "en_us"
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Common Settings
|
|
144
|
+
|
|
145
|
+
| Setting | Type | Description | Example |
|
|
146
|
+
|---------|------|-------------|---------|
|
|
147
|
+
| `renderDistance` | number | View distance (2-32 chunks) | `16` |
|
|
148
|
+
| `fov` | number | Field of view (30-110) | `70` |
|
|
149
|
+
| `guiScale` | number | GUI scale (0=auto, 1-4) | `2` |
|
|
150
|
+
| `gamma` | number | Brightness (0.0-1.0) | `0.5` |
|
|
151
|
+
| `maxFps` | number | Frame rate limit | `144` |
|
|
152
|
+
| `lang` | string | Language code | `"en_us"` |
|
|
153
|
+
| `autoJump` | boolean | Auto-jump enabled | `false` |
|
|
154
|
+
| `soundCategory_master` | number | Master volume (0.0-1.0) | `1.0` |
|
|
155
|
+
|
|
156
|
+
### Managing Default Settings
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# View current defaults
|
|
160
|
+
clicraft config defaults
|
|
161
|
+
|
|
162
|
+
# Set a default
|
|
163
|
+
clicraft config defaults-set renderDistance 16
|
|
164
|
+
clicraft config defaults-set fov 80
|
|
165
|
+
clicraft config defaults-set autoJump false
|
|
166
|
+
|
|
167
|
+
# Remove a default
|
|
168
|
+
clicraft config defaults-remove renderDistance
|
|
169
|
+
|
|
170
|
+
# Clear all defaults
|
|
171
|
+
clicraft config defaults-clear
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## 🎮 Instance Configuration (mcconfig.json)
|
|
175
|
+
|
|
176
|
+
### Basic Structure
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"configVersion": "0.3.0",
|
|
181
|
+
"name": "my-instance",
|
|
182
|
+
"type": "client",
|
|
183
|
+
"modLoader": "fabric",
|
|
184
|
+
"minecraftVersion": "1.21.11",
|
|
185
|
+
"loaderVersion": "0.18.4",
|
|
186
|
+
"versionId": "fabric-loader-0.18.4-1.21.11",
|
|
187
|
+
"createdAt": "2026-01-19T15:51:05.322Z",
|
|
188
|
+
"mods": [
|
|
189
|
+
{
|
|
190
|
+
"projectId": "AANobbMI",
|
|
191
|
+
"slug": "sodium",
|
|
192
|
+
"name": "Sodium",
|
|
193
|
+
"versionId": "59wygFUQ",
|
|
194
|
+
"versionNumber": "mc1.21.11-0.8.2-fabric",
|
|
195
|
+
"fileName": "sodium-fabric-0.8.2+mc1.21.11.jar",
|
|
196
|
+
"installedAt": "2026-01-19T15:51:06.110Z"
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"gameSettings": {
|
|
200
|
+
"renderDistance": 12,
|
|
201
|
+
"fov": 70,
|
|
202
|
+
"guiScale": 2,
|
|
203
|
+
"gamma": 0.5
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Configuration Fields
|
|
209
|
+
|
|
210
|
+
| Field | Type | Description | Example |
|
|
211
|
+
|-------|------|-------------|---------|
|
|
212
|
+
| `configVersion` | string | CLIcraft version that created this config | `"0.3.0"` |
|
|
213
|
+
| `name` | string | Instance name | `"modded-survival"` |
|
|
214
|
+
| `type` | string | Instance type | `"client"` or `"server"` |
|
|
215
|
+
| `modLoader` | string | Mod loader type | `"fabric"` or `"forge"` |
|
|
216
|
+
| `minecraftVersion` | string | Minecraft version | `"1.21.11"` |
|
|
217
|
+
| `loaderVersion` | string | Loader version | `"0.18.4"` |
|
|
218
|
+
| `versionId` | string | Full version identifier | `"fabric-loader-0.18.4-1.21.11"` |
|
|
219
|
+
| `createdAt` | string | ISO timestamp of creation | `"2026-01-19T15:51:05.322Z"` |
|
|
220
|
+
| `mods` | array | List of installed mods | See below |
|
|
221
|
+
| `gameSettings` | object | Minecraft game settings | See below |
|
|
222
|
+
|
|
223
|
+
### Mods Array
|
|
224
|
+
|
|
225
|
+
Each mod entry contains:
|
|
226
|
+
|
|
227
|
+
| Field | Type | Description |
|
|
228
|
+
|-------|------|-------------|
|
|
229
|
+
| `projectId` | string | Modrinth project ID |
|
|
230
|
+
| `slug` | string | Modrinth project slug |
|
|
231
|
+
| `name` | string | Display name |
|
|
232
|
+
| `versionId` | string | Modrinth version ID |
|
|
233
|
+
| `versionNumber` | string | Version string |
|
|
234
|
+
| `fileName` | string | JAR filename |
|
|
235
|
+
| `installedAt` | string | Installation timestamp |
|
|
236
|
+
| `updatedAt` | string | Last update timestamp (if updated) |
|
|
237
|
+
|
|
238
|
+
### Game Settings
|
|
239
|
+
|
|
240
|
+
The `gameSettings` object stores Minecraft options that will be applied when creating an instance from this config. These correspond to entries in Minecraft's `options.txt`.
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# Capture current game settings to mcconfig.json
|
|
244
|
+
clicraft config capture
|
|
245
|
+
|
|
246
|
+
# View saved game settings
|
|
247
|
+
clicraft config game-settings
|
|
248
|
+
|
|
249
|
+
# Clear saved game settings
|
|
250
|
+
clicraft config clear-game-settings
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Common settings you might want to share:
|
|
254
|
+
- `renderDistance` - View distance (2-32)
|
|
255
|
+
- `fov` - Field of view (30-110)
|
|
256
|
+
- `guiScale` - GUI scale (0=auto, 1-4)
|
|
257
|
+
- `gamma` - Brightness (0.0-1.0)
|
|
258
|
+
- `maxFps` - Frame rate limit
|
|
259
|
+
- `lang` - Language code (e.g., "en_us")
|
|
260
|
+
|
|
261
|
+
## 🔄 Creating from Config
|
|
262
|
+
|
|
263
|
+
When you run `clicraft create` in a directory containing `mcconfig.json`, CLIcraft will:
|
|
264
|
+
|
|
265
|
+
1. Detect the existing configuration
|
|
266
|
+
2. Show the config details for confirmation
|
|
267
|
+
3. Prompt for a new instance name
|
|
268
|
+
4. Create the instance with the same settings
|
|
269
|
+
5. Install all mods from the config
|
|
270
|
+
6. Apply game settings (if present)
|
|
271
|
+
|
|
272
|
+
This is perfect for:
|
|
273
|
+
- Sharing modpack configurations
|
|
274
|
+
- Replicating setups across machines
|
|
275
|
+
- Creating instance templates
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
# Share your instance config
|
|
279
|
+
cp my-instance/mcconfig.json ~/shared-configs/
|
|
280
|
+
|
|
281
|
+
# Create a new instance from it
|
|
282
|
+
cd ~/shared-configs/
|
|
283
|
+
clicraft create
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## 🔐 Authentication Configuration
|
|
287
|
+
|
|
288
|
+
### Storage Location
|
|
289
|
+
```
|
|
290
|
+
~/.clicraft/auth.json
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Structure (DO NOT EDIT MANUALLY)
|
|
294
|
+
|
|
295
|
+
```json
|
|
296
|
+
{
|
|
297
|
+
"accessToken": "eyJ...",
|
|
298
|
+
"refreshToken": "M.R3...",
|
|
299
|
+
"expiresAt": 1705420800000,
|
|
300
|
+
"profile": {
|
|
301
|
+
"username": "Player123",
|
|
302
|
+
"uuid": "123e4567-e89b-12d3-a456-426614174000"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Security Notes
|
|
308
|
+
|
|
309
|
+
- **Never share this file** - it contains your account credentials
|
|
310
|
+
- **Keep it private** - set appropriate file permissions
|
|
311
|
+
- **Automatic management** - CLIcraft handles this file automatically
|
|
312
|
+
- **Token refresh** - CLIcraft refreshes tokens automatically
|
|
313
|
+
|
|
314
|
+
### File Permissions
|
|
315
|
+
|
|
316
|
+
On Linux/macOS, secure your auth file:
|
|
317
|
+
```bash
|
|
318
|
+
chmod 600 ~/.clicraft/auth.json
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
## 📁 Directory Structure
|
|
322
|
+
|
|
323
|
+
### Complete Instance Layout
|
|
324
|
+
|
|
325
|
+
```
|
|
326
|
+
my-instance/
|
|
327
|
+
├── mcconfig.json # Instance configuration (THIS FILE)
|
|
328
|
+
├── launch.sh # Generated launch script (reference)
|
|
329
|
+
├── assets/ # Game assets
|
|
330
|
+
│ ├── indexes/ # Asset indexes
|
|
331
|
+
│ ├── objects/ # Asset files
|
|
332
|
+
│ └── skins/ # Player skins cache
|
|
333
|
+
├── libraries/ # Java libraries
|
|
334
|
+
│ ├── com/ # Maven-style structure
|
|
335
|
+
│ ├── net/
|
|
336
|
+
│ └── ...
|
|
337
|
+
├── mods/ # Installed mods
|
|
338
|
+
│ ├── sodium-*.jar
|
|
339
|
+
│ ├── lithium-*.jar
|
|
340
|
+
│ └── ...
|
|
341
|
+
├── natives/ # Platform-specific libraries
|
|
342
|
+
│ ├── liblwjgl.so # Linux
|
|
343
|
+
│ ├── liblwjgl.dylib # macOS
|
|
344
|
+
│ └── lwjgl.dll # Windows
|
|
345
|
+
├── versions/ # Version JARs and metadata
|
|
346
|
+
│ ├── 1.21.1.jar
|
|
347
|
+
│ ├── 1.21.1.json
|
|
348
|
+
│ └── fabric-loader-*.jar
|
|
349
|
+
├── saves/ # World saves
|
|
350
|
+
│ ├── New World/
|
|
351
|
+
│ └── Creative Testing/
|
|
352
|
+
├── resourcepacks/ # Resource packs
|
|
353
|
+
├── shaderpacks/ # Shader packs (if using shaders)
|
|
354
|
+
├── config/ # Mod configuration files
|
|
355
|
+
├── logs/ # Game logs
|
|
356
|
+
│ ├── latest.log
|
|
357
|
+
│ └── 2024-01-15-1.log.gz
|
|
358
|
+
├── crash-reports/ # Crash reports (if crashes occur)
|
|
359
|
+
├── screenshots/ # In-game screenshots
|
|
360
|
+
└── options.txt # Game settings
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
## 🔍 Troubleshooting
|
|
365
|
+
|
|
366
|
+
### Invalid JSON
|
|
367
|
+
If you get JSON errors:
|
|
368
|
+
```bash
|
|
369
|
+
# Validate JSON
|
|
370
|
+
cat mcconfig.json | python -m json.tool
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
### Wrong Java Version
|
|
374
|
+
Verify Java path:
|
|
375
|
+
```bash
|
|
376
|
+
java --version
|
|
377
|
+
which java
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
Update `javaPath` in config.
|
|
381
|
+
|
|
382
|
+
### Memory Errors
|
|
383
|
+
If game crashes with memory errors:
|
|
384
|
+
- Reduce `-Xmx` value
|
|
385
|
+
- Close other applications
|
|
386
|
+
- Check available system RAM
|
|
387
|
+
|
|
388
|
+
### Config Not Applied
|
|
389
|
+
If changes don't take effect:
|
|
390
|
+
- Verify JSON syntax is valid
|
|
391
|
+
- Restart the game completely
|
|
392
|
+
- Check for typos in field names
|
|
393
|
+
|
|
394
|
+
## 📚 Related Commands
|
|
395
|
+
|
|
396
|
+
- [`clicraft config`](commands/config.md) - Manage CLI and game settings
|
|
397
|
+
- [`clicraft create`](commands/create.md) - Creates initial config
|
|
398
|
+
- [`clicraft info`](commands/info.md) - Shows current config
|
|
399
|
+
- [`clicraft launch`](commands/launch.md) - Uses config to launch
|
|
400
|
+
- [`clicraft upgrade`](commands/upgrade.md) - Updates version fields
|
|
401
|
+
|
|
402
|
+
## 🔗 See Also
|
|
403
|
+
|
|
404
|
+
- [Commands Overview](commands.md)
|
|
405
|
+
- [Installation Guide](installation.md)
|
|
406
|
+
- [Launch Command](commands/launch.md)
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
[← Back to Home](index.md)
|