syn
CLI for Synthetic.new AI API.
Install
go install github.com/dotcommander/syn@latest
Setup
export SYN_API_KEY="your-api-key"
Or create ~/.config/syn/config.yaml:
api:
key: "your-api-key"
model: "hf:deepseek-ai/DeepSeek-V3.2"
Usage
Chat
# One-shot
syn "Explain goroutines"
# With file context
syn -f main.go "Review this code"
# Pipe input
pbpaste | syn "Summarize this"
cat error.log | syn "What went wrong?"
# Select model
syn -m kimi "Complex reasoning task"
syn -m qwen "Describe this architecture"
# JSON output
syn --json "List 3 facts about Go"
Interactive REPL
syn chat
Commands: /help, /clear, /model, /context, /exit
Web Search
syn search "golang error handling best practices"
syn search --json "react server components"
Vision
syn vision screenshot.png "What's in this image?"
syn vision https://example.com/diagram.png "Explain this diagram"
Embeddings
syn embed "Hello world"
syn embed "Text 1" "Text 2" "Text 3"
syn embed --json "For vector storage"
Models
syn model list
Evaluation
# Run insight-extraction eval across all listed models
syn eval --dataset testdata/eval/walter_lewin
# Save machine-readable report
syn eval --format json --out analysis-results/eval-report.json
# Evaluate only selected models
syn eval --models "hf:deepseek-ai/DeepSeek-V3.2,hf:moonshotai/Kimi-K2-Thinking"
# Keep persistent score history + leaderboard
syn eval --history analysis-results/eval-history.jsonl --leaderboard-out analysis-results/eval-leaderboard.md
Model Aliases
| Alias |
Model |
kimi |
Kimi-K2.5 |
qwen |
Qwen3-235B-Thinking |
coder |
Qwen3-Coder-480B |
glm |
GLM-4.7 |
gpt |
GPT-OSS-120B |
deepseek |
DeepSeek-V3.2 (default) |
r1 |
DeepSeek-R1 |
minimax |
MiniMax-M2.1 |
llama |
Llama-3.3-70B |
Flags
| Flag |
Description |
-m, --model |
Model name or alias |
-f, --file |
Include file in prompt |
--json |
JSON output |
-v, --verbose |
Debug output |
Contributing
Contributions are welcome! Please follow these guidelines:
Development Setup
-
Fork and clone the repository:
git clone https://github.com/YOUR_USERNAME/syn.git
cd syn
-
Install dependencies:
go mod download
-
Build the project:
go build -o syn
-
Run tests:
go test ./...
Submitting Changes
-
Create a branch from main
-
Make your changes following Go best practices
-
Write/update tests for your changes
-
Ensure all tests pass: go test ./...
-
Update documentation if needed
-
Commit with clear messages using conventional commit format:
type(scope): description
feat: New feature
fix: Bug fix
docs: Documentation changes
test: Test additions or changes
refactor: Code refactoring
chore: Maintenance tasks
-
Push to your fork and submit a pull request
Code of Conduct
- Be respectful and inclusive
- Provide constructive feedback
- Focus on what is best for the community
- Show empathy towards other community members
For detailed API documentation, see docs/API.md.
License
MIT