Language Learner is a CLI-based tool designed to help users learn a new language through interactive phrase translation exercises. It generates learning material using the Formulaic API and stores progress locally.
- Generates language-learning phrases based on a structured formula.
- Grades translations with AI feedback.
- Tracks learned words and progress.
- Supports multiple languages.
Before setting up the project, ensure you have the following installed:
- Node.js (v16 or later)
- TypeScript (installed via
npm install -g typescript
) - A Formulaic API key
git clone https://github.com/yourusername/language-learner.git
cd language-learner
npm install
The application requires a Formulaic API key to generate phrases. You will be prompted to enter it on the first run.
Alternatively, you can manually create a config file:
{
"userLang": "en",
"targetLang": "es",
"schedule": 21600000,
"apiKey": "your-formulaic-api-key",
"formulaId": "",
"dataFile": "./data/learned.json"
}
Save this file as data/config.json
.
npm run start
This will start the language-learning session, prompting you with phrases and grading your translations.
- The app presents a phrase in the target language.
- Enter your translation or type
skip
to move on. - If correct, you proceed to the next phrase.
- If incorrect, you receive feedback and another chance to retry.
All learned data is stored in data/learned.json
. If needed, you can reset your progress by deleting this file.
To run in development mode:
npm run dev
npm run test
This project is licensed under the Mozilla Public License 2.0 (MPL-2.0). See LICENSE for details.