Idiomark Quick Start
Get up and running with Idiomark in 5 minutes.
Prerequisites
Before You Start
Make sure you have the following installed:
- Node.js 18+ (LTS recommended)
- pnpm 9+ (or npm equivalent)
You can verify with: node --version && pnpm --version
Installation
# Install the CLI globally
npm install -g @idiomark/cli
# Or use with pnpm
pnpm add -g @idiomark/cli
Your First Idiomark File
- Use Demo File
- Extract Your Own
# Clone the repo (or download demo.idiomark)
git clone https://github.com/idiomark/idiomark.git
cd idiomark
# Validate the demo file
idiomark validate examples/demo.idiomark
# View personality info
idiomark info examples/demo.idiomark
# Start the inference server
idiomark serve examples/demo.idiomark
# Extract from your own text samples
idiomark extract text --input "your-writing-samples-here" --output me.idiomark
# View your personality
idiomark info me.idiomark
Test the Inference Server
# Start the server
idiomark serve examples/demo.idiomark
# In another terminal, test it
curl -X POST http://localhost:3000/generate \
-H "Content-Type: application/json" \
-d '{"message": "What is Idiomark?"}'
# Check health
curl http://localhost:3000/health
# View loaded personality
curl http://localhost:3000/personality
SDK Usage
# Create a new project
mkdir my-idiomark-app && cd my-idiomark-app
pnpm init
# Install the SDK
pnpm add @idiomark/sdk
# Create index.js
cat > index.js << 'EOF'
import { IdiomarkClient } from '@idiomark/sdk'
const client = new IdiomarkClient()
const result = await client.generate({
message: "Hello, world!",
personality: require('./demo.idiomark')
})
console.log(result.response)
EOF
# Run it
node index.js
Next Steps
- Read the CLI Reference
- Check out the SDK Guide
- Understand the Idiomark File Format
Troubleshooting
Quick Fixes for Common Errors
If something goes wrong, here are the most likely solutions:
- Command not found: Install globally with
npm install -g @idiomark/clior usenpx @idiomark/cli - Module errors: Run
pnpm installfrom the monorepo root to link workspaces - Validation failures: Use
idiomark validate --strictfor detailed error messages - Port conflicts: If port 3000 is in use, specify another:
idiomark serve demo.idiomark -p 3001
"idiomark: command not found"
- Make sure you installed globally:
npm install -g @idiomark/cli - Check your PATH is set up correctly
- Try
npx idiomarkinstead
"Cannot find module '@idiomark/core'"
- Make sure you're in the monorepo root
- Run
pnpm installto link workspaces
Validation errors
- Run
idiomark validate --strictfor detailed error messages - Check your .idiomark file matches the spec