Jamdesk Documentation logo

CLI Deploy

Deploy documentation directly from the command line — upload, build, and go live without pushing to GitHub.

The deploy command packages your docs, uploads them to Jamdesk, and triggers a build from the terminal. Use it for quick iterations, testing changes, or projects not connected to a GitHub repo.

Quick Start

jamdesk login        # First time only
jamdesk deploy       # From your project directory

Options

FlagDescription
--detachQueue the build and exit immediately (prints a dashboard link)
--full-rebuildForce a full rebuild, bypassing the build cache
--project <id>Deploy to a specific project ID (skips interactive selection)

jamdesk push is an alias for jamdesk deploy.

How It Works

1
Authenticate

Verifies your session is valid. If your token has expired, you'll be prompted to run jamdesk login.

2
Load config

Reads and validates docs.json from the current directory.

3
Resolve project

Reads projectId from docs.json. If it's missing (first deploy), the CLI prompts you to select from your projects. Your choice is saved back to docs.json so the next deploy skips the prompt.

Use --project <id> to override.

4
Package files

Creates a compressed tarball of your docs, respecting .gitignore. If any files look like they might contain secrets, the CLI prints a warning (but doesn't block the upload).

5
Upload

Sends the tarball to Jamdesk via a presigned URL. Maximum upload size is 100 MB.

6
Build

Queues a build and polls for status, printing each phase as it completes. Press Ctrl+C to stop polling — the build continues in the background.

7
Done

Prints the live URL when the build finishes.

Build Phases

During polling, you'll see each phase complete in sequence:

PhaseDescription
Extracting filesUnpacking the uploaded tarball
Validating configurationChecking docs.json schema and content
Preparing contentProcessing MDX files and assets
Building documentationCompiling pages and generating static artifacts
Uploading to CDNPushing built output to the edge network
Refreshing cachePurging stale content from the CDN

File Exclusions

The following are always excluded from uploads, regardless of your .gitignore:

.git, node_modules, .next, .env, .env.*, *.pem, *.key, credentials.json, .gcloud, .DS_Store, Thumbs.db

Everything in your .gitignore is also excluded.

Secret file warnings

The CLI warns (but doesn't block) when it detects files that look like secrets:

  • .env and .env.* files
  • *.pem and *.key files
  • credentials.json
  • service_account*.json
  • Files starting with secret

Add them to .gitignore to suppress the warning and exclude them from uploads.

Error Reference

ErrorCodeCauseFix
Not logged inAUTH_REQUIREDNo stored credentialsjamdesk login
Session expiredAUTH_EXPIREDToken refresh failedjamdesk login
Access deniedFORBIDDENNot a member of this projectCheck project membership in dashboard
Project not foundNOT_FOUNDInvalid project IDVerify ID or remove projectId from docs.json
Build in progressBUILD_IN_PROGRESSAnother build is runningWait or check dashboard
Upload too largeTOO_LARGEServer rejected upload (100 MB limit)Exclude large files via .gitignore
Project too largePROJECT_TOO_LARGETarball exceeds 100 MB during packagingExclude large files via .gitignore
No projectsNO_PROJECTSNo projects in your accountCreate a project in the dashboard first
No filesEMPTY_PROJECTAll files excludedCheck .gitignore
Config invalidCONFIG_NOT_FOUNDMissing or invalid docs.jsonRun from project root, check config
Upload failedUPLOAD_FAILEDNetwork issue during uploadCheck internet, retry
Build failedBUILD_FAILEDBuild service errorCheck build logs in dashboard

Troubleshooting

Only one build runs at a time per project. Wait for the current build to finish — check status in the dashboard under Deployments.

Make sure you're running the command from the directory that contains docs.json. Run jamdesk validate to check for config errors.

The 100 MB limit applies to the compressed tarball of all non-excluded files. Review what's being included — large images, videos, or data files are common causes. Add them to .gitignore to exclude.

Press Ctrl+C to exit — the build keeps running in the background. Check the dashboard for status. If this happens consistently, your network may be dropping the polling requests.

You need at least one project in your Jamdesk account. Create one at dashboard.jamdesk.com.

For more CLI troubleshooting, see the Help Center CLI guide.

What's Next?

Deployment Workflow

GitHub auto-deploy and deployment status

Authentication

Login flow, sessions, and troubleshooting