OpenAI Integration Guide
Configure emoji control for Codex CLI and OpenAI API
OpenAI Codex CLI - Quick Setup
OpenAI Codex is an AI coding agent included in ChatGPT Plus, Pro, Business, Edu, and Enterprise plans. Configure it to generate emoji-free code.
1. Install Codex CLI
npm i -g @openai/codex2. Download nomoji rules
curl https://nomoji.dev/api/template/default/openai-codex -o ~/nomoji-codex.md3. Configure Codex system instructions
codex config --system-instructions ~/nomoji-codex.mdNote: Check Codex documentation for the exact configuration command as it may vary
4. Verify it works
Test with a simple prompt:
codex "Create a hello world Express server"Output should be emoji-free
Project-Specific Configuration
Add nomoji rules to your project:
# In your project root
mkdir -p .codex
curl https://nomoji.dev/api/template/default/openai-codex -o .codex/nomoji.md
# Configure per-project (if supported)
codex config --local --system-instructions .codex/nomoji.md
# Commit to version control
git add .codex/
git commit -m "Add Codex nomoji configuration"How It Works
Once configured, Codex will:
- Generate code without emojis in any context
- Use plain ASCII for console output and progress indicators
- Create professional documentation and README files
- Write clean commit messages and code comments
- Follow emoji-free guidelines across all file operations
OpenAI API - Integration Guide
Use nomoji rules as system instructions when calling the OpenAI API for code generation.
1. Download system instructions
curl https://nomoji.dev/api/template/default/openai -o nomoji-system-prompt.md2. Load and use in your code
import OpenAI from 'openai';
import fs from 'fs';
const client = new OpenAI();
const systemPrompt = fs.readFileSync('nomoji-system-prompt.md', 'utf-8');
const response = await client.chat.completions.create({
model: 'gpt-4',
messages: [
{ role: 'system', content: systemPrompt },
{ role: 'user', content: 'Create a Node.js server' }
]
});3. Or fetch dynamically
const response = await fetch(
'https://nomoji.dev/api/template/default/openai'
);
const systemPrompt = await response.text();
// Use in OpenAI API calls
const completion = await client.chat.completions.create({
model: 'gpt-4',
messages: [
{ role: 'system', content: systemPrompt },
{ role: 'user', content: userPrompt }
]
});Recommended Models
For best emoji-free results, use reasoning models which better follow constraints:
o1- Best at following strict no-emoji instructionso3-mini- Cost-effective with strong instruction followingo3-mini-high- Enhanced reasoning for code generationgpt-4- Works well but may occasionally include emojisgpt-4-turbo- Fast with good instruction adherence
Note: GPT-4o was designed to use more emojis. For code generation, prefer the models listed above.
API Best Practices
- Always include the system prompt in your API calls
- Use temperature=0 for more deterministic, professional output
- Consider caching the system prompt to reduce token usage
- Monitor completions and provide feedback if emojis appear
- Use reasoning models for stricter constraint adherence
Troubleshooting
Codex: Rules not being applied?
- Verify Codex is installed:
codex --version - Check your ChatGPT plan includes Codex access
- Re-apply configuration with updated rules
- Try setting rules per-project instead of globally
API: Emojis still appearing in responses?
- Verify system prompt is included in messages array
- Try switching to o1 or o3-mini models
- Set temperature to 0 for more consistent output
- Check your system prompt is the first message in the array
- Refresh rules:
curl https://nomoji.dev/api/template/default/openai