Environment Variables
PhilterScope can be configured using environment variables. These variables are particularly useful for sensitive information or for configuring shared resources like a database.
| Variable | Default | Description |
|---|---|---|
PHILTERSCOPE_OLLAMA_URL |
(none) | The URL of your Ollama server (e.g., http://localhost:11434). Required if you use the --ai flag. |
PHILTERSCOPE_OLLAMA_MODEL |
gemma4 |
The LLM model to use for AI-driven policy recommendations. |
PHILTERSCOPE_MONGODB_CONNECTION_STRING |
(none) | The MongoDB connection string for storing audit history (e.g., mongodb://localhost:27017/philterscope). If not set, audit history is stored in a local .philterscope directory. |
1. AI Recommendation Engine
To enable AI-driven redaction policy suggestions, PhilterScope integrates with Ollama, which allows you to run local Large Language Models (LLMs).
Usage:
export PHILTERSCOPE_OLLAMA_URL="http://localhost:11434"
export PHILTERSCOPE_OLLAMA_MODEL="gemma4"
./philterscope-audit --ai
If PHILTERSCOPE_OLLAMA_URL is not set, --ai prints a warning and the audit runs without AI recommendations. If
PHILTERSCOPE_OLLAMA_MODEL is not set, gemma4 is used.
2. Shared History Storage (MongoDB)
By default, PhilterScope stores your audit history in a local directory called .philterscope. If you want to share
this history across multiple users or machines, you can use a MongoDB database.
Usage:
export PHILTERSCOPE_MONGODB_CONNECTION_STRING="mongodb://user:password@localhost:27017/philterscope"
./philterscope-audit
When this variable is set, every successful audit run will automatically save the result to the MongoDB collection. The history feature will also prioritize results from MongoDB.
3. Local Configuration
If no environment variables are set, PhilterScope uses the following defaults:
- Audit History: Stored in a
.philterscopedirectory in the current working directory, one JSON file per audit. - Philter API: Defaults to
https://localhost:8080. - Ollama API: None. AI recommendations run only when
PHILTERSCOPE_OLLAMA_URLis set.