Overview
Thefastskill init command provides an interactive setup wizard that configures a new FastSkill project with all necessary files and directories. This command is the recommended way to get started with FastSkill.
The init command creates everything needed for semantic search: configuration files, directory structure, and example skills.
Context Detection:
fastskill init automatically detects whether you’re working in a skill directory or project root:- Skill-level: If run in a directory containing
SKILL.md, createsskill-project.tomlwith[metadata]section (for skill authors) - Project-level: If run at project root, can create
skill-project.tomlwith[dependencies]section (for skill consumers)
What It Does
When you runfastskill init, it performs the following steps:
- Prompts for OpenAI API Key: Interactively collects your OpenAI API key (or uses environment variable)
- Validates API Key: Basic format validation to ensure the key looks correct
- Chooses Embedding Model: Lets you select between different OpenAI embedding models
- Creates Configuration: Generates
.fastskill.yamlwith your settings - Sets Up Directory Structure: Creates
.skills/directory with proper organization - Creates Example Skill: Adds a sample skill for testing and learning
- Provides Next Steps: Shows clear instructions for what to do next
Usage
Interactive Setup (Recommended)
Non-Interactive Setup
Command Options
| Option | Description | Default |
|---|---|---|
--yes | Skip interactive prompts, use defaults | false |
--force | Reinitialize even if files exist | false |
--skills-dir <DIR> | Skills directory path | .skills |
--embedding-model <MODEL> | OpenAI embedding model | text-embedding-3-small |
--no-example | Skip creating example skill | false |
Files Created
.fastskill/config.yaml
Service-level configuration file with your embedding settings:
.fastskill/config.yaml. Project-level configuration (skill dependencies and repositories) is stored in skill-project.toml at your project root.
.skills/ Directory Structure
Example Skill
Creates a basic skill at.skills/examples/hello-world/SKILL.md:
Configuration Options
Embedding Models
| Model | Description | Cost | Use Case |
|---|---|---|---|
text-embedding-3-small | Cost-effective, good performance | Low | Most projects |
text-embedding-3-large | Higher accuracy, more expensive | High | Enterprise, high-precision needs |
| Custom | Any OpenAI-compatible model | Varies | Advanced users |
Skills Directory
- Default:
.skills(recommended) - Custom: Any directory path you specify
- Existing: Will be created if it doesn’t exist
Environment Variables
OPENAI_API_KEY
The init command will use this environment variable if set:Troubleshooting
”API key should start with ‘sk-’”
Cause: The provided API key doesn’t match OpenAI’s format Solution: Check that you’re using a valid OpenAI API key”API key appears to be too short”
Cause: The API key is incomplete Solution: Ensure you’re copying the complete API key from OpenAI”FastSkill is already initialized”
Cause: Configuration files already exist Solution: Use--force to reinitialize, or remove existing files first
Permission Denied
Cause: Cannot write to the current directory Solution: Check file permissions or run in a directory where you have write accessIntegration with CI/CD
For automated setups in CI/CD pipelines:Best Practices
Project Structure
Keep FastSkill configuration at the project root:API Key Management
- Development: Use environment variables
- Production: Use secure secret management
- CI/CD: Store in encrypted secrets
Version Control
Consider what to commit:Next Steps After Init
- Add Your Skills: Create skill directories under
.skills/ - Index Skills: Run
fastskill reindexto build the search index - Test Search: Try
fastskill search "your query" - Integration: Connect to your AI agent or application