-
Notifications
You must be signed in to change notification settings - Fork 2
Installation
Setting up the Principles Framework is straightforward. Follow the steps below to install and configure the framework on your local machine.
Before installing Principles, ensure that your system meets the following requirements:
- Node.js: Version 14 or higher
-
npm or Yarn:
- npm version 6 or higher
- Yarn version 1.22 or higher
- OpenAI API Key: Required to utilize OpenAI's GPT models for natural language processing.
Begin by cloning the Principles repository from GitHub:
git clone https://github.com/miltonian/principles.git
cd principlesInstall the necessary dependencies using npm or Yarn:
npm install
# or
yarn installCreate a .env file in the root directory of the project and add your OpenAI API key:
OPEN_AI_TOKEN=your-openai-api-keyNote: Replace your-openai-api-key with your actual OpenAI API key. If you do not have an API key, you can obtain one by signing up on the OpenAI website.
Ensure that your .env file is ignored in version control to protect sensitive information. Verify that your .gitignore includes the following entries:
node_modules/
dist/
.envThis prevents the .env file from being accidentally committed to the repository.
After completing the installation steps, verify that Principles is set up correctly by running a test command:
npm run generate-agents "I want to optimize my daily schedule to improve productivity."If the installation was successful, you should see output indicating that agents have been generated and packaged.
If you encounter any issues during installation, consider the following steps:
- Check Node.js and npm/Yarn Versions: Ensure that you have the required versions installed.
-
Verify OpenAI API Key: Double-check that your API key is correctly added to the
.envfile. - Network Issues: Ensure that your internet connection is stable during the cloning and installation process.
-
Dependency Errors: If dependency installation fails, try deleting
node_modulesandpackage-lock.jsonoryarn.lockand reinstalling.
If problems persist, refer to the Troubleshooting section or open an issue on the repository.