Deploy from CLI

The sling project command helps you manage projects on the Sling Data Platform. It provides several subcommands for project management and job operations.

$ sling project
project - Manage a project on the Sling Data Platform

See more details at https://docs.slingdata.io/

  Usage:
    project [init|status|jobs|sync]

  Subcommands: 
    init     create or link to a sling project
    status   see project status
    jobs     manage project jobs
    sync     Push local file changes

  Flags: 
    --version   Displays the program version string.
    -h --help      Displays help with available flag, subcommand, and positional value parameters.

Prerequisites

  • A valid Sling Project Token (SLING_PROJECT_TOKEN environment variable, obtained from the Settings section)

  • For self-hosted platform setups, the SLING_PLATFORM_HOST environment variable pointing to your platform server (e.g. https://sling.mycompany.com)

Commands

Initialize Project

Links your local directory to a Sling project:

This command will:

  • Create or link to an existing Sling project

  • Generate a .sling.json file in your project directory

  • Configure project settings like paths and ID

Project File (.sling.json)

The project configuration is stored in .sling.json:

  • id: The Sling project ID

  • paths: Array of subfolders to monitor for files (relative to project root). This is optional. If not provided, the root directory will be used.

Check Project Status

View the current project status and configuration:

This displays:

  • Project ID and name

  • Organization details

  • Owner information

  • Project folder location

  • Configured project paths

  • Additional project status details

Manage Jobs

List Jobs

View all jobs in the project:

Shows a table with:

  • Job ID

  • Name

  • File Name

  • Status

  • Active status

  • Schedule information

View Job History

See run history for project jobs:

Trigger Job

Run a specific job by its ID:

Sync Files

Push local file changes to the Sling platform (one way sync):

The sync command:

  • Compares local files with remote versions

  • Identifies new and modified files

  • Prompts for confirmation before pushing changes (unless --force is used)

  • Shows a summary of synced files

Options

  • --force: Skip confirmation prompt and push changes immediately

Examples

Environment Variables

Variable
Description
Required

SLING_PROJECT_TOKEN

Your project token, obtained from the Settings section of the Sling Platform

Yes

SLING_PLATFORM_HOST

The URL of your self-hosted Sling Platform server (e.g. https://sling.mycompany.com)

Only for self-hosted setups

Cloud-Hosted (Default)

For Sling's cloud platform, you only need to set the project token:

Self-Hosted Platform

If you are running a self-hosted Sling Platform, you must also set SLING_PLATFORM_HOST so the CLI knows where to validate your project token and communicate with the platform API:

When SLING_PLATFORM_HOST is set, all project commands (init, status, jobs, sync) will communicate with your self-hosted server instead of the Sling cloud API.

Notes

  • The project token must be valid and have appropriate permissions

  • File syncing only pushes changes from local to remote (not from remote to local)

  • Jobs can be managed through both CLI and the Sling Platform interface

  • Project paths are relative to the project root directory

Last updated

Was this helpful?