Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.5 KB

File metadata and controls

52 lines (40 loc) · 1.5 KB

Development

Setup

git clone https://github.com/vava-nessa/free-coding-models
cd free-coding-models
pnpm install
pnpm start

Architecture

File Role
bin/free-coding-models.js Main CLI entrypoint — TUI, pinging, key handling
src/utils.js Pure helpers: sorting, filtering, scoring, parseArgs
src/opencode.js OpenCode launch logic
src/opencode-config.js OpenCode config read/write
src/tool-launchers.js All external tool launchers
src/endpoint-installer.js Y flow — install provider into tool config
sources.js Model catalog — all 160 models across 20 providers

Tests

pnpm test        # unit tests (node:test, zero deps)
pnpm test:fcm    # AI E2E flow — drives the real TUI in a PTY
pnpm test:fcm:mock  # same but with a mock binary

Tests live in test/test.js. Pure logic lives in src/utils.js so it can be tested without mocking the TUI.

Releasing

  1. Update CHANGELOG.md
  2. Bump "version" in package.json
  3. Commit with just the version number as the message:
git add .
git commit -m "0.1.4"
git push

GitHub Actions auto-publishes to npm on every push to main. Verify with:

npm view free-coding-models version
npm install -g free-coding-models@<new-version>
free-coding-models --help