# Commands

## Version

You can check the version of your aux4 CLI tool.

```bash
> aux4 aux4 version
```

```text
   aux4 5.0.0
   2025 aux4. aux4 is created and maintained by the aux4 community.
   https://aux4.io
```

## Man

Display the documentation of the command.

```bash
> aux4 aux4 man aux4 version
```

```text
version
Display the version of aux4.
```

It's the same as using `--help`.

```bash
> aux4 aux4 version --help
```

```text
version
Display the version of aux4.
```

## Source

Display the source code of the command.

```bash
> aux4 aux4 source aux4 man
```

```text
1 set:help=true
2 profile:main
```

It's the same as using `--showSource`

```bash
> aux4 aux4 man --showSource
```

```text
1 set:help=true
2 profile:main
```

## Which

Display where the command is defined.

```bash
> aux4 aux4 which aux4 version
```

```text
aux4/aux4@5.0.0 aux4 → version
```

For local `.aux4` files, it will display the path to the file.

```bash
> aux4 aux4 which hello
```

```text
.aux4 main → hello
/Users/user/my-scripts/.aux4
```

It's the same as using `--whereIsIt`

```bash
> aux4 aux4 version --whereIsIt
```

```text
aux4/aux4@5.0.0 aux4 → version
```

## Shell

Start an interactive aux4 shell where you can run commands without the `aux4` prefix. Type `exit` to quit.

```bash
> aux4 aux4 shell
```

```text
aux4> hello --name World
Hello World
aux4> exit
```

When stdin is piped, it runs in batch mode, executing each line as a command:

```bash
> echo "hello --name World" | aux4 aux4 shell
```

```text
Hello World
```

## Completion

Generate shell completion scripts for your shell. Supports `bash`, `zsh`, `fish`, and `powershell`.

```bash
> aux4 aux4 completion --shell zsh
```

Add it to your shell profile for automatic tab completion of aux4 commands, flags, and option values.

For **zsh**, add this to your `~/.zshrc`:

```bash
eval "$(aux4 aux4 completion --shell zsh)"
```

For **bash**, add this to your `~/.bashrc`:

```bash
eval "$(aux4 aux4 completion --shell bash)"
```

## Hooks

List all registered hooks in the current environment. Hooks are cross-cutting interceptors that run before, after, or on error of any command.

```bash
> aux4 aux4 hooks
```

Filter by command pattern:

```bash
> aux4 aux4 hooks --command "main/deploy"
```

Filter by package:

```bash
> aux4 aux4 hooks --package mycompany/deploy-hooks
```

You can also use `--showHooks` on any command to see its hooks:

```bash
> aux4 deploy --showHooks
```

See [Hooks](/hooks) for full documentation.

## Global Flags

These flags control how aux4 loads configuration:

### --local

Only load `.aux4` files from the current directory. By default, aux4 traverses parent directories and loads all `.aux4` files it finds.

```bash
> aux4 -local hello --name World
```

### --noPackages

Don't load installed packages from `~/.aux4.config/`. Only local `.aux4` files are loaded.

```bash
> aux4 -noPackages hello --name World
```

---

## See Also

- [Variables](/variables)
- [Executors](/executors)
- [Functions](/functions)
- [Config](/config)
- [Testing](/testing)
- [Package Manager](/package-manager)
- [Packaging](/packaging)
- [Docker](/docker)
