docs / guide / aliases
bwrap 0.9.0 kernel 6.8.0 user-ns ✓
updated 0001-01-01 v0.5.1

Aliases

Define short names for frequently used inner commands

Aliases let you define short names for frequently used inner commands directly in your config file. They work like git aliases: the alias name is expanded into the configured command before argument parsing.

Defining aliases

Aliases are declared in the [aliases] table of ~/.config/inner/config.toml (global) or .config/inner.toml (local, directory-level):

[aliases]
review  = "run --profile code-review"
chat    = "run --profile claude-interactive"
oneshot = "run --profile claude-one-shot"

Using aliases

Once defined, the alias name works as a top-level inner subcommand:

inner review                      # → inner run --profile code-review
inner chat                        # → inner run --profile claude-interactive
inner oneshot -- fix the bug      # → inner run --profile claude-one-shot -- fix the bug

Any flags or extra arguments you pass after the alias name are appended to the expansion:

inner review --network            # → inner run --profile code-review --network
inner review -- "add unit tests"  # → inner run --profile code-review -- add unit tests

Global vs local aliases

Aliases follow the same global/local precedence as the rest of the config:

  • ~/.config/inner/config.toml — global, applies everywhere
  • .config/inner.toml — local (directory-level), overrides the global config for that directory

When the same alias key appears in both files, the local value wins.

# ~/.config/inner/config.toml
[aliases]
review = "run --profile code-review"   # used everywhere

# /my-project/.config/inner.toml
[aliases]
review = "run --profile my-project-review"  # used only inside /my-project

Precedence rules

  • Built-in commands are never shadowed. If an alias name collides with an existing inner subcommand (e.g. run, profile, config), the built-in takes precedence and the alias is ignored.
  • Aliases are expanded one level only — aliases cannot expand into other aliases.

Token expansion

The ${workspaces_path} token is expanded in alias values to the effective workspaces_path configured in the global or local config.toml. This lets you reference workspace directories without hardcoding absolute paths:

# ~/.config/inner/config.toml  (or .config/inner.toml for per-project)
workspaces_path = "~/Projects/workspaces"

[aliases]
myproject = "run -p myproject-profile"

The token is expanded when the alias is looked up, before the command is parsed. If workspaces_path is not configured the token is left as-is (which will cause an error at runtime if bwrap receives it as a path).

Limitations

  • Alias values are split on whitespace using strings.Fields. Quoted arguments with spaces (e.g. --arg "hello world") are not supported in the alias definition; pass them directly on the command line after the alias name.
  • Aliases cannot invoke external commands (no !-prefix like git). They must expand to an inner subcommand.
← Examples Profiles →