-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Command line arguments zh HK
ASF ๆฏๆดไธไบ่ฝๅค ๅฝฑ้ฟ็จๅผ้่กๆ็ๅฝไปคๅๅๆธใ ้ซ็ด็จๆถๅฏไฝฟ็จ้ไบๅๆธไปฅๅฎ็พฉ็จๅผ้่กๆนๅผใ ่ASF.json
้
็ฝฎๆไปถ็้ ่จญๆนๅผ็ธๆฏ๏ผๅฝไปคๅๅๆธๅฏ็จๆผๆ ธๅฟๅๅงๅ๏ผไพๅฆ--path
๏ผใๅนณๅฐ็นๅฎ่จญ็ฝฎ๏ผไพๅฆ--system-required
๏ผๆๆๆๆง่ณๆ๏ผไพๅฆ--cryptkey
๏ผใ
ไฝฟ็จๆนๆณๅๆฑบๆผๆจ็ๆไฝ็ณป็ตฑๅASF็ๆฌใ
Generic๏ผ้็จ๏ผ:
dotnet ArchiSteamFarm.dll --ๅๆธ -- ๅฆไธๅๅๆธ
Windows:
.\ArchiSteamFarm.exe --ๅๆธ--ๅฆไธๅๅๆธ
Linux/macOS:
./ArchiSteamFarm --ๅๆธ--ๅฆไธๅๅๆธ
ๅฝไปคๅๅๆธไนๅฏ็จๆผ้็จๅฉๆ่
ณๆฌไธญ๏ผไพๅฆArchiSteamFarm.cmd
ๆArchiSteamFarm.sh
ใ In addition to that, you can also use ASF_ARGS
environment property, like stated in our management and docker sections.
่ฅๆจ็ๅๆธๅ ๅซ็ฉบๆ ผ๏ผ่ซๅๅฟ ไฝฟ็จๅผ่ๅฐๅ ถๆฌไฝใ ๅ ฉๅ้ฏ่ชค็คบไพ๏ผ
./ArchiSteamFarm --path /home/archi/My Downloads/ASF # Bad!
./ArchiSteamFarm --path=/home/archi/My Downloads/ASF # Bad!
ๅ ฉๅๆญฃ็ขบ็คบไพ๏ผ
./ArchiSteamFarm --path "/home/archi/My Downloads/ASF" # OK
./ArchiSteamFarm "--path=/home/archi/My Downloads/ASF" # OK
--cryptkey<key>
ๆ--cryptkey=<key>
โโๅฐไฝฟ็จๅผ็บ<key>
็่ช่จๅฏ้ฐๅๅ ASFใ ๆญค้ธ้
ๆๅฝฑ้ฟ**ๅฎๅ
จๆง**๏ผไธฆๅฐๅฐ่ดASFไฝฟ็จๆจ็่ช่จๅฏ้ฐ <key>
๏ผ่ไธๆฏ็กฌ็ทจ็ขผๅจ็จๅผไธญ็้ ่จญๅผใ Since this property affects default encryption key (for encrypting purposes) as well as salt (for hashing purposes), keep in mind that everything encrypted/hashed with this key will require it to be passed on each ASF run.
There is no requirement on <key>
length or characters, but for security reasons we recommend to pick long enough passphrase made out of e.g. random 32 characters, for example by using tr -dc A-Za-z0-9 < /dev/urandom | head -c 32; echo
command on Linux.
It's nice to mention that there are also two other ways to provide this detail: --cryptkey-file
and --input-cryptkey
.
Due to the nature of this property, it's also possible to set cryptkey by declaring ASF_CRYPTKEY
environment variable, which may be more appropriate for people that would want to avoid sensitive details in the process arguments.
--cryptkey-file <path>
or --cryptkey-file=<path>
- will start ASF with custom cryptographic key read from <path>
file. This serves the same purpose as --cryptkey <key>
explained above, only the mechanism differs, as this property will read <key>
from provided <path>
instead.
Due to the nature of this property, it's also possible to set cryptkey file by declaring ASF_CRYPTKEY_FILE
environment variable, which may be more appropriate for people that would want to avoid sensitive details in the process arguments.
--ignore-unsupported-environment
- will cause ASF to ignore problems related to running in unsupported environment, which normally is signalized with an error and a forced exit. Unsupported environment includes for example running .NET Framework build on platform that could be running .NET (Core) build instead. While this flag will allow ASF to attempt running in such scenarios, be advised that we do not support those officially and you're forcing ASF to do it entirely at your own risk. As of today, all of the unsupported environment scenarios can be corrected, such as running generic
build instead of generic-netf
. We strongly recommend to fix the outstanding problems instead of declaring this argument.
--input-cryptkey
- will make ASF ask about the --cryptkey
during startup. This option might be useful for you if instead of providing cryptkey, whether in environment variables or a file, you'd prefer to not have it saved anywhere and instead input it manually on each ASF run.
--minimized
- will make ASF console window minimize shortly after start. Useful mainly in auto-start scenarios, but can also be used outside of those. Currently this switch has effect only on Windows machines.
--network-group <group>
or --network-group=<group>
- will cause ASF to init its limiters with a custom network group of <group>
value. This option affects running ASF in multiple instances by signalizing that given instance is dependent only on instances sharing the same network group, and independent of the rest. Typically you want to use this property only if you're routing ASF requests through custom mechanism (e.g. different IP addresses) and you want to set networking groups yourself, without relying on ASF to do it automatically (which currently includes taking into account WebProxy
only). Keep in mind that when using a custom network group, this is unique identifier within the local machine, and ASF will not take into account any other details, such as WebProxy
value, allowing you to e.g. start two instances with different WebProxy
values which are still dependent on each other.
Due to the nature of this property, it's also possible to set the value by declaring ASF_NETWORK_GROUP
environment variable, which may be more appropriate for people that would want to avoid sensitive details in the process arguments.
--no-config-migrate
- by default ASF will automatically migrate your config files to latest syntax. Migration includes conversion of deprecated properties into latest ones, removing properties with default values (as they have no effect), as well as cleaning up the file in general (correcting indentation and likewise). This is almost always a good idea, but you might have a particular situation where you'd prefer ASF to never overwrite the config files automatically. For example, you might want to chmod 400
your config files (read permission for the owner only) or put chattr +i
over them, in result denying write access for everyone, e.g. as a security measure. Usually we recommend to keep the config migration enabled, but if you have a particular reason for disabling it and would instead prefer ASF to not do that, you can use this switch for achieving that purpose.
--no-config-watch
- by default ASF sets up a FileSystemWatcher
over your config
directory in order to listen for events related to file changes, so it can interactively adapt to them. For example, this includes stopping bots on config deletion, restarting bot on config being changed, or loading keys into BGR once you drop them into the config
directory. This switch allows you to disable such behaviour, which will cause ASF to completely ignore all the changes in config
directory, requiring from you to do such actions manually, if deemed appropriate (which usually means restarting the process). We recommend to keep the config events enabled, but if you have a particular reason for disabling them and would instead prefer ASF to not do that, you can use this switch for achieving that purpose.
--no-restart
โโๆญค้้ไธป่ฆ็จๆผ**Docker**โๅฎนๅจไธฆๅฐ AutoRestart
ๅผทๅถ่จญ็ฝฎ็บ false
ใ Unless you have a particular need, you should instead configure AutoRestart
property directly in your config. This switch is here so our docker script won't need to touch your global config in order to adapt it to its own environment. ็ถ็ถ๏ผๅฆๆๆจๅจ่
ณๆฌไธญ้่ก ASF๏ผไนๅฏไปฅไฝฟ็จๆญค้้๏ผๅฆๅๆจๆๅฅฝไฝฟ็จๅ
จๅ้
็ฝฎๅฑฌๆง๏ผใ
--no-steam-parental-generation
- by default ASF will automatically attempt to generate Steam parental PINs, as described in SteamParentalCode
configuration property. However, since that might require excessive amount of OS resources, this switch allows you to disable that behaviour, which will result in ASF skipping auto-generation and go straight to asking user for PIN instead, which is what would normally happen only if the auto-generation has failed. Usually we recommend to keep the generation enabled, but if you have a particular reason for disabling it and would instead prefer ASF to not do that, you can use this switch for achieving that purpose.
--path <path>
ๆ--path=<path>
โโASFๅจๅๅๆๅง็ตๆๅฐ่ช่ณ่ช่บซๆๅจ็็ฎ้ใ By specifying this argument, ASF will navigate to given directory after initialization, which allows you to use custom path for various application parts (including config
, plugins
and www
directories, as well as NLog.config
file), without a need of duplicating binary in the same place. ๅฆๆๆจๆณๅฐไบ้ฒไฝๆชๆกๅๅฏฆ้้
็ฝฎๆชๆกๅ้๏ผ้ๅฏ่ฝๆ้ๅธธๆ็จ๏ผ้กไผผLinux ๆๅ
ๆฉๅถโโ้ๆจฃๆจๅฐฑๅฏไปฅๅจๅคๅ่จญ็ฝฎไธญๅ
ฑ็จไธๅ๏ผๆๆฐ็๏ผไบ้ฒไฝๆชๆกใ ๆญค่ทฏๅพๆขๅฏไปฅๆฏๅบๆผ็ถๅ ASF ไบ้ฒไฝๆชๆกๆๅจไฝ็ฝฎ็็ธๅฐ่ทฏๅพ๏ผไนๅฏไปฅๆฏ็ตๅฐ่ทฏๅพใ Keep in mind that this command points to new "ASF home" - the directory that has the same structure as original ASF, with config directory inside, see below example for explanation.
Due to the nature of this property, it's also possible to set expected path by declaring ASF_PATH
environment variable, which may be more appropriate for people that would want to avoid sensitive details in the process arguments.
If you're considering using this command-line argument for running multiple instances of ASF, we recommend reading our management page on this manner.
็ฏไพ:
dotnet /opt/ASF/ArchiSteamFarm.dll --path /opt/TargetDirectory # Absolute path
dotnet /opt/ASF/ArchiSteamFarm.dll --path ../TargetDirectory # Relative path works as well
ASF_PATH=/opt/TargetDirectory dotnet /opt/ASF/ArchiSteamFarm.dll # Same as env variable
โโโ /opt
โ โโโ ASF
โ โ โโโ ArchiSteamFarm.dll
โ โ โโโ ...
โ โโโ TargetDirectory
โ โโโ config
โ โโโ logs (generated)
โ โโโ plugins (optional)
โ โโโ www (optional)
โ โโโ log.txt (generated)
โ โโโ NLog.config (optional)
โโโ ...
--process-required
โโ้ ่จญๆ
ๆณไธ๏ผASF ๅฐๆๅจ็กๆฉๆขฐไบบ้่ก็ๆ
ๆณไธ้้๏ผ่ฒๆๆญค้้ๅฐ็ฆ็จ้ไธ่ก็บใ ้ปๆญข่ชๅ้ๆฉๅ่ฝๅจๅ**IPC**้
ๅไธ็นๅฅๆ็จ๏ผๅคงๅคๆธ็จๆถ้ฝๅธๆไปๅ็ Web ๆๅๆญฃๅธธ้่ก๏ผ็ก่ซๅ็จไบๅคๅฐๅๆฉๆขฐไบบใ ๅฆๆๆจๅจไฝฟ็จ IPC ๆ่
้่ฆ ASF ้ฒ็จๆ็บ้่ก็ด่ณๆๅ้้ๅฎ๏ผ้ๅฐฑๆฏๆญฃ็ขบ็้ธ้
ใ
ๅฆๆๆจไธๆ็ฎ้่ก IPC๏ผๆญค้ธ้ ๅฐๆจไพ่ชชๅฐ็ธ็ถ็ก็จ๏ผ ๅ ็บๆจๅฏไปฅๅจ้่ฆๆๅๆฌกๅๅ่ฉฒ้็จ (่ไธๆฏ ASF ็ web ไผบๆๅจ๏ผๅจ้ฃ่ฃๆจ้่ฆๅฎไธ็ดๅต่ฝไปฅ็ผ้ๅฝไปค)ใ
--service
- this switch is mainly used by our systemd
service and forces Headless
of true
. Unless you have a particular need, you should instead configure Headless
property directly in your config. This switch is here so our systemd
service won't need to touch your global config in order to adapt it to its own environment. Of course, if you have a similar need then you may also make use of this switch (otherwise you're better with global config property).
--system-required
โโ่ฒๆๆญค้้ๅฐๅฐ่ด ASF ๅ่ฉฆ้็ฅๆไฝ็ณป็ตฑใๆญค้ฒ็จ่ฆๆฑ็ณป็ตฑๅจๅ
ถๅญ็ๆๅ
ง่ๆผๅๅ็ๆ
ไธฆๆญฃๅธธ้่กใใ ็ถๅ๏ผๆญค้้ๅ
ๅฐ Windows ้ป่
ฆๆๆ๏ผๅช่ฆASF้ฒ็จๆญฃๅจ้่ก๏ผๅฎๅฐฑๆ้ปๆญขๆจ็็ณป็ตฑ้ฒๅ
ฅ็ก็ ๆจกๅผใ This can be proven especially useful when farming on your PC or laptop during night, as ASF will be able to keep your system awake while it's farming, then, once ASF is done, it'll shutdown itself like usual, making your system allowed to enter into sleep mode again, therefore saving power immediately once farming is finished.
่ซๆณจๆ๏ผ่ฆ่ฎฉ ASFๆญฃ็ขบๅฐ่ชๅ้้๏ผๆจ้้่ฆๅ
ถไป่จญ็ฝฎโโ็นๅฅๆฏ้ฟๅ
--process-required
๏ผไธ็ขบไฟๆๆๆฉๆขฐไบบ้ฝๅทฒๅ็จ ShutdownOnFarmingFinished
ใ ็ถ็ถ๏ผ่ชๅ้ๆฉๅชๆฏ้ๅๅๆธ็็จๆณไนไธ๏ผ่้ๅฟ
้๏ผๅ ็บๆจ้ๅฏไปฅๅฐๆญคๅๆธ้
ๅ --process-required
ไฝฟ็จ๏ผๅพ่ๆๆๅฐไฝฟๆจ็็ณป็ตฑๅจ ASF ๅๅไนๅพ็ก้้่กไธๅปใ
- ๐ก Home
- ๐ง Configuration
- ๐ฌ FAQ
- โ๏ธ Setting up (start here)
- ๐ฅ ๅพๅฐๅบ่ๅๅๅจ
- ๐ข Commands
- ๐ ๏ธ Compatibility
- ๐งฉ ItemsMatcherPlugin
- ๐ Management
- โฑ๏ธ Performance
- ๐ก Remote communication
- ๐ช Steam ่ฆชๅๅไบซ
- ๐ Trading