Skip to content

04 ‐ Configuration

Mojo8898 edited this page Oct 23, 2026 · 1 revision

Aliasr is configured via a single TOML file. Refer to the built-in config.toml for every available option. Configuration is loaded in this order (highest priority first):

  1. ALIASR_CONFIG (if set)
  2. $ALIASR_HOME/config.toml (defaults to ~/.aliasr/config.toml)
  3. $XDG_CONFIG_HOME/aliasr/config.toml (if XDG_CONFIG_HOME is set)
  4. ~/.config/aliasr/config.toml
  5. Built-in defaults shipped with Aliasr

If multiple locations exist, the first one found wins.

On first run Aliasr creates ~/.aliasr/ and drops an editable copy of the default config.toml there; your edits are merged over the built-in defaults at runtime. Globals live beside it at ~/.aliasr/globals.json (a pre-existing ~/.aliasr.json is migrated automatically). Set ALIASR_HOME to relocate the whole folder.

A few notable options:

  • [creds].confirm_delete - prompt before deleting a row in the credentials/hosts menu (set false for one-key deletes).
  • [nxc].block_bulk_delete - forbid the clear commands from deleting anything in NetExec (see Credentials and Hosts).

Keeping your config current

When aliasr starts and your config.toml is missing options that a newer version added, it lists them and offers to back your file up to config.toml.bak and drop in the current defaults. Decline (or run non-interactively) and it simply proceeds - the missing options still take their default values, since your file is merged over the built-in defaults either way.

Projects

Aliasr supports project-specific configs with the tool direnv.

To create an Aliasr project, set ALIASR_CONFIG to point to either a file (e.g. /path/to/.aliasr.toml) or a directory (Aliasr will use <dir>/config.toml).

Example layout:

/root/projects/
├── project-1/
│   ├── .envrc                   # direnv config
│   ├── .aliasr.toml             # local aliasr config
│   ├── .aliasr-globals.json     # project-specific globals
│   ├── .credentials.db          # project-specific creds (SQLite)
│   ├── exploits/
│   ├── loot/
│   └── scans/
└── project-2/
    ├── .envrc
    ├── .aliasr.toml
    └── ...

Example .envrc:

export ALIASR_MACHINE_DIR="$PWD"
export ALIASR_CONFIG="$PWD/.aliasr.toml"

Example .aliasr.toml:

[globals]
path = "${ALIASR_MACHINE_DIR}/.aliasr-globals.json"

[creds]
db = "${ALIASR_MACHINE_DIR}/.credentials.db"

[globals.defaults]
ip       = ["10.10.11.123"]
hostname = ["machine-1"]
domain   = ["htb.local"]
fqdn     = ["machine-1.htb.local"]
lhost    = ["10.10.14.5"]
lport    = ["4444"]

Load and apply the changes in .envrc with:

direnv allow

Then verify the configuration is being picked up:

aliasr audit --config

For a project created in /root/projects/project-1/ you should see, for example:

  ✓ ALIASR_CONFIG /root/projects/project-1/.aliasr.toml
  ...
  ✓ Globals file: /root/projects/project-1/.aliasr-globals.json
  ...
  ✓ Credentials DB (Exegol-history): /root/projects/project-1/.credentials.db

Clone this wiki locally