Skip to main content

Usage

crewship init [directory]
Initialize a new crewship.toml configuration file in your project. This command auto-detects your project settings and creates a ready-to-use configuration.

Arguments

ArgumentDescription
directoryProject directory (defaults to current directory)

What It Does

The init command:
  1. Detects your framework - Looks for [tool.crewai] in pyproject.toml to identify CrewAI projects
  2. Finds your entrypoint - Searches for crew classes decorated with @CrewBase or named *Crew
  3. Extracts Python version - Reads requires-python from pyproject.toml
  4. Creates configuration - Generates a crewship.toml with sensible defaults

Examples

Initialize current directory

cd my-crew
crewship init
Output:
🔍 Initializing Crewship project in /path/to/my-crew

   Found pyproject.toml, reading project info...
   Detected CrewAI project
   Detected entrypoint: my_crew.crew:MyCrew

✅ Created crewship.toml

   Framework:   crewai
   Entrypoint:  my_crew.crew:MyCrew
   Profile:     slim
   Python:      3.11

   Edit crewship.toml to customize your deployment settings.
   Then run "crewship deploy" to deploy your crew.

Initialize a specific directory

crewship init ./projects/my-crew

Generated Configuration

The command creates a crewship.toml like this:
[deployment]
framework = "crewai"
entrypoint = "my_crew.crew:MyCrew"
profile = "slim"
python = "3.11"

[build]
exclude = ["tests"]

Entrypoint Detection

The command searches for your crew entrypoint in these locations:
  1. <project_name>/crew.py - Standard CrewAI structure
  2. src/<project_name>/crew.py - Source layout
  3. Any top-level package with a crew.py file
It looks for:
  • Classes decorated with @CrewBase
  • Classes with names ending in Crew
If auto-detection fails, a default entrypoint is generated based on your project name.

After Initialization

Once you have a crewship.toml, you can:
  1. Edit the configuration - Customize entrypoint, profile, or build settings
  2. Set environment variables - Add API keys with crewship env set
  3. Deploy - Run crewship deploy to deploy your crew