# Import Alias

**Flag:** `--import-alias`

Import Alias rewrites every `import X` statement to `import X as <obfuscated>` and replaces all usages of the original module name throughout the file. This hides which modules the script depends on from casual inspection.

## Example

**Before:**

```python
import math
import hashlib

print(math.sqrt(9))
digest = hashlib.sha256(b"hello").hexdigest()
```

**After:**

```python
import math as IlIlIIlIII
import hashlib as IIlIlIlIll

print(IlIlIIlIII.sqrt(9))
digest = IIlIlIlIll.sha256(b"hello").hexdigest()
```

## What is handled

* Simple `import X` statements
* Multi-import `import X, Y` statements (each name aliased separately)
* All usages of the original name in the file body

## What is not handled

* `from X import Y` statements (the module name `X` does not appear in the resulting code, so aliasing it has no effect)
* Names already aliased with `as` in the original source

## Notes

* Combine with `--carbon` to also rename variables and function names alongside the import aliases.
* The aliased names follow the same `I`/`l` random format as Carbon.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rodolphes-organization.gitbook.io/anubis/features/import-alias.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
