See Issues for known limitations and upcoming improvements.
- Click "Code"
- Download ZIP (no Git required)
OR
git clone https://github.com/NSA-Computer-Exchange/ion-scripts
A complete automation toolkit for developing, deploying, and managing Infor ION Python scripts without using the Infor UI. Designed for teams using VS Code, GitHub, and GitHub Actions.
ION Scripts is a CLI-driven solution that implements a fully automated, API-driven workflow for Infor ION script development and deployment. Write scripts locally, version them in Git, deploy automatically to ION, approve via API, and execute in CI/CD pipelines.
- Interactive CLI Menu - User-friendly interface for all script operations
- Script Management - Create, deploy, update, approve, and run scripts via API
- Format Control - Set input/output formats (Text, JSON, XML, CSV, Base64)
- Status Monitoring - Check script deployment and execution status
- Authentication - OAuth password credentials grant with secure token management
- Template Generation - Quickly bootstrap new scripts with standard structure
- No UI Dependency - Full automation without accessing the Infor interface
- Local development with VS Code
- Git version control for all scripts
- GitHub Actions CI/CD integration
- Consistent tooling between local and CI environments
- Automatic script validation
- OAuth 2.0 authentication
- No secrets committed to source control
- Token-based API access
- Environment variable configuration
- Idempotent deployments (create or update)
- Python 3.9+ (3.12+ recommended)
- macOS/Linux (tested on macOS, requires Homebrew Python on macOS due to LibreSSL issues)
- pip and virtual environment support
git clone https://github.com/yourusername/ion-scripts.git
cd ion-scriptspython3 -m venv env
source env/bin/activate # On macOS/Linuxpip install -r requirements.txt
pip install -e .This installs:
requests- HTTP library for API callsquestionary- Interactive CLI promptsrich- Rich terminal output formatting
Before using ION Scripts, you need to set up authentication credentials.
ion set-authThis will guide you through providing your ION credentials interactively and create a .ionapi configuration file.
Create a .env file in the project root with your Infor ION credentials:
ION_AUTH_URL=https://your-auth-endpoint/oauth/token
ION_API_URL=https://your-api-endpoint
ION_CLIENT_ID=your_client_id
ION_CLIENT_SECRET=your_client_secret
ION_USERNAME=your_username
ION_PASSWORD=your_password** Important:** Never commit .env or .ionapi files to version control. Add them to .gitignore.
ION uses two distinct endpoints:
- OAuth/SSO Endpoint - For authentication (returns access token)
- ION API Endpoint - For script deployment, approval, and execution
Start the interactive menu:
ion menuThis presents an easy-to-use interface for all operations:
- New script
- Deploy script
- Approve script
- Run script
- Check script status
- Update script
- Set input/output formats
- Configure authentication
If you prefer direct commands:
ion newCreates a new script template with the following structure:
scripts/YourScript/
├── script.py # Your Python script logic
├── model.json # ION script model configuration
├── meta.json # Script metadata
└── test-input.txt # Sample test input
ion deploy YourScriptDeploys your script to ION. If the script doesn't exist, it creates a new version. If it already exists, it updates the current version.
ion approve YourScriptApproves the deployed script for production use.
ion run YourScriptExecutes your script in ION and displays results.
ion check YourScriptDisplays the current deployment status and metadata of the script.
ion update YourScriptUpdates an existing deployed script with new code.
ion set-format YourScript --input JSON
ion set-format YourScript --output CSVSupported formats: Text, JSON, XML, CSV, Base64
ion set-authSet up or update your ION API credentials.
ion-scripts/
├── ioncli/ # CLI application code
│ ├── __init__.py
│ └── cli.py # Main CLI entry point
├── security/ # Authentication & token management
│ ├── auth.py # OAuth authentication
│ ├── iontoken.py # Token handling
│ └── setauth.py # Credential setup
├── tools/ # Core functionality
│ ├── approve.py # Script approval
│ ├── check.py # Status checking
│ ├── deploy.py # Script deployment
│ ├── menu.py # Interactive menu
│ ├── newscript.py # Script generation
│ ├── run.py # Script execution
│ ├── setformat.py # Format configuration
│ └── update.py # Script updates
├── scripts/ # Your ION scripts
│ ├── Script1/
│ ├── Script2/
│ └── ...
├── tests/ # Testing outputs
├── env/ # Python virtual environment
├── pyproject.toml # Project metadata
├── requirements.txt # Python dependencies
└── README.md # This file
- No UI Dependency - Fully API-driven, no need for Infor UI
- One Repository, Many Scripts - Organize multiple scripts in one place
- One Folder = One Script - Clear, intuitive structure
- Idempotent Deployments - Deploy safely; scripts are created or updated as needed
- No Secrets in Source Control - Credentials stored separately
- Consistent Tooling - Same workflow locally and in CI/CD
Issue: "Missing one or more required environment variables"
Solution: Ensure all required environment variables are set or run ion set-auth to configure credentials interactively.
Issue: Commands freeze or hang on macOS
Solution: macOS system Python uses LibreSSL and can hang on ION API calls. Use Homebrew Python instead:
brew install python@3.14
/usr/local/bin/python3.14 -m venv envIssue: "Script not found" error when running commands
Solution: Ensure your script folder exists in the scripts/ directory with the correct name, matching the name you use in commands.
To contribute to ION Scripts:
- Create a new branch for your feature
- Make your changes
- Test locally using the CLI
- Submit a pull request
See requirements.txt for the complete list of dependencies:
requests- HTTP operations for API callsquestionary- Interactive prompt libraryrich- Terminal formatting and UI
For issues or questions:
- Check the troubleshooting section above
- Review the authentication configuration steps
- Ensure your Python environment is properly configured