major CLI lets you work on Major from your own machine. You get a local folder for each app, agent, skill, or workflow, edit it with any editor or coding assistant, and sync it back to Major when you are ready.
- Apps are git repositories. You run them locally with your connectors wired in, then deploy.
- Agents, skills, and workflows are small file bundles. You pull them, edit, validate, push a new version, and publish.
Set up
1
Check prerequisites
You need macOS or Linux with Git installed. To work on apps, you also need Node.js 22.12 or later and pnpm.
2
Install the CLI
major --version. Update later with major update.3
Log in
major user whoami and your organization with major org whoami. Switch organizations with major org select.4
Set your GitHub username (apps only)
App code lives in GitHub. The CLI detects your username from your SSH configuration. If it cannot, set it once:
Build an app
1
Create or clone the app
Create a new Next.js app with its own GitHub repository:Or clone an app that already exists in your organization:Both commands set up the local folder, generate
.env, and generate clients for the app’s resources.2
Run it locally
From the app folder:This refreshes
.env, syncs theme files, runs pnpm install, and starts pnpm dev. Your local app reaches connectors through Major, so you do not need database credentials on your machine.3
Attach connectors
See which resources exist and which are attached, then attach the ones you need:Or pick them interactively with
major resource manage. The CLI regenerates resource clients for your code. Learn more in Connectors.To switch the environment your app uses, run major resource env, then major app start again. Manage variables with major vars.4
Deploy
Commit, push, and deploy in one step:The first deploy asks for a URL slug (or pass
--slug). The command waits for the deployment and prints the app’s URL.If you prefer to commit with git yourself, use major push and then major publish. See pull, push, validate, publish.5
Check on it
major app configure, which opens its settings in your browser.Build an agent, skill, or workflow
Agents, skills, and workflows are versioned file bundles. Each local folder has a.major/config.json that links it to its bundle, so the same four commands work for all three.
1
Create or clone
- Agent
- Skill
- Workflow
major agent list, major skill list, or major workflow list. Without --id, clone lets you pick from a list. Then cd into the new folder.2
Pull the latest version
If someone else may have saved changes since you cloned, bring the folder up to date:
3
Edit
Edit the files in your editor. A skill’s name comes from its
SKILL.md frontmatter, and a workflow’s label comes from its definition.4
Validate
5
Push a new version
6
Publish
--yes to skip the confirmation.Scripts and CI
Pass--non-interactive to make any command fail instead of prompting or opening a browser, and supply the values it would have asked for as flags. For example:
--json for machine-readable output.
Next steps
CLI reference
Every command and flag.
Apps
How Major apps work.
MCP
Connect your coding assistant to Major.
Platform Agent
Build in the browser instead.