π Disable/Control AI features in Phoenix Code with deployment scripts for Windows, macOS, and Linux β made for schools and enterprise setups.
Phoenix Code AI Control provides system administrators and users with tools to manage AI functionality in educational and enterprise environments. This repository contains:
- Installation scripts for Windows, macOS, and Linux
- Browser detection for AI availability
- Windows 10/11, macOS 10.15+, or Ubuntu/Debian-based Linux
- Administrative access for system-wide installation
- Phoenix Code Desktop or Browser version
Configure AI controls by running the appropriate script for your platform:
Note: The following scripts configure system-wide settings and do not require Phoenix Code to be installed on the administrator's machine.
Download and run the appropriate script for your platform Download from this link.
- For Windows:
setup_phoenix_ai_control_win.bat
- For macOS:
setup_phoenix_ai_control_mac.sh
- For Linux:
setup_phoenix_ai_control_linux.sh
- Download the Windows Batch script:
setup_phoenix_ai_control_win.bat
- Open Command Prompt as Administrator:
- Press Win+X and select "Command Prompt (Admin)"
- Navigate to the download location using
cd
command
- Execute with parameters, for example:
Note: The
setup_phoenix_ai_control_win.bat --managedByEmail [email protected] --disableAI
--managedByEmail
parameter is optional but recommended
- Download the macOS script
- Open Terminal and navigate to your download location
- Run:
chmod +x setup_phoenix_ai_control_mac.sh
- Execute with parameters:
Note: The
sudo ./setup_phoenix_ai_control_mac.sh --managedByEmail [email protected] --disableAI
--managedByEmail
parameter is optional but recommended
- Download the Linux script
- Open Terminal and navigate to your download location
- Run:
chmod +x setup_phoenix_ai_control_linux.sh
- Execute with parameters:
Note: The
sudo ./setup_phoenix_ai_control_linux.sh --managedByEmail [email protected] --disableAI
--managedByEmail
parameter is optional but recommended
All installation scripts support the same command-line options:
Option | Description |
---|---|
--help |
Display usage information and help text |
--managedByEmail <email> |
Optional but recommended. Admin email who manages AI policy. Can be used in your Phoenix managed AI dashboard to selectively enable features and manage usage quotas |
--allowedUsers "<user1,user2,...>" |
Comma-separated list of usernames allowed to use AI even when disabled for others. IMPORTANT: Always enclose the list in quotes to prevent parsing errors |
--disableAI |
If present, AI will be disabled by default for all users except those specified in allowedUsers |
Here are quick examples for disabling and enabling AI on different platforms:
To disable AI for all users:
# Windows - in cmd(run as administrator)
setup_phoenix_ai_control_win.bat --disableAI --managedByEmail [email protected]
# macOS - Terminal
sudo ./setup_phoenix_ai_control_mac.sh --disableAI --managedByEmail [email protected]
# Linux - Bash
sudo ./setup_phoenix_ai_control_linux.sh --disableAI --managedByEmail [email protected]
To enable AI for all users:
# Windows - in cmd(run as administrator)
setup_phoenix_ai_control_win.bat --managedByEmail [email protected]
# macOS - Terminal
sudo ./setup_phoenix_ai_control_mac.sh --managedByEmail [email protected]
# Linux - Bash
sudo ./setup_phoenix_ai_control_linux.sh --managedByEmail [email protected]
# Enable AI without administrative contact
sudo ./setup_phoenix_ai_control_linux.sh
# Enable AI for specific users only (IMPORTANT: always use quotes for multiple users)
sudo ./setup_phoenix_ai_control_linux.sh --allowedUsers "alice,bob" --disableAI
# Complete setup with all options
sudo ./setup_phoenix_ai_control_linux.sh --managedByEmail [email protected] --allowedUsers "alice,bob" --disableAI
Note: Always replace
[email protected]
with an actual administrator email address. The scripts will detect and reject placeholder email addresses.
IMPORTANT: When specifying multiple users with
--allowedUsers
, always enclose the comma-separated list in quotes ("alice,bob"
) to prevent parsing errors on all platforms.
The scripts create configuration files in the following system-wide locations:
- Windows:
C:\Program Files\Phoenix AI Control\config.json
- macOS:
/Library/Application Support/Phoenix AI Control/config.json
- Linux:
/etc/phoenix-ai-control/config.json
These files contain your configuration, including the optional but recommended managedByEmail
field, and are created with read-only permissions for regular users. Only administrators can modify these files.
To verify the status of AI controls on end-user machines, the Phoenix Code AI Control extension must be installed:
- Open Phoenix Code
- Navigate to File β Extension Manager
- Search for "Phoenix Code AI Control"
- Click the Install button
- Restart Phoenix Code when prompted
- Open Phoenix Code
- Navigate to View β AI Control Status
- A dialog will appear showing your current configuration:
- AI Status (Enabled/Disabled)
- Platform information
- Current user
- Managed by (administrative contact)
- List of allowed users (if configured)
- Open Phoenix Code in your web browser
- Install the extension (File β Extension Manager β "Phoenix Code AI Control")
- Navigate to View β AI Control Status
- The browser will check if
ai.phcode.dev
is accessible:- First shows "Checking if AI is disabled..."
- Then displays whether AI is available or blocked
- Provides information on firewall configuration
For desktop installations of Phoenix Code, we strongly recommend using the installation scripts described above. This approach provides:
- System-wide configuration via protected config files
- Granular control with user-level permissions
- Ability to selectively enable AI for specific users
Only administrative users can modify this configuration.
Network Blocking (For Browser Version at https://phcode.dev)
For schools using the browser version of Phoenix Code, network-level blocking is the recommended approach:
- Block access to:
ai.phcode.dev
- Add this domain to your firewall or content filtering system
The browser version of Phoenix Code will automatically detect if the domain is unreachable and display appropriate status messages.
Phoenix Code AI will be rolled out after May 20, 2025. Educational institutions should configure AI controls campus-wide before this date.
In both the desktop and browser versions, go to View β AI Control Status to see a detailed report.
Yes, but only in the desktop version. Use the --allowedUsers
parameter with a comma-separated list of usernames when running the installation script. These users will be able to access AI features even when disabled system-wide with the --disableAI
flag.
No, AI control is optional and meant for educational institutions or enterprises that need to regulate AI usage. By default, all users have access to AI features.
No, all other features of Phoenix Code will continue to work normally. Only the AI-powered features like code generation and explanations will be affected.
Simply run the installation script again with the new parameters. The script will overwrite the existing configuration file with your new settings.
To re-enable AI that was previously disabled:
-
Run the installation script again without the
--disableAI
flag:# Windows - in cmd(run as administrator) setup_phoenix_ai_control_win.bat --managedByEmail [email protected] # macOS sudo ./setup_phoenix_ai_control_mac.sh --managedByEmail [email protected] # Linux sudo ./setup_phoenix_ai_control_linux.sh --managedByEmail [email protected]
-
For browser version, remove any firewall rules blocking
ai.phcode.dev
- Browser Version: Only supports network-level blocking of
ai.phcode.dev
through your firewall - Desktop Version: Provides comprehensive control through configuration files with user-specific permissions
- Desktop Version: Yes, the control is comprehensive when properly configured using the installation scripts
- Browser Version: Only if you implement network-level blocking of the
ai.phcode.dev
domain
In the browser version, use the View β AI Control Status option which will attempt to connect to the AI service and report whether it's accessible or blocked.
Yes, use the --disableAI
flag to disable AI globally, then use the --allowedUsers
parameter to specify which users should still have access. Example:
sudo ./setup_phoenix_ai_control_linux.sh --disableAI --allowedUsers "teacher1,admin2"
When you set the --managedByEmail
parameter, this information is used for administration purposes. Future versions will provide a dashboard for administrators to monitor and manage AI usage across their organization.
For more information about controlling AI in educational institutions, visit: https://docs.phcode.dev/docs/control-ai
To contribute to this project:
- Clone the repository
- Make your changes
- Test on all supported platforms
- Submit a pull request