Quick Start
AutoHotkey is a powerful tool for scripting automations on Windows, but manually managing dependencies for your scripts is painful. ahkpm brings modern package management to AutoHotkey, making it easier than ever to automate away the drudgery.
On this page
Installation
- Download the ahkpm installer.
- Run the installer.
Basic usage
- Open the command line and navigate to the directory which will contain your AutoHotKey script.
- Run
ahkpm init
and answer the prompts to create anahkpm.json
file - Run
ahkpm install <package>@<version>
- The package can be any github repository in the form:
github.com/user/repo
- The version can be any of the following:
- A valid semantic version such as
1.0.0
- The prefix
tag:
followed by the name of a tag in the package’s repository, such astag:beta2
- The prefix
branch:
followed by the name of a branch in the package’s repository, such asbranch:main
- The prefix
commit:
followed by the hash of a commit in the package’s repository, such ascommit:badcce14f8e828cda4d8ac404a12448700de1441
- Omitting the version is not yet supported
- A valid semantic version such as
- The package can be any github repository in the form:
- Add
#Include, %A_ScriptDir%
to the top of your script to set the current directory as the context for subsequent includes - Add
#Include, ahkpm-modules\github.com\user\repo\main-file.ahk
to your script - You can now use the package’s functionality within your AutoHotKey script!
Current limitations
ahkpm is being actively developed, but it is still a young project. As a result it has the following limitations.
- It only supports hosting and downloading of packages on GitHub, though other git hosts will be supported in the future.
If you’d like to help remedy these limitations, consider contributing!