Skip to main content

Usage

crewship deploy [path] [options]

Description

Packages your crew and deploys it to Crewship, or builds a local Docker image for testing. Remote deploy (default):
  1. Packages your project into a tarball
  2. Initializes a deployment (or uses existing one based on project name)
  3. Creates a new version
  4. Uploads the build context to Crewship
Local deploy (--local):
  1. Builds a Docker image locally using the base Crewship image
  2. Optionally runs the container

Options

OptionDescription
[path]Project directory (defaults to current directory)
--local, -lBuild Docker image locally instead of deploying
--run, -rRun the container after building (with --local)
--port, -pPort to expose when running (default: 8000)

Examples

Deploy to Crewship

crewship deploy

Deploy a specific directory

crewship deploy ./my-crew

Build and test locally

crewship deploy --local

Build and run locally

crewship deploy --local --run

Run on a custom port

crewship deploy --local --run --port 9000

Output

Remote Deploy

A successful remote deployment shows:
🚀 Deploying crew "my-crew" to Crewship

📡 Fetching organizations...
   Using organization: My Org (my-org)

📝 Initializing deployment...
   Created new deployment: dep_abc123xyz
   Saved deployment ID to crewship.toml

📝 Creating new version...
   Version: 1 (ver_xyz789)

📦 Packaging project...
   Package size: 0.12 MB

⬆️  Uploading context...
   Status: pending

✅ Deployed version 1 for "my-crew"!

   Deployment ID: dep_abc123xyz
   Version: 1
   Status: pending

   View in console: https://console.crewship.dev/deployments/dep_abc123xyz

Local Deploy

A successful local build shows:
🚀 Deploying crew locally from /path/to/my-crew

  Framework:   crewai
  Entrypoint:  src.my_crew.main:kickoff
  Profile:     slim
  Image:       crewship-my-crew:latest

📦 Reading .env file...
   Found 3 environment variables

🔨 Building image...

✓ Image built: crewship-my-crew:latest

To run the crew locally:
  docker run -p 8000:8000 crewship-my-crew:latest

Or use:
  crewship deploy --local --run

Requirements

Your project must have:
  • crewship.toml in the project root with a [deployment] section
  • A valid entrypoint pointing to your crew’s kickoff function
  • pyproject.toml for dependencies (installed via uv pip install -e .)

Minimal crewship.toml

crewship.toml
[deployment]
framework = "crewai"
entrypoint = "src.my_crew.main:kickoff"

With profile

crewship.toml
[deployment]
framework = "crewai"
entrypoint = "src.my_crew.main:kickoff"
profile = "browser"  # For crews that need a browser (default: "slim")

Build Process

For local builds, Crewship generates a Dockerfile based on your configuration:
FROM crewship/crewai:py311-slim

# Copy project files
COPY . /app/project/

# Install dependencies
WORKDIR /app/project
RUN uv pip install -e .

WORKDIR /app

# Configure entrypoint
ENV CREWSHIP_ENTRYPOINT=src.my_crew.main:kickoff
You don’t need to write a Dockerfile. Crewship generates one based on your crewship.toml.

Excluding Files

By default, the following files and directories are excluded from the build:
  • .git, .gitignore
  • .env, .env.*
  • .venv, venv
  • __pycache__, *.pyc, *.pyo
  • .pytest_cache, .mypy_cache, .ruff_cache
  • node_modules
  • .DS_Store, Thumbs.db
  • *.egg-info, dist, build
  • .idea, .vscode
  • *.log
  • Dockerfile, .dockerignore
To exclude additional files, add them to your crewship.toml:
crewship.toml
[deployment]
framework = "crewai"
entrypoint = "src.my_crew.main:kickoff"

[build]
exclude = [
  "tests/",
  "data/*.csv",
  "*.md",
]

Troubleshooting

”crewship.toml not found”

Make sure you’re in the project root directory and have a crewship.toml file. Run crewship init to create one.

”Not logged in”

Run crewship login to authenticate before deploying to Crewship.

”Missing deployment.framework” or “Missing deployment.entrypoint”

Your crewship.toml must have a [deployment] section with both framework and entrypoint:
[deployment]
framework = "crewai"
entrypoint = "src.my_crew.main:kickoff"

“No organizations found”

Create an organization in the Console before deploying.

”Session expired”

Your login session has expired. Run crewship login again.

Local build: “Base image not found”

For local builds, the CLI will attempt to build the base image automatically. If this fails, ensure Docker is running and you have access to the packages/runner-crewai directory.